This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: : several questions
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "johnsonest" <johnsonest at hotmail dot com>
- Cc: <ecos-discuss at sources dot redhat dot com>, <gary at chez-thomas dot org>
- Date: 26 Aug 2004 10:14:50 +0100
- Subject: Re: [ECOS]: several questions
- References: <BAY14-F3241xbt3a6jT00059a4d@hotmail.com><m3u0v34esv.fsf@xl5.calivar.com><BAY14-DAV10RfHfg8uC0006c713@hotmail.com><m3oelb4a1k.fsf@xl5.calivar.com><BAY14-DAV78FSA9Mffe000771f4@hotmail.com>
"johnsonest" <johnsonest@hotmail.com> writes:
>
> 1) in IRQ handling,I do not know keep vector for what use?
The vector number is passed to the ISR handler. It allows common
interrupt handlers to detect which interrupt is being delivered.
> 2) since all thread and majority of ISR/DSR handler run in SVC mode,
> save svc_lr and svc_sp for what?
You would have to ask the authors of that code for details. Note that
RedBoot is used for running more than just eCos applications, and this
is probably part of that support.
> 3)why save all context when IRQ occurs to SVC stack? I feel os
> should save context to current thread stack when no nested
> interrupt; when nested interrupt, os save context to interrupt
> stack. design ecos like this for what advantage?
The thread state is stored on the thread stack and nested interrupts
are nested on the interrupt stack. This is necessary since any
interrupt can result in a context switch and the thread must be ready
for that to happen.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss