[OpenBIOS] [PATCH] SPARC32 : Clear FP register

Olivier DANET odanet at caramail.com
Tue Jan 22 22:37:13 CET 2013


The Frame Pointer register is used in "__switch_context_nosave" (switch.S) which is called at the end of
the startup sequence (entry.S). This register should be initialized before use.
(The SparcV8 standard states, page 75 : "Supervisor software may not assume that any particular
processor or memory state, except for the PSR’s ET and S bits, has been initialized after a reset trap."

diff a/openbios-devel/arch/sparc32/entry.S b/openbios-devel/arch/sparc32/entry.S
--- a/openbios-devel/arch/sparc32/entry.S
+++ b/openbios-devel/arch/sparc32/entry.S
@@ -452,6 +452,7 @@ highmem:
         wr     %g3, PSR_ET, %psr
         WRITE_PAUSE
 
+        set     0, %fp
         call    __switch_context_nosave
          nop

Signed-off-by: Olivier DANET <odanet at caramail.com>



More information about the OpenBIOS mailing list