diff options
author | Helge Deller <deller@gmx.de> | 2024-02-03 00:01:30 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-02-06 22:47:50 +0100 |
commit | 5e1a44b6164d633899a02256ea184a6f99c567e5 (patch) | |
tree | 6bbe6c32267d1a903d6c21d6192dd955e267d2b3 /src/parisc/head.S | |
parent | c4cd02ac32d4859949c5ace783cb9a478831c3eb (diff) | |
download | seabios-hppa-5e1a44b6164d633899a02256ea184a6f99c567e5.zip seabios-hppa-5e1a44b6164d633899a02256ea184a6f99c567e5.tar.gz seabios-hppa-5e1a44b6164d633899a02256ea184a6f99c567e5.tar.bz2 |
parisc: Skip HPMC during bootup
We may trigger HPMCs (= trap #1) while probing various I/O addresses for
devices. If suc a HPMC is reported by qemu, simply ignore it and return
to the next address behind the caller.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'src/parisc/head.S')
-rw-r--r-- | src/parisc/head.S | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/src/parisc/head.S b/src/parisc/head.S index c5da942..4f2b5b5 100644 --- a/src/parisc/head.S +++ b/src/parisc/head.S @@ -441,17 +441,43 @@ ENTRY(smp_ivt) .endr END(smp_ivt) +/******************************************************* + Fault detection & reporting Interrupt vector table (IVT) + *******************************************************/ + +/* fault happened at bootup. Return to instruction after fault. */ +ENTRY(fault_return_to_caller) + mfctl %cr18,TEMP + ldo 4(TEMP),TEMP + mtctl TEMP,%cr18 /* IIAOQ head */ + ldo 4(TEMP),TEMP + mtctl TEMP,%cr18 /* IIAOQ tail */ + rfi + nop +END(fault_return_to_caller) + +/* call firmware_fault_handler in parisc.c and halt. */ +ENTRY(fault_call_firmware) + load32_firmware firmware_fault_handler,TEMP + loadgp + bv,n 0(TEMP) +END(fault_call_firmware) + .align 32 ENTRY(firmware_default_ivt) /* to detect crashes */ .set loop,0 .import firmware_fault_handler,code .rept 32 - .align 32 - load32_firmware firmware_fault_handler,%arg0 - loadgp - bv 0(%arg0) - ldi loop,%arg0 + /* Make sure to use shadow registers only! */ + /* While booting up we check if various devices are available. + Allow such checks and do not raise an HPMC. */ + ldi loop,TEMP /* trap# into TEMP */ + cmpib,= 1,TEMP,fault_return_to_caller + nop + b fault_call_firmware + ldi loop,%arg0 /* trap# into arg0 */ .set loop,loop+1 + .align 32 .endr END(smp_ivt) |