ARM: Fix hardcoded CPSR value for the idle thread
This commit is contained in:
parent
092b2c1f35
commit
a5f61c7166
2 changed files with 5 additions and 1 deletions
|
|
@ -33,6 +33,10 @@
|
|||
| PMODE_SUPERVISOR \
|
||||
| CPSR_EXTRA_FLAGS )
|
||||
|
||||
#define CPSR_IDLETHREAD ( PMASK_FIRQ \
|
||||
| PMODE_SUPERVISOR \
|
||||
| CPSR_EXTRA_FLAGS )
|
||||
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
/* Offsets within the user context, these need to match the order in
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ Arch_switchToThread(tcb_t *tcb)
|
|||
BOOT_CODE void
|
||||
Arch_configureIdleThread(tcb_t *tcb)
|
||||
{
|
||||
setRegister(tcb, CPSR, 0x1f);
|
||||
setRegister(tcb, CPSR, CPSR_IDLETHREAD);
|
||||
setRegister(tcb, LR_svc, (word_t)idleThreadStart);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue