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
This commit is contained in:
ps 2000-07-14 11:49:44 +00:00
parent 2d06929aed
commit b436e36344
3 changed files with 48 additions and 42 deletions

View File

@ -369,14 +369,15 @@ restart:
#ifdef POWERFAIL_NMI
goto handle_powerfail;
#else /* !POWERFAIL_NMI */
#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;
#endif /* DDB */
/* machine/parity/power fail/"kitchen sink" faults */
if (isa_nmi(code) == 0) return;
if (isa_nmi(code) == 0) {
#ifdef DDB
/* NMI can be hooked up to a pushbutton for debugging */
printf ("NMI ... going to debugger\n");
kdb_trap (type, 0, &frame);
#endif /* DDB */
return;
}
panic("NMI indicates hardware failure");
#endif /* POWERFAIL_NMI */
#endif /* NISA > 0 */
@ -573,14 +574,15 @@ kernel_trap:
return;
}
#else /* !POWERFAIL_NMI */
#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;
#endif /* DDB */
/* machine/parity/power fail/"kitchen sink" faults */
if (isa_nmi(code) == 0) return;
if (isa_nmi(code) == 0) {
#ifdef DDB
/* NMI can be hooked up to a pushbutton for debugging */
printf ("NMI ... going to debugger\n");
kdb_trap (type, 0, &frame);
#endif /* DDB */
return;
}
/* FALL THROUGH */
#endif /* POWERFAIL_NMI */
#endif /* NISA > 0 */

View File

@ -369,14 +369,15 @@ restart:
#ifdef POWERFAIL_NMI
goto handle_powerfail;
#else /* !POWERFAIL_NMI */
#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;
#endif /* DDB */
/* machine/parity/power fail/"kitchen sink" faults */
if (isa_nmi(code) == 0) return;
if (isa_nmi(code) == 0) {
#ifdef DDB
/* NMI can be hooked up to a pushbutton for debugging */
printf ("NMI ... going to debugger\n");
kdb_trap (type, 0, &frame);
#endif /* DDB */
return;
}
panic("NMI indicates hardware failure");
#endif /* POWERFAIL_NMI */
#endif /* NISA > 0 */
@ -573,14 +574,15 @@ kernel_trap:
return;
}
#else /* !POWERFAIL_NMI */
#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;
#endif /* DDB */
/* machine/parity/power fail/"kitchen sink" faults */
if (isa_nmi(code) == 0) return;
if (isa_nmi(code) == 0) {
#ifdef DDB
/* NMI can be hooked up to a pushbutton for debugging */
printf ("NMI ... going to debugger\n");
kdb_trap (type, 0, &frame);
#endif /* DDB */
return;
}
/* FALL THROUGH */
#endif /* POWERFAIL_NMI */
#endif /* NISA > 0 */

View File

@ -369,14 +369,15 @@ restart:
#ifdef POWERFAIL_NMI
goto handle_powerfail;
#else /* !POWERFAIL_NMI */
#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;
#endif /* DDB */
/* machine/parity/power fail/"kitchen sink" faults */
if (isa_nmi(code) == 0) return;
if (isa_nmi(code) == 0) {
#ifdef DDB
/* NMI can be hooked up to a pushbutton for debugging */
printf ("NMI ... going to debugger\n");
kdb_trap (type, 0, &frame);
#endif /* DDB */
return;
}
panic("NMI indicates hardware failure");
#endif /* POWERFAIL_NMI */
#endif /* NISA > 0 */
@ -573,14 +574,15 @@ kernel_trap:
return;
}
#else /* !POWERFAIL_NMI */
#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;
#endif /* DDB */
/* machine/parity/power fail/"kitchen sink" faults */
if (isa_nmi(code) == 0) return;
if (isa_nmi(code) == 0) {
#ifdef DDB
/* NMI can be hooked up to a pushbutton for debugging */
printf ("NMI ... going to debugger\n");
kdb_trap (type, 0, &frame);
#endif /* DDB */
return;
}
/* FALL THROUGH */
#endif /* POWERFAIL_NMI */
#endif /* NISA > 0 */