[OpenBIOS] [PATCH] ppc: Don't do relative branches from relocated memory

Andreas Färber andreas.faerber at web.de
Sun Feb 24 23:32:51 CET 2013

On startup, OpenBIOS copies exception vectors to 0x00000000.
Therefore jumps cannot be performed relative to the compile-time address
to outside the relocated exception vectors.

QEMU's g3beige and mac99 did not run into this so far, but prep does.

Signed-off-by: Andreas Färber <andreas.faerber at web.de>
 arch/ppc/qemu/start.S |    4 +++-
 1 Datei geändert, 3 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S
index 5c86d74..66987a0 100644
--- a/arch/ppc/qemu/start.S
+++ b/arch/ppc/qemu/start.S
@@ -302,7 +302,9 @@ trap_error:
 VECTOR( 0x100, "SRE" ):
-        b       _entry
+    LOAD_REG_IMMEDIATE(r3, _entry)
+    mtctr r3
+    bctr

More information about the OpenBIOS mailing list