summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authordavem <davem@cvs.openbsd.org>1995-10-23 11:07:14 +0000
committerdavem <davem@cvs.openbsd.org>1995-10-23 11:07:14 +0000
commit6f0f0dc94ccc98a5a887606b17a9b84b520a9a5f (patch)
treee73e898c25b0ec32a54f3905a5f75a69f6091556 /sys
parent0ba699dfe97c4aebcd2caae04453736c53af6a23 (diff)
Make the bootup data/text fault trap table entries jump to memfault_bootup
which will watchdog the machine for post-mortem examination.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/locore.s12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s
index af2bdfc65b2..a227ca8abe3 100644
--- a/sys/arch/sparc/sparc/locore.s
+++ b/sys/arch/sparc/sparc/locore.s
@@ -333,7 +333,7 @@ start:
_trapbase:
/* trap 0 is special since we cannot receive it */
b dostart; nop; nop; nop ! 00 = reset (fake)
- VTRAP(T_TEXTFAULT, 0) ! 01 = instr. fetch fault (backpatch to memfault)
+ VTRAP(T_TEXTFAULT, memfault_bootup) ! 01 = instr. fetch fault (backpatch to memfault)
TRAP(T_ILLINST) ! 02 = illegal instruction
TRAP(T_PRIVINST) ! 03 = privileged instruction
TRAP(T_FPDISABLED) ! 04 = fp instr, but EF bit off in psr
@@ -341,7 +341,7 @@ _trapbase:
WINDOW_UF ! 06 = window underflow
TRAP(T_ALIGN) ! 07 = address alignment error
VTRAP(T_FPE, fp_exception) ! 08 = fp exception
- VTRAP(T_DATAFAULT, 0) ! 09 = data fetch fault (backpatch to memfault)
+ VTRAP(T_DATAFAULT, memfault_bootup) ! 09 = data fetch fault (backpatch to memfault)
TRAP(T_TAGOF) ! 0a = tag overflow
UTRAP(0x0b)
UTRAP(0x0c)
@@ -1287,6 +1287,14 @@ normal_mem_fault:
b return_from_trap ! go return
wr %l0, 0, %psr ! (but first disable traps again)
+/* At bootup, we have to point the data/text fault trap table entry
+ * somewhere by default. Make the machine watchdog so that we can
+ * see what happened by looking at %tbr and %pc under the PROM.
+ */
+memfault_bootup:
+ call 0
+ nop
+ /* NOTREACHED */
/*
* fp_exception has to check to see if we are trying to save