diff options
| author | Garrett Wollman <wollman@FreeBSD.org> | 1994-08-10 04:39:52 +0000 |
|---|---|---|
| committer | Garrett Wollman <wollman@FreeBSD.org> | 1994-08-10 04:39:52 +0000 |
| commit | 5c8b38d41d2a97fe321aee1f2f12b203eb405e52 (patch) | |
| tree | 367c17e55ce2ed70cf07bf609518a45ce613495f | |
| parent | d1d58d7209d15a80d40655614a4cf3d016b4ee86 (diff) | |
Notes
| -rw-r--r-- | sys/amd64/amd64/trap.c | 4 | ||||
| -rw-r--r-- | sys/amd64/isa/isa.c | 27 | ||||
| -rw-r--r-- | sys/i386/i386/trap.c | 4 | ||||
| -rw-r--r-- | sys/i386/isa/isa.c | 27 | ||||
| -rw-r--r-- | sys/kern/subr_trap.c | 4 |
5 files changed, 52 insertions, 14 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 7084791e3d14..21cdac65faee 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.26 1994/06/11 05:13:33 davidg Exp $ + * $Id: trap.c,v 1.27 1994/08/01 11:25:28 davidg Exp $ */ /* @@ -239,7 +239,7 @@ trap(frame) #endif /* machine/parity/power fail/"kitchen sink" faults */ if (isa_nmi(code) == 0) return; - /* FALL THROUGH */ + panic("NMI indicates hardware failure"); #endif case T_OFLOW: /* integer overflow fault */ diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index 32e59e754a3f..0daec32bd666 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: isa.c,v 1.16 1994/04/02 20:43:25 ache Exp $ + * $Id: isa.c,v 1.18 1994/05/25 08:59:24 rgrimes Exp $ */ /* @@ -587,6 +587,12 @@ isa_freephysmem(caddr_t va, unsigned length) { } } +#define NMI_PARITY (1 << 7) +#define NMI_IOCHAN (1 << 6) +#define ENMI_WATCHDOG (1 << 7) +#define ENMI_BUSTIMER (1 << 6) +#define ENMI_IOSTATUS (1 << 5) + /* * Handle a NMI, possibly a machine check. * return true to panic system, false to ignore. @@ -595,9 +601,22 @@ int isa_nmi(cd) int cd; { - - log(LOG_CRIT, "\nNMI port 61 %x, port 70 %x\n", inb(0x61), inb(0x70)); - return(0); + int isa_port = inb(0x61); + int eisa_port = inb(0x461); + if(isa_port & NMI_PARITY) { + panic("RAM parity error, likely hardware failure."); + } else if(isa_port & NMI_IOCHAN) { + panic("I/O channel check, likely hardware failure."); + } else if(eisa_port & ENMI_WATCHDOG) { + panic("EISA watchdog timer expired, likely hardware failure."); + } else if(eisa_port & ENMI_BUSTIMER) { + panic("EISA bus timeout, likely hardware failure."); + } else 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); + } } /* diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 7084791e3d14..21cdac65faee 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.26 1994/06/11 05:13:33 davidg Exp $ + * $Id: trap.c,v 1.27 1994/08/01 11:25:28 davidg Exp $ */ /* @@ -239,7 +239,7 @@ trap(frame) #endif /* machine/parity/power fail/"kitchen sink" faults */ if (isa_nmi(code) == 0) return; - /* FALL THROUGH */ + panic("NMI indicates hardware failure"); #endif case T_OFLOW: /* integer overflow fault */ diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c index 32e59e754a3f..0daec32bd666 100644 --- a/sys/i386/isa/isa.c +++ b/sys/i386/isa/isa.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: isa.c,v 1.16 1994/04/02 20:43:25 ache Exp $ + * $Id: isa.c,v 1.18 1994/05/25 08:59:24 rgrimes Exp $ */ /* @@ -587,6 +587,12 @@ isa_freephysmem(caddr_t va, unsigned length) { } } +#define NMI_PARITY (1 << 7) +#define NMI_IOCHAN (1 << 6) +#define ENMI_WATCHDOG (1 << 7) +#define ENMI_BUSTIMER (1 << 6) +#define ENMI_IOSTATUS (1 << 5) + /* * Handle a NMI, possibly a machine check. * return true to panic system, false to ignore. @@ -595,9 +601,22 @@ int isa_nmi(cd) int cd; { - - log(LOG_CRIT, "\nNMI port 61 %x, port 70 %x\n", inb(0x61), inb(0x70)); - return(0); + int isa_port = inb(0x61); + int eisa_port = inb(0x461); + if(isa_port & NMI_PARITY) { + panic("RAM parity error, likely hardware failure."); + } else if(isa_port & NMI_IOCHAN) { + panic("I/O channel check, likely hardware failure."); + } else if(eisa_port & ENMI_WATCHDOG) { + panic("EISA watchdog timer expired, likely hardware failure."); + } else if(eisa_port & ENMI_BUSTIMER) { + panic("EISA bus timeout, likely hardware failure."); + } else 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); + } } /* diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 7084791e3d14..21cdac65faee 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.26 1994/06/11 05:13:33 davidg Exp $ + * $Id: trap.c,v 1.27 1994/08/01 11:25:28 davidg Exp $ */ /* @@ -239,7 +239,7 @@ trap(frame) #endif /* machine/parity/power fail/"kitchen sink" faults */ if (isa_nmi(code) == 0) return; - /* FALL THROUGH */ + panic("NMI indicates hardware failure"); #endif case T_OFLOW: /* integer overflow fault */ |
