[OpenBIOS] [commit] r945 - trunk/openbios-devel/arch/ppc/qemu

repository service svn at openbios.org
Tue Nov 2 23:16:33 CET 2010


Author: afaerber
Date: Tue Nov  2 23:16:32 2010
New Revision: 945
URL: http://tracker.coreboot.org/trac/openbios/changeset/945

Log:
ppc: Avoid vector overlap on ppc64

Due to the 64-bit immediate load sequence, the ISI and DSI vectors
are two instructions too long for the respective segment exceptions.

Move the code to the start of the relocated vector region and do a
relative branch there.

v2:
* load() -> LOAD_REG_IMMEDIATE()

Signed-off-by: Andreas Färber <andreas.faerber at web.de>
Acked-by: Alexander Graf <agraf at suse.de>

Modified:
   trunk/openbios-devel/arch/ppc/qemu/start.S

Modified: trunk/openbios-devel/arch/ppc/qemu/start.S
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/start.S	Tue Nov  2 23:13:24 2010	(r944)
+++ trunk/openbios-devel/arch/ppc/qemu/start.S	Tue Nov  2 23:16:32 2010	(r945)
@@ -186,6 +186,18 @@
 1:	nop			//
 	b	1b
 
+call_dsi_exception:
+	LOAD_REG_IMMEDIATE(r3, dsi_exception)
+	mtctr	r3
+	bctrl
+	b	exception_return
+
+call_isi_exception:
+	LOAD_REG_IMMEDIATE(r3, isi_exception)
+	mtctr	r3
+	bctrl
+	b	exception_return
+
 exception_return:
 	EXCEPTION_EPILOGUE
 
@@ -202,17 +214,15 @@
 
 VECTOR( 0x300, "DSI" ):
 	EXCEPTION_PREAMBLE
-	LOAD_REG_IMMEDIATE(r3, dsi_exception)
-	mtctr	r3
-	bctrl
-	b	exception_return
+	b	call_dsi_exception
+
+ILLEGAL_VECTOR( 0x380 )
 
 VECTOR( 0x400, "ISI" ):
 	EXCEPTION_PREAMBLE
-	LOAD_REG_IMMEDIATE(r3, isi_exception)
-	mtctr	r3
-	bctrl
-	b	exception_return
+	b	call_isi_exception
+
+ILLEGAL_VECTOR( 0x480 )
 
 	ILLEGAL_VECTOR( 0x500 )
 	ILLEGAL_VECTOR( 0x600 )



More information about the OpenBIOS mailing list