summaryrefslogtreecommitdiffstats
path: root/sys/i386/i386/trap.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-11-08 09:51:55 +0000
committerkib <kib@FreeBSD.org>2016-11-08 09:51:55 +0000
commita3e133014e94cc2e557752605ad6f8b0e56d4690 (patch)
tree13a9c112ab5cb66730c3889b1a5a4fd2534b094a /sys/i386/i386/trap.c
parent34220e95e22c15bfebb37450b79acbeb94374cc4 (diff)
downloadFreeBSD-src-a3e133014e94cc2e557752605ad6f8b0e56d4690.zip
FreeBSD-src-a3e133014e94cc2e557752605ad6f8b0e56d4690.tar.gz
MFC r307866:
Handle broadcast NMIs. MFC r307880: Follow-up to r307866. MFC r308030: Use correct cpu id in the banner.
Diffstat (limited to 'sys/i386/i386/trap.c')
-rw-r--r--sys/i386/i386/trap.c42
1 files changed, 3 insertions, 39 deletions
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index 3decfd43..3cf0c5a 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -158,14 +158,6 @@ static char *trap_msg[] = {
int has_f00f_bug = 0; /* Initialized so that it can be patched. */
#endif
-#ifdef KDB
-static int kdb_on_nmi = 1;
-SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RWTUN,
- &kdb_on_nmi, 0, "Go to KDB on NMI");
-#endif
-static int panic_on_nmi = 1;
-SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RWTUN,
- &panic_on_nmi, 0, "Panic on NMI");
static int prot_fault_translation = 0;
SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RW,
&prot_fault_translation, 0, "Select signal to deliver on protection fault");
@@ -467,21 +459,7 @@ user_trctrap_out:
}
goto userout;
#else /* !POWERFAIL_NMI */
- /* machine/parity/power fail/"kitchen sink" faults */
- if (isa_nmi(frame->tf_err) == 0) {
-#ifdef KDB
- /*
- * NMI can be hooked up to a pushbutton
- * for debugging.
- */
- if (kdb_on_nmi) {
- printf ("NMI ... going to debugger\n");
- kdb_trap(type, 0, frame);
- }
-#endif /* KDB */
- goto userout;
- } else if (panic_on_nmi)
- panic("NMI indicates hardware failure");
+ nmi_handle_intr(type, frame);
break;
#endif /* POWERFAIL_NMI */
#endif /* DEV_ISA */
@@ -730,22 +708,8 @@ kernel_trctrap:
}
goto out;
#else /* !POWERFAIL_NMI */
- /* machine/parity/power fail/"kitchen sink" faults */
- if (isa_nmi(frame->tf_err) == 0) {
-#ifdef KDB
- /*
- * NMI can be hooked up to a pushbutton
- * for debugging.
- */
- if (kdb_on_nmi) {
- printf ("NMI ... going to debugger\n");
- kdb_trap(type, 0, frame);
- }
-#endif /* KDB */
- goto out;
- } else if (panic_on_nmi == 0)
- goto out;
- /* FALLTHROUGH */
+ nmi_handle_intr(type, frame);
+ goto out;
#endif /* POWERFAIL_NMI */
#endif /* DEV_ISA */
}
OpenPOWER on IntegriCloud