[OpenBIOS] r464 - openbios-devel/arch/ppc/qemu
svn at openbios.org
svn at openbios.org
Sun Mar 8 01:54:06 CET 2009
Author: laurent
Date: 2009-03-08 01:54:06 +0100 (Sun, 08 Mar 2009)
New Revision: 464
Modified:
openbios-devel/arch/ppc/qemu/start.S
Log:
Author: Alexander Graf <alex at csgraf.de>
PPC64: Switch to 32-bit mode in interrupts
All the code in OpenBIOS runs in 32 bits, which is fine. Now, when
an interrupt arrives, the 970 CPU automatically sets the MSR_SF bit,
making us run in 64 bit mode.
That breaks address calculation, because 'lis' and 'ba' get sign
extended.
In order to circumvent that mess, let's just go back to 32 bit mode
whenever we get an interrupt.
Signed-off-by: Alexander Graf <alex at csgraf.de>
Signed-off-by: Laurent Vivier <Laurent at vivier.eu>
Modified: openbios-devel/arch/ppc/qemu/start.S
===================================================================
--- openbios-devel/arch/ppc/qemu/start.S 2009-03-01 20:07:47 UTC (rev 463)
+++ openbios-devel/arch/ppc/qemu/start.S 2009-03-08 00:54:06 UTC (rev 464)
@@ -34,6 +34,9 @@
#define EXCEPTION_PREAMBLE_TEMPLATE \
mtsprg1 r1 ; /* scratch */ \
+ mfmsr r1 ; /* unset MSR_SF */ \
+ clrlwi r1,r1,0 ; \
+ mtmsr r1 ; \
mfsprg0 r1 ; /* exception stack in sprg0 */ \
.ifc ULONG_SIZE, 8 ; \
addi r1,r1,-(40 * ULONG_SIZE) ; /* push exception frame */ \
More information about the OpenBIOS
mailing list