From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32415 invoked by alias); 22 Aug 2007 09:49:12 -0000 Received: (qmail 32319 invoked by uid 22791); 22 Aug 2007 09:49:11 -0000 X-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.126.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Aug 2007 09:49:08 +0000 Received: from i577B572C.versanet.de [87.123.87.44] (helo=intranator.net.lan) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis), id 0MKxQS-1INmpk0ilC-0008R6; Wed, 22 Aug 2007 11:49:05 +0200 Received: from localhost (intranator.net.lan [127.0.0.1]) by localhost (Postfix) with ESMTP id E5274EC; Wed, 22 Aug 2007 11:49:02 +0200 (CEST) Received: from [192.168.101.150] (kindler-mobil.net.lan [192.168.101.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intranator.net.lan (Postfix) with ESMTP id 62172E3; Wed, 22 Aug 2007 11:49:01 +0200 (CEST) Message-ID: <46CC0623.7010500@cetoni.de> Date: Wed, 22 Aug 2007 09:49:00 -0000 From: cetoni GmbH - Uwe Kindler Organization: cetoni GmbH User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Hans Rosenfeld , ecos-patches@sourceware.org Subject: Re: LPC2xxx patch for support of vectored interrupt controller References: <46CA81F3.60109@cetoni.de> <20070822084244.GG31057@lunn.ch> <20070822092307.GC2126@grumpf.hope-2000.org> In-Reply-To: <20070822092307.GC2126@grumpf.hope-2000.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: by Intranator (www.intranator.com) with AMaViS and F-Secure AntiVirus (fsavdb 2007-08-22_04) X-Spam-Level: 982 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V01U2FsdGVkX1+6OW3FhEkS6DZZ4/U2PuID+GFAJVLc2dAfLtm q4dcWd606Ah4SwXo0jZTaU28fxxyAkn7sKT/6IIYk9p2JBetPc E9TO9g3w2/HJ1u7sfsObu5odGyEk9rc Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2007-08/txt/msg00045.txt.bz2 Hello, -----> May I suggest that you think about this again? The only configurable interrupts are EINT0 to EINT3. So this assertion <---- yes Hans you are right. This was my fault - sorry. But I still would=20 leave this assertion in the code. Regards, Uwe > The only configurable interrupts are EINT0 to EINT3. So this assertion > makes sure that the vector passed to hal_interrupt configure is less or > equal to EINT3 _and_ greater or equal to EINT0. And if this is not true > the assertion fails. If you change the assertion the way suggested you > could also just remove it, since _all_ vectors are either less or equal > to EINT3, or greater or equal to EINT0, or both. >=20 >> Should there also be another check like: >> >> CYG_ASSERT(vector <=3D CYGNUM_HAL_ISR_MAX && >> vector >=3D CYGNUM_HAL_ISR_MIN , "Invalid vector"); >> >> If you pass it an invalid vector, such as 33, you end up shifting 1 by >> 33 which i guess results in 0. The code will then set/reset the level >> on every single interrupt! >=20 > This assertion cannot fail if the previous assertion did not fail, and > if the previous assertion failed it is never reached. Any vector less or > equal to EINT3 is also less than ISR_MAX, and any vector greater or equal > to EINT0 is also greater than ISR_MIN. >=20=20 >> If the hardware is not capable of setting priority and level for these >> vectors, we should check for this. I suggest we make the test case a >> little bit more intelligent so that it only tries to do things which >> the hardware is capable of doing. In some respect, the test failing is >> correct! >=20 > This could probably be done by introducing something like > CYGNUM_HAL_ISR_CONF_MAX and _MIN to the HALs. >=20 >=20 --=20 Mit freundlichen Gr=FC=DFen, Dipl. Inf. (FH) Uwe Kindler Software Engineering -- cetoni GmbH Am Wiesenring 6 D-07554 Korbussen Tel.: +49 (0) 36602 338 28 Fax: +49 (0) 36602 338 11 uwe.kindler@cetoni.de www.cetoni.de