aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2024-01-18 17:52:56 +0100
committerHelge Deller <deller@gmx.de>2024-01-18 17:52:56 +0100
commit6863b001b50319311daaba7a94c23764cd8bc271 (patch)
treebe3e969ca13a790bd84e9a275e16a548f0743567 /src
parentff9fd38c8dc1ba3b58550435ffc43858054d7f81 (diff)
downloadseabios-hppa-6863b001b50319311daaba7a94c23764cd8bc271.zip
seabios-hppa-6863b001b50319311daaba7a94c23764cd8bc271.tar.gz
seabios-hppa-6863b001b50319311daaba7a94c23764cd8bc271.tar.bz2
head: Install and use firmware fault handler
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/parisc/head.S26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/parisc/head.S b/src/parisc/head.S
index ff59680..c0f4c88 100644
--- a/src/parisc/head.S
+++ b/src/parisc/head.S
@@ -244,6 +244,10 @@ $smp_exit_loop:
rsm PSW_I, %r0 /* disable local irqs */
mtctl %r0, CR_EIEM
+ /* Load IVT to detect and report crashes */
+ load32_firmware BOOTADDR(firmware_default_ivt),%r1
+ mtctl %r1, CR_IVA
+
/* provide PDCE_PROC entry in arg0 (required on 64-bit) */
load32 MEM_PDC_ENTRY, %arg0
@@ -287,8 +291,11 @@ $bss_loop:
cmpb,<<,n %r3,%r4,$bss_loop
STREGM %r0,WORD_LEN(%r3)
- load32 BOOTADDR(start_parisc_firmware),%r3
- load_fw_upper32 %r3
+ /* Load IVT to detect and report crashes */
+ load32_firmware BOOTADDR(firmware_default_ivt),%r1
+ mtctl %r1, CR_IVA
+
+ load32_firmware BOOTADDR(start_parisc_firmware),%r3
bv 0(%r3)
copy %r0,%r2
END(startup)
@@ -426,6 +433,21 @@ ENTRY(smp_ivt)
.endr
END(smp_ivt)
+ .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
+ .set loop,loop+1
+ .endr
+END(smp_ivt)
+
+
/*******************************************************
PDC and IODC entry
*******************************************************/