mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Author: Alexander Graf <alex@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@csgraf.de> Signed-off-by: Laurent Vivier <Laurent@vivier.eu> git-svn-id: svn://coreboot.org/openbios/openbios-devel@464 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Laurent Vivier
parent
2da21531b5
commit
5973871ed2
@@ -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 */ \
|
||||
|
||||
Reference in New Issue
Block a user