[OpenBIOS] [PATCH 0/7] SPARC64 context improvements

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun Aug 28 18:16:17 CEST 2016


On 21/08/16 16:32, Mark Cave-Ayland wrote:

> This patchset improves the context handling in 2 ways: firstly it unifies
> the context structures between switch_to() and CIF entry, and secondly fixes
> up the context switch code enough so that we can switch and return from 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 (7):
>   SPARC64: add parameter to indicate %cwp save/restore direction
>   SPARC64: allocate space in context to save global registers
>   SPARC64: save/restore global registers to context when entering CIF
>   SPARC64: save CIF entry globals under the client stack
>   SPARC64: introduce %pc into context and use it when exiting CIF
>   SPARC64: split off general CPU registers into *_GENERAL_STATE macros
>   SPARC64: switch entry.S over to use existing context macros
> 
>  arch/sparc64/call-client.S |   71 +++++++++++++++---------
>  arch/sparc64/context.c     |    6 +--
>  arch/sparc64/context.h     |    7 +--
>  arch/sparc64/cpustate.h    |   98 ++++++++++++++++++++-------------
>  arch/sparc64/entry.S       |   17 +++++-
>  arch/sparc64/switch.S      |  129 ++++++++++++++++----------------------------
>  6 files changed, 175 insertions(+), 153 deletions(-)

Building upon this work with the load/init-program fixups I found a few
bugs, so v2 coming up shortly.


ATB,

Mark.




More information about the OpenBIOS mailing list