This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with ISR/DSR stacks


On 06 Jun 2007 11:33:36 +0100, Nick Garnett <nickg@ecoscentric.com> wrote:
"Øyvind Harboe" <oyvind.harboe@zylin.com> writes:

> On 06 Jun 2007 10:31:37 +0100, Nick Garnett <nickg@ecoscentric.com> wrote:
> > "Øyvind Harboe" <oyvind.harboe@zylin.com> writes:
> >
> > > 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).
> >
> > No. DSRs run on the interrupt stack. This is what
> > hal_interrupt_stack_call_pending_DSRs() does.
>
> Ah. OK. I'll have to dig into that, but that does give interrupt
> stacks a lot more oomph.

The term "interrupt_stack" is a bit of a misnomer, it often gets used
for all sorts of things: it's the startup stack; interrupts of course;
running DSRs and sometimes exception handling. It depends on the HAL
and who originally wrote it -- I recommend looking at the MIPS and
PowerPC HALs for the best examples.

Thanks for the tip!


> > If you disable the interrupt stack then you have to deal with the
> > consequences. It is not recommended unless you know what you are
> > doing.
>
> I haven't added interrupt stacks to my HAL yet, but is sure is on my
> list now(together with GDB support and a number of other things). :-)

If you are doing a new port then the best thing to do at this stage is
to just increase the minimum thread stack size by a couple of K,
assuming you have the memory. That should allow you to get all the
rest of the HAL running before dealing with the interrupt stack
switching, which can be a bit tricky.

That's what I did to get out of jail for now, so yes, it worked.


--
Ø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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]