This is the mail archive of the ecos-discuss@sources.redhat.com 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: : several questions


"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


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