From f0ac84170bee6426a78e0d9673cbf553b58a17eb Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Fri, 4 Apr 1997 16:14:10 +0000 Subject: add 'machine check' trap for Pentium and PPro cpus. no special handler for it. i guess there will be rare cases when you receive it, and then you should repair your cpu, since it happens on internal cpu error. --- sys/arch/i386/i386/machdep.c | 3 ++- sys/arch/i386/i386/trap.c | 7 ++++--- sys/arch/i386/include/trap.h | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 31fe0448c5a..ab1953a6c8d 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.43 1997/04/02 22:02:55 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.44 1997/04/04 16:14:09 mickey Exp $ */ /* $NetBSD: machdep.c,v 1.202 1996/05/18 15:54:59 christos Exp $ */ /*- @@ -1223,6 +1223,7 @@ init386(first_avail) setgate(&idt[ 14], &IDTVEC(page), 0, SDT_SYS386TGT, SEL_KPL); setgate(&idt[ 16], &IDTVEC(fpu), 0, SDT_SYS386TGT, SEL_KPL); setgate(&idt[ 17], &IDTVEC(align), 0, SDT_SYS386TGT, SEL_KPL); + setgate(&idt[ 18], &IDTVEC(rsvd), 0, SDT_SYS386TGT, SEL_KPL); setgate(&idt[128], &IDTVEC(syscall), 0, SDT_SYS386TGT, SEL_UPL); setregion(®ion, gdt, sizeof(gdt) - 1); diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index ee4de907951..3b881de1436 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.20 1997/02/09 03:53:58 tholo Exp $ */ +/* $OpenBSD: trap.c,v 1.21 1997/04/04 16:14:09 mickey Exp $ */ /* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */ #undef DEBUG @@ -153,11 +153,12 @@ char *trap_type[] = { "bounds check fault", /* 11 T_BOUND */ "FPU not available fault", /* 12 T_DNA */ "double fault", /* 13 T_DOUBLEFLT */ - "FPU operand fetch fault", /* 14 T_FPOPFLT */ + "FPU operand fetch fault", /* 14 T_FPOPFLT (![P]Pro) */ "invalid TSS fault", /* 15 T_TSSFLT */ "segment not present fault", /* 16 T_SEGNPFLT */ "stack fault", /* 17 T_STKFLT */ - "reserved trap", /* 18 T_RESERVED */ + "machine check", /* 18 T_MACHK ([P]Pro) */ + "reserved trap", /* 19 T_RESERVED */ }; int trap_types = sizeof trap_type / sizeof trap_type[0]; diff --git a/sys/arch/i386/include/trap.h b/sys/arch/i386/include/trap.h index bb9c7bbb434..31980897b3e 100644 --- a/sys/arch/i386/include/trap.h +++ b/sys/arch/i386/include/trap.h @@ -57,11 +57,12 @@ #define T_BOUND 11 /* bounds check fault */ #define T_DNA 12 /* device not available fault */ #define T_DOUBLEFLT 13 /* double fault */ -#define T_FPOPFLT 14 /* fp coprocessor operand fetch fault */ +#define T_FPOPFLT 14 /* fp coprocessor operand fetch fault (![P]Pro)*/ #define T_TSSFLT 15 /* invalid tss fault */ #define T_SEGNPFLT 16 /* segment not present fault */ #define T_STKFLT 17 /* stack fault */ -#define T_RESERVED 18 /* reserved fault base */ +#define T_MACHK 18 /* machine check ([P]Pro) */ +#define T_RESERVED 19 /* reserved fault base */ /* Trap's coming from user mode */ #define T_USER 0x100 -- cgit v1.2.3