[OpenBIOS] [PATCH] SPARC32: implement full context switch

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun Aug 21 17:13:20 CEST 2016


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 at 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

-- 
1.7.10.4




More information about the OpenBIOS mailing list