From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14447 invoked by alias); 6 Jun 2007 08:50:26 -0000 Received: (qmail 14428 invoked by uid 22791); 6 Jun 2007 08:50:26 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.175) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Jun 2007 08:50:23 +0000 Received: by ug-out-1314.google.com with SMTP id z36so388677uge for ; Wed, 06 Jun 2007 01:50:21 -0700 (PDT) Received: by 10.78.150.7 with SMTP id x7mr90873hud.1181119820928; Wed, 06 Jun 2007 01:50:20 -0700 (PDT) Received: by 10.78.70.17 with HTTP; Wed, 6 Jun 2007 01:50:20 -0700 (PDT) Message-ID: Date: Wed, 06 Jun 2007 09:36:00 -0000 From: "=?ISO-8859-1?Q?=D8yvind_Harboe?=" To: "eCos Discussion" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Google-Sender-Auth: e81bcf33b398f604 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Problems with ISR/DSR stacks X-SW-Source: 2007-06/txt/msg00060.txt.bz2 Enabling INFRA_DEBUG crashes my "rocket"... As far as I can tell the DSR runs run on the thread stack and not the interrupt stack(from inside interrupt_end). Also, as long as the interrupt handling in a HAL does not support interrupt nesting, then there is no point in adding support for an interrupt stack as a single level ISR probably uses less stack than a DSR anyway. DSR's don't nest. However, any DSR that uses a non-trivial amount of stack is *nasty* as all threads in the system then needs to have enough stack to accomodate that DSR. This gets even nastier as there is no way for a DSR to enforce all threads to have this extra amount of stack. The thing that I don't understand is why there is no DSR stack.... DSR's can be interrupted by ISR's but not by threads, so presumably the requirement to be on the interrupted threads stack arises *after* the DSR's have run? My system crashes when I enable INFRA_DEBUG because an assert is triggered during a DSR where diag_printf() is invoked and this blows the stack. Initially with the DHCP client in the FreeBSD tcp/ip stack for which I submitted a patch that got accepted a while ago, but other thread suffer the same faith. http://ecos.sourceware.org/docs-2.0/ref/hal-default-interrupt-handling.html --=20 =D8yvind Harboe http://www.zylin.com - eCos ARM & FPGA developer kit -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss