[OpenBIOS] [PATCH 4/4] ppc: Avoid vector overlap on ppc64
Andreas Färber
andreas.faerber at web.de
Mon Nov 1 21:56:56 CET 2010
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.
Cc: Alexander Graf <agraf at suse.de>
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
arch/ppc/qemu/start.S | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S
index 0be69d9..b81e108 100644
--- a/arch/ppc/qemu/start.S
+++ b/arch/ppc/qemu/start.S
@@ -204,6 +204,18 @@ GLOBL(__vectors):
1: nop //
b 1b
+call_dsi_exception:
+ load(r3, dsi_exception)
+ mtctr r3
+ bctrl
+ b exception_return
+
+call_isi_exception:
+ load(r3, isi_exception)
+ mtctr r3
+ bctrl
+ b exception_return
+
exception_return:
EXCEPTION_EPILOGUE
@@ -220,17 +232,15 @@ ILLEGAL_VECTOR( 0x200 )
VECTOR( 0x300, "DSI" ):
EXCEPTION_PREAMBLE
- load(r3, dsi_exception)
- mtctr r3
- bctrl
- b exception_return
+ b call_dsi_exception
+
+ILLEGAL_VECTOR( 0x380 )
VECTOR( 0x400, "ISI" ):
EXCEPTION_PREAMBLE
- load(r3, isi_exception)
- mtctr r3
- bctrl
- b exception_return
+ b call_isi_exception
+
+ILLEGAL_VECTOR( 0x480 )
ILLEGAL_VECTOR( 0x500 )
ILLEGAL_VECTOR( 0x600 )
--
1.7.3
More information about the OpenBIOS
mailing list