Author: mcayland Date: Tue Dec 29 16:50:29 2015 New Revision: 1360 URL: http://tracker.coreboot.org/trac/openbios/changeset/1360
Log: SPARC64: introduce new Forth context stack (fcstack) for CPU contexts
The fcstack holds a stack of complete CPU states which can be used to enable re-entrant calls into Forth (e.g. when processing interrupts).
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/arch/sparc64/context.c trunk/openbios-devel/arch/sparc64/ldscript trunk/openbios-devel/include/arch/sparc64/io.h
Modified: trunk/openbios-devel/arch/sparc64/context.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/context.c Tue Dec 29 16:50:24 2015 (r1359) +++ trunk/openbios-devel/arch/sparc64/context.c Tue Dec 29 16:50:29 2015 (r1360) @@ -40,6 +40,10 @@ /* Pointer to startup context (physical address) */ unsigned long __boot_ctx;
+/* Pointer to Forth context stack */ +void *_fcstack_ptr = &_efcstack; + + /* * Main starter * This is the C function that runs first.
Modified: trunk/openbios-devel/arch/sparc64/ldscript ============================================================================== --- trunk/openbios-devel/arch/sparc64/ldscript Tue Dec 29 16:50:24 2015 (r1359) +++ trunk/openbios-devel/arch/sparc64/ldscript Tue Dec 29 16:50:29 2015 (r1360) @@ -50,6 +50,11 @@ *(.bss.*) *(COMMON)
+ _fcstack = .; + . += 32768; + . = ALIGN(16); + _efcstack = .; + _stack = .; . += STACK_SIZE; . = ALIGN(16);
Modified: trunk/openbios-devel/include/arch/sparc64/io.h ============================================================================== --- trunk/openbios-devel/include/arch/sparc64/io.h Tue Dec 29 16:50:24 2015 (r1359) +++ trunk/openbios-devel/include/arch/sparc64/io.h Tue Dec 29 16:50:29 2015 (r1360) @@ -9,7 +9,7 @@
extern unsigned long va_shift; // Set in entry.S // Defined in ldscript -extern char _start, _data, _stack, _estack, _end, _iomem; +extern char _start, _data, _stack, _estack, _fcstack, _efcstack, _end, _iomem;
// XXX check use and merge #define phys_to_virt(phys) ((void *) ((unsigned long) (phys)))