summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/trap.c
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2000-07-14 11:49:44 +0000
committerps <ps@FreeBSD.org>2000-07-14 11:49:44 +0000
commitb436e363443a1a03f98797ed042606d9b80e8f7e (patch)
treec47394fdb1ce78132c57822b987a4544009c5477 /sys/amd64/amd64/trap.c
parent2d06929aedd53838560a0c034a53f4bc8abe9ea4 (diff)
downloadFreeBSD-src-b436e363443a1a03f98797ed042606d9b80e8f7e.zip
FreeBSD-src-b436e363443a1a03f98797ed042606d9b80e8f7e.tar.gz
Change the way NMI's are handled. Before, if DDB was enabled and
a NMI occured, you could type continue in DDB and the kernel would not attempt to detect what type of NMI was recieved. Now we check for the type of NMI first and then go to DDB if it is enabled. This will solve the problem with having DDB enabled and getting an NMI due to some possibly bad error and being able to continue the operation of the kernel when you really want to panic and know what happened. Submitted by: jhb
Diffstat (limited to 'sys/amd64/amd64/trap.c')
-rw-r--r--sys/amd64/amd64/trap.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index 83c83b4..3f87909 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -369,14 +369,15 @@ restart:
#ifdef POWERFAIL_NMI
goto handle_powerfail;
#else /* !POWERFAIL_NMI */
+ /* machine/parity/power fail/"kitchen sink" faults */
+ if (isa_nmi(code) == 0) {
#ifdef DDB
- /* NMI can be hooked up to a pushbutton for debugging */
- printf ("NMI ... going to debugger\n");
- if (kdb_trap (type, 0, &frame))
- return;
+ /* NMI can be hooked up to a pushbutton for debugging */
+ printf ("NMI ... going to debugger\n");
+ kdb_trap (type, 0, &frame);
#endif /* DDB */
- /* machine/parity/power fail/"kitchen sink" faults */
- if (isa_nmi(code) == 0) return;
+ return;
+ }
panic("NMI indicates hardware failure");
#endif /* POWERFAIL_NMI */
#endif /* NISA > 0 */
@@ -573,14 +574,15 @@ kernel_trap:
return;
}
#else /* !POWERFAIL_NMI */
+ /* machine/parity/power fail/"kitchen sink" faults */
+ if (isa_nmi(code) == 0) {
#ifdef DDB
- /* NMI can be hooked up to a pushbutton for debugging */
- printf ("NMI ... going to debugger\n");
- if (kdb_trap (type, 0, &frame))
- return;
+ /* NMI can be hooked up to a pushbutton for debugging */
+ printf ("NMI ... going to debugger\n");
+ kdb_trap (type, 0, &frame);
#endif /* DDB */
- /* machine/parity/power fail/"kitchen sink" faults */
- if (isa_nmi(code) == 0) return;
+ return;
+ }
/* FALL THROUGH */
#endif /* POWERFAIL_NMI */
#endif /* NISA > 0 */
OpenPOWER on IntegriCloud