From 2ff71b2b2174c8381b220f009215775dc016889f Mon Sep 17 00:00:00 2001 From: mckay Date: Sun, 28 Sep 1997 15:48:34 +0000 Subject: 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. --- sys/i386/isa/nmi.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'sys/i386/isa/nmi.c') 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 } -- cgit v1.1