wake-0 / fhvOS

This repository contains an os for the arm cortex a8 in combination with beaglebone.
GNU General Public License v2.0
7 stars 1 forks source link

[Scheduler] [Context Switch] Bug in context switch CPSR #63

Closed trylimits closed 9 years ago

trylimits commented 9 years ago

In our context switch we store the CPSR, however, this register is shadowed in the interrupt routine and we have to access the user CPSR through SPSR (Saved Program Status Register). Restoring a new context happens analogously.

trylimits commented 9 years ago

Fixed. Context is restored properly.

Test case: Check CPSR of a user process (debug breakpoint). The CPU should be is in user mode. Before that change the system was always in supervisor mode.