summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/isa/intr_machdep.c32
-rw-r--r--sys/amd64/isa/nmi.c32
-rw-r--r--sys/i386/isa/intr_machdep.c32
-rw-r--r--sys/i386/isa/nmi.c32
4 files changed, 88 insertions, 40 deletions
diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c
index fd836dd..80ae7b8 100644
--- a/sys/amd64/isa/intr_machdep.c
+++ b/sys/amd64/isa/intr_machdep.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.5 1997/08/29 18:45:19 fsmp Exp $
+ * $Id: intr_machdep.c,v 1.6 1997/08/30 08:08:04 fsmp Exp $
*/
#include "opt_auto_eoi.h"
@@ -150,20 +150,32 @@ isa_nmi(cd)
#else /* IBM-PC */
int isa_port = inb(0x61);
int eisa_port = inb(0x461);
- if(isa_port & NMI_PARITY) {
+
+ if (isa_port & NMI_PARITY)
panic("RAM parity error, likely hardware failure.");
- } else if(isa_port & NMI_IOCHAN) {
+
+ if (isa_port & NMI_IOCHAN)
panic("I/O channel check, likely hardware failure.");
- } else if(eisa_port & ENMI_WATCHDOG) {
+
+ /*
+ * On a real EISA machine, this will never happen. However it can
+ * happen on ISA machines which implement XT style floating point
+ * error handling (very rare). Save them from a meaningless panic.
+ */
+ if (eisa_port == 0xff)
+ return(0);
+
+ if (eisa_port & ENMI_WATCHDOG)
panic("EISA watchdog timer expired, likely hardware failure.");
- } else if(eisa_port & ENMI_BUSTIMER) {
+
+ if (eisa_port & ENMI_BUSTIMER)
panic("EISA bus timeout, likely hardware failure.");
- } else if(eisa_port & ENMI_IOSTATUS) {
+
+ if (eisa_port & ENMI_IOSTATUS)
panic("EISA I/O port status error.");
- } else {
- printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
- return(0);
- }
+
+ printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
+ return(0);
#endif
}
diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c
index fd836dd..80ae7b8 100644
--- a/sys/amd64/isa/nmi.c
+++ b/sys/amd64/isa/nmi.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.5 1997/08/29 18:45:19 fsmp Exp $
+ * $Id: intr_machdep.c,v 1.6 1997/08/30 08:08:04 fsmp Exp $
*/
#include "opt_auto_eoi.h"
@@ -150,20 +150,32 @@ isa_nmi(cd)
#else /* IBM-PC */
int isa_port = inb(0x61);
int eisa_port = inb(0x461);
- if(isa_port & NMI_PARITY) {
+
+ if (isa_port & NMI_PARITY)
panic("RAM parity error, likely hardware failure.");
- } else if(isa_port & NMI_IOCHAN) {
+
+ if (isa_port & NMI_IOCHAN)
panic("I/O channel check, likely hardware failure.");
- } else if(eisa_port & ENMI_WATCHDOG) {
+
+ /*
+ * On a real EISA machine, this will never happen. However it can
+ * happen on ISA machines which implement XT style floating point
+ * error handling (very rare). Save them from a meaningless panic.
+ */
+ if (eisa_port == 0xff)
+ return(0);
+
+ if (eisa_port & ENMI_WATCHDOG)
panic("EISA watchdog timer expired, likely hardware failure.");
- } else if(eisa_port & ENMI_BUSTIMER) {
+
+ if (eisa_port & ENMI_BUSTIMER)
panic("EISA bus timeout, likely hardware failure.");
- } else if(eisa_port & ENMI_IOSTATUS) {
+
+ if (eisa_port & ENMI_IOSTATUS)
panic("EISA I/O port status error.");
- } else {
- printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
- return(0);
- }
+
+ printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
+ return(0);
#endif
}
diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c
index fd836dd..80ae7b8 100644
--- a/sys/i386/isa/intr_machdep.c
+++ b/sys/i386/isa/intr_machdep.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.5 1997/08/29 18:45:19 fsmp Exp $
+ * $Id: intr_machdep.c,v 1.6 1997/08/30 08:08:04 fsmp Exp $
*/
#include "opt_auto_eoi.h"
@@ -150,20 +150,32 @@ isa_nmi(cd)
#else /* IBM-PC */
int isa_port = inb(0x61);
int eisa_port = inb(0x461);
- if(isa_port & NMI_PARITY) {
+
+ if (isa_port & NMI_PARITY)
panic("RAM parity error, likely hardware failure.");
- } else if(isa_port & NMI_IOCHAN) {
+
+ if (isa_port & NMI_IOCHAN)
panic("I/O channel check, likely hardware failure.");
- } else if(eisa_port & ENMI_WATCHDOG) {
+
+ /*
+ * On a real EISA machine, this will never happen. However it can
+ * happen on ISA machines which implement XT style floating point
+ * error handling (very rare). Save them from a meaningless panic.
+ */
+ if (eisa_port == 0xff)
+ return(0);
+
+ if (eisa_port & ENMI_WATCHDOG)
panic("EISA watchdog timer expired, likely hardware failure.");
- } else if(eisa_port & ENMI_BUSTIMER) {
+
+ if (eisa_port & ENMI_BUSTIMER)
panic("EISA bus timeout, likely hardware failure.");
- } else if(eisa_port & ENMI_IOSTATUS) {
+
+ if (eisa_port & ENMI_IOSTATUS)
panic("EISA I/O port status error.");
- } else {
- printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
- return(0);
- }
+
+ printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
+ return(0);
#endif
}
diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c
index fd836dd..80ae7b8 100644
--- a/sys/i386/isa/nmi.c
+++ b/sys/i386/isa/nmi.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.5 1997/08/29 18:45:19 fsmp Exp $
+ * $Id: intr_machdep.c,v 1.6 1997/08/30 08:08:04 fsmp Exp $
*/
#include "opt_auto_eoi.h"
@@ -150,20 +150,32 @@ isa_nmi(cd)
#else /* IBM-PC */
int isa_port = inb(0x61);
int eisa_port = inb(0x461);
- if(isa_port & NMI_PARITY) {
+
+ if (isa_port & NMI_PARITY)
panic("RAM parity error, likely hardware failure.");
- } else if(isa_port & NMI_IOCHAN) {
+
+ if (isa_port & NMI_IOCHAN)
panic("I/O channel check, likely hardware failure.");
- } else if(eisa_port & ENMI_WATCHDOG) {
+
+ /*
+ * On a real EISA machine, this will never happen. However it can
+ * happen on ISA machines which implement XT style floating point
+ * error handling (very rare). Save them from a meaningless panic.
+ */
+ if (eisa_port == 0xff)
+ return(0);
+
+ if (eisa_port & ENMI_WATCHDOG)
panic("EISA watchdog timer expired, likely hardware failure.");
- } else if(eisa_port & ENMI_BUSTIMER) {
+
+ if (eisa_port & ENMI_BUSTIMER)
panic("EISA bus timeout, likely hardware failure.");
- } else if(eisa_port & ENMI_IOSTATUS) {
+
+ if (eisa_port & ENMI_IOSTATUS)
panic("EISA I/O port status error.");
- } else {
- printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
- return(0);
- }
+
+ printf("\nNMI ISA %x, EISA %x\n", isa_port, eisa_port);
+ return(0);
#endif
}
OpenPOWER on IntegriCloud