diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-01-09 00:24:26 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-01-09 00:24:26 +0000 |
commit | 6e8e09357e8965d1620d5dfa3f58ce9180ad630a (patch) | |
tree | aa3f62eb014e8330779bc8791ca639962d1c4d0a /sys/arch/mvme88k | |
parent | 66bbd0685a95885c1bc3ee90357512adeb1c0f8a (diff) |
Do not keep a round-robin list of the previous traps for debug purposes on
88100 anymore - it's stable well enough now...
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/eh.S | 5 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/trap.c | 55 |
2 files changed, 29 insertions, 31 deletions
diff --git a/sys/arch/mvme88k/mvme88k/eh.S b/sys/arch/mvme88k/mvme88k/eh.S index 7d07609c4c5..571d9408f20 100644 --- a/sys/arch/mvme88k/mvme88k/eh.S +++ b/sys/arch/mvme88k/mvme88k/eh.S @@ -1,4 +1,4 @@ -/* $OpenBSD: eh.S,v 1.46 2003/11/03 06:54:26 david Exp $ */ +/* $OpenBSD: eh.S,v 1.47 2004/01/09 00:24:25 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -345,9 +345,6 @@ ASLOCAL(Lbadcpupanic) /* TMP2 now free -- use to set EF_VECTOR */ \ or TMP2, r0, NUM ; \ st TMP2, r31, REG_OFF(EF_VECTOR) ; \ - /* TMP3 also free -- use to set last_vector */ \ - or.u TMP3, r0, hi16(_C_LABEL(last_vector)) ; \ - st TMP2, TMP3, lo16(_C_LABEL(last_vector)) ; \ /* Clear any bits in the SSBR (held in TMP) */ \ /* SSBR_STUFF may be empty, though. */ \ SSBR_STUFF ; \ diff --git a/sys/arch/mvme88k/mvme88k/trap.c b/sys/arch/mvme88k/mvme88k/trap.c index 050e1fc7ae2..5b2c3ad7a83 100644 --- a/sys/arch/mvme88k/mvme88k/trap.c +++ b/sys/arch/mvme88k/mvme88k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.63 2004/01/02 23:45:03 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.64 2004/01/09 00:24:25 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -165,18 +165,33 @@ panictrap(int type, struct m88100_saved_state *frame) static int panicing = 0; if (panicing++ == 0) { - if (type == 2 && cputyp == CPU_88100) { - /* instruction exception */ - db_printf("\nInstr access fault (%s) v = %x, frame %p\n", - pbus_exception_type[(frame->ipfsr >> 16) & 0x7], - frame->sxip & XIP_ADDR, frame); - } else if (type == 3 && cputyp == CPU_88100) { - /* data access exception */ - db_printf("\nData access fault (%s) v = %x, frame %p\n", - pbus_exception_type[(frame->dpfsr >> 16) & 0x7], - frame->sxip & XIP_ADDR, frame); - } else - db_printf("\ntrap type %d, v = %x, frame %p\n", type, frame->sxip & XIP_ADDR, frame); + switch (cputyp) { +#ifdef M88100 + case CPU_88100: + if (type == 2) { + /* instruction exception */ + db_printf("\nInstr access fault (%s) v = %x, " + "frame %p\n", + pbus_exception_type[(frame->ipfsr >> 16) & 0x7], + frame->sxip & XIP_ADDR, frame); + } else if (type == 3) { + /* data access exception */ + db_printf("\nData access fault (%s) v = %x, " + "frame %p\n", + pbus_exception_type[(frame->dpfsr >> 16) & 0x7], + frame->sxip & XIP_ADDR, frame); + } else + db_printf("\nTrap type %d, v = %x, frame %p\n", + type, frame->sxip & XIP_ADDR, frame); + break; +#endif +#ifdef M88110 + case CPU_88110: + db_printf("\nTrap type %d, v = %x, frame %p\n", + type, frame->exip, frame); + break; +#endif + } regdump(frame); } #endif @@ -188,9 +203,6 @@ panictrap(int type, struct m88100_saved_state *frame) } #ifdef M88100 -unsigned last_trap[4] = {0,0,0,0}; -unsigned last_vector = 0; - void m88100_trap(unsigned type, struct m88100_saved_state *frame) { @@ -216,12 +228,6 @@ m88100_trap(unsigned type, struct m88100_saved_state *frame) extern caddr_t guarded_access_end; extern caddr_t guarded_access_bad; - if (type != last_trap[3]) { - last_trap[0] = last_trap[1]; - last_trap[1] = last_trap[2]; - last_trap[2] = last_trap[3]; - last_trap[3] = type; - } uvmexp.traps++; if ((p = curproc) == NULL) p = &proc0; @@ -1150,11 +1156,6 @@ error_fatal(struct m88100_saved_state *frame) break; } regdump((struct trapframe*)frame); -#ifdef M88100 - db_printf("trap trace %d -> %d -> %d -> %d ", last_trap[0], last_trap[1], last_trap[2], last_trap[3]); - db_printf("last exception vector = %d\n", last_vector); -#endif - Debugger(); #endif /* DDB */ panic("unrecoverable exception %d", frame->vector); } |