The existing SPARC32 context switch logic was only partially complete in that it wouldn't save/restore all the register windows. This patch updates the context switch code to save the full CPU state and is enough to allow a switch and return to an arbitrary PC address in testing.
This is a precursor to fixing up the load/init-program logic so that clients are able access and alter their own context from Forth.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (1): SPARC32: implement full context switch logic in switch_to()
arch/sparc32/boot.h | 2 +- arch/sparc32/context.c | 8 +- arch/sparc32/context.h | 6 +- arch/sparc32/cpustate.h | 160 ++++++++++++++++++++++++++++++++++++++++ arch/sparc32/entry.S | 26 ++++++- arch/sparc32/switch.S | 187 +++++++++++++++-------------------------------- 6 files changed, 249 insertions(+), 140 deletions(-) create mode 100644 arch/sparc32/cpustate.h