This patch series is part of a much larger WIP series designed to remove various hacks from the load/init-program/go words. However in order for the follow-on series to work, all architectures must build an execution context similar to the IEEE1275 specification description of saved-program-state.
PPC is the only architecture which doesn't make use of contexts when entering/leaving the Forth environment, so start by adding this functionality in order that it can be expanded on further with later patches. While no functionality is changed by this patch, there should be no regressions when attempting to boot existing client images.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
v2: - Use single asm invocation in switch_to() with clobber register - Fix unsigned int -> unsigned long - Fix missing volatile from __context pointer
Mark Cave-Ayland (4): ppc: move call_elf() to separate switch.S file ppc: add new context handler ppc: use separate context to call client images ppc: unify CIF save stack layout with that of new context stack
openbios-devel/arch/ppc/build.xml | 2 + openbios-devel/arch/ppc/qemu/context.c | 140 ++++++++++++++++++ openbios-devel/arch/ppc/qemu/context.h | 34 +++++ openbios-devel/arch/ppc/qemu/init.c | 4 +- openbios-devel/arch/ppc/qemu/ldscript | 6 +- openbios-devel/arch/ppc/qemu/start.S | 244 +++++++++++++------------------- openbios-devel/arch/ppc/qemu/switch.S | 211 +++++++++++++++++++++++++++ openbios-devel/include/arch/ppc/io.h | 2 +- 8 files changed, 494 insertions(+), 149 deletions(-) create mode 100644 openbios-devel/arch/ppc/qemu/context.c create mode 100644 openbios-devel/arch/ppc/qemu/context.h create mode 100644 openbios-devel/arch/ppc/qemu/switch.S