This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Problems with ISR/DSR stacks
- From: "Øyvind Harboe" <oyvind dot harboe at zylin dot com>
- To: "eCos Discussion" <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 6 Jun 2007 10:50:20 +0200
- Subject: [ECOS] Problems with ISR/DSR stacks
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
--
Øyvind 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