[Barrelfish-users] problem in arm context switching

Wang Nan wangnan0 at huawei.com
Fri Jul 12 14:08:14 CEST 2013


Hi,

CPU driver does context switching at do_resume(), it saves user mode's cpsr to spsr, then use

"ldmia  %[regs], {r0-r15}^"

to restore cpsr and all registers.

However, the code is executed in SYSTEM mode, and SYSTEM mode does't have spsr.

According to arm manual, do "ldmia  %[regs], {r0-r15}^" in system mode causes unpredictable behaviors.

Could anyone provide a solution to it?

I think the arm context switching code should be reviewed carefully.

Thany you!




More information about the Barrelfish-users mailing list