summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authormckay <mckay@FreeBSD.org>1997-09-28 15:48:34 +0000
committermckay <mckay@FreeBSD.org>1997-09-28 15:48:34 +0000
commit2ff71b2b2174c8381b220f009215775dc016889f (patch)
treecc8cee0b20c766c946ba6d6d74dc8f515c4e6f13 /sys/i386
parentce03b01dcee6a5231dcfe64b4fbeff14922276f5 (diff)
downloadFreeBSD-src-2ff71b2b2174c8381b220f009215775dc016889f.zip
FreeBSD-src-2ff71b2b2174c8381b220f009215775dc016889f.tar.gz
Add a small hack to support the strange antics of the Unisys ELI 4003. This
machine generates an NMI for each floating point error, just like an old XT. Since it is ISA only, reading the EISA status port yields 0xff, which would give a spurious EISA panic. The simplest thing to do is to ignore the 0xff.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/isa/intr_machdep.c32
-rw-r--r--sys/i386/isa/nmi.c32
2 files changed, 44 insertions, 20 deletions
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