From: mickey Date: Fri, 4 Apr 1997 16:14:07 +0000 (+0000) Subject: add 'machine check' trap for Pentium and PPro cpus. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=44cbc57d32bf3b1f07db49a17a104ee3bac6680e;p=openbsd 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. --- 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