public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nick Garnett <nickg@ecoscentric.com>
To: "Øyvind Harboe" <oyvind.harboe@zylin.com>
Cc: "eCos Discussion" <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Problems with ISR/DSR stacks
Date: Wed, 06 Jun 2007 14:41:00 -0000	[thread overview]
Message-ID: <m33b15gynz.fsf@xl5.calivar.com> (raw)
In-Reply-To: <c09652430706060236m5f93caa1oa2422068121bbd99@mail.gmail.com>

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

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


-- 
Nick Garnett                                     eCos Kernel Architect
eCosCentric Limited     http://www.eCosCentric.com/   The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.    Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2007-06-06 10:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06  9:36 Øyvind Harboe
2007-06-06  9:51 ` Nick Garnett
2007-06-06 10:26   ` Øyvind Harboe
2007-06-06 14:41     ` Nick Garnett [this message]
2007-06-06 15:26       ` Øyvind Harboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m33b15gynz.fsf@xl5.calivar.com \
    --to=nickg@ecoscentric.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=oyvind.harboe@zylin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).