Re: What is the preferred way of doing a context switch on the ARM?
- From: "Boudewijn Dijkstra" <boudewijn@xxxxxxxxx>
- Date: Fri, 29 Aug 2008 10:05:48 +0200
Op Fri, 29 Aug 2008 07:45:34 +0200 schreef Michael <MichaelDMcDonnell@xxxxxxxxx>:
I’m asking, because I see no clean way to do it. On stack based
machines you simply “pushall” onto the active task’s stack, switch
stacks, and do a “popall”. The ARM makes this difficult because when
it switches to a privileged mode, the active task’s stack becomes
“invisible”, and the CPSR gets saved into the SPSR (as opposed to
being pushed onto the stack). Thanks!
User-defined task code is only run in User or System mode, which both use the 'unaliased' registers. On an exception, the processor starts using alternative registers, but you can go to System mode to access those unaliased registers and push them (and the SPSR as well, of course).
--
Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
.
- Follow-Ups:
- References:
- Prev by Date: Weekend DSP + DIP training starting from 6th September
- Next by Date: Re: Easiest Way To Get Part Library Templates For Pcb?
- Previous by thread: What is the preferred way of doing a context switch on the ARM?
- Next by thread: Re: What is the preferred way of doing a context switch on the ARM?
- Index(es):
Relevant Pages
|