Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc64/sparc64 Allow probes to kernel addresses th...



details:   https://anonhg.NetBSD.org/src/rev/fbc9c3b6716d
branches:  trunk
changeset: 511520:fbc9c3b6716d
user:      eeh <eeh%NetBSD.org@localhost>
date:      Thu Jun 21 00:10:49 2001 +0000

description:
Allow probes to kernel addresses that generate access errors not panic the machine.

diffstat:

 sys/arch/sparc64/sparc64/trap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 5debe3d30fc5 -r fbc9c3b6716d sys/arch/sparc64/sparc64/trap.c
--- a/sys/arch/sparc64/sparc64/trap.c   Thu Jun 21 00:08:02 2001 +0000
+++ b/sys/arch/sparc64/sparc64/trap.c   Thu Jun 21 00:10:49 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.67 2001/06/07 15:31:16 mrg Exp $ */
+/*     $NetBSD: trap.c,v 1.68 2001/06/21 00:10:49 eeh Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -1287,10 +1287,12 @@
         * then things are really bizarre, and we treat it as a hard
         * error and pass it on to memerr4m. 
         */
+       onfault = p->p_addr ? (long)p->p_addr->u_pcb.pcb_onfault : 0;
        if ((afsr) != 0 ||
            (type == T_DATAFAULT && !(sfsr & SFSR_FV))) {
                printf("data memory error type %x sfsr=%lx sfva=%lx afsr=%lx afva=%lx tf=%p\n",
                       type, sfsr, sfva, afsr, afva, tf);
+               if (onfault) goto kfault;
                if (tstate & (PSTATE_PRIV<<TSTATE_PSTATE_SHIFT))
                        panic("trap: memory error");
 
@@ -1416,8 +1418,6 @@
 fault:
                if (tstate & (PSTATE_PRIV<<TSTATE_PSTATE_SHIFT)) {
 kfault:
-                       onfault = p->p_addr ?
-                           (long)p->p_addr->u_pcb.pcb_onfault : 0;
                        if (!onfault) {
                                extern int trap_trace_dis;
                                char buf[768];



Home | Main Index | Thread Index | Old Index