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@web.de>
Acked-by: Alexander Graf <agraf@suse.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@945 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Andreas Färber
2010-11-02 22:16:32 +00:00
committed by Andreas Färber
parent 814bcd10cd
commit cddf823b54

View File

@@ -186,6 +186,18 @@ GLOBL(__vectors):
1: nop // 1: nop //
b 1b 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_return:
EXCEPTION_EPILOGUE EXCEPTION_EPILOGUE
@@ -202,17 +214,15 @@ ILLEGAL_VECTOR( 0x200 )
VECTOR( 0x300, "DSI" ): VECTOR( 0x300, "DSI" ):
EXCEPTION_PREAMBLE EXCEPTION_PREAMBLE
LOAD_REG_IMMEDIATE(r3, dsi_exception) b call_dsi_exception
mtctr r3
bctrl ILLEGAL_VECTOR( 0x380 )
b exception_return
VECTOR( 0x400, "ISI" ): VECTOR( 0x400, "ISI" ):
EXCEPTION_PREAMBLE EXCEPTION_PREAMBLE
LOAD_REG_IMMEDIATE(r3, isi_exception) b call_isi_exception
mtctr r3
bctrl ILLEGAL_VECTOR( 0x480 )
b exception_return
ILLEGAL_VECTOR( 0x500 ) ILLEGAL_VECTOR( 0x500 )
ILLEGAL_VECTOR( 0x600 ) ILLEGAL_VECTOR( 0x600 )