diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2005-10-26 20:33:00 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2005-10-26 20:33:00 +0000 |
commit | 7346b863f3bdb8c5d53dc3d466ef9072332acaa1 (patch) | |
tree | 95f2e3aa50fdf2841772e963fc7a958ab5d08faa /sys | |
parent | fd94bc876ef0669419fc6ff53f59df62559c9be0 (diff) |
Add basic handler for MCE and MCA. Written mostly by toby@ and commiting for
toby@ per his request.
ok marco@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/locore.s | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/i386/i386/trap.c | 5 | ||||
-rw-r--r-- | sys/arch/i386/include/trap.h | 5 |
4 files changed, 17 insertions, 10 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 0abb7535f56..09abd823477 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.92 2005/09/14 05:38:48 marco Exp $ */ +/* $OpenBSD: locore.s,v 1.93 2005/10/26 20:32:59 marco Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -2043,6 +2043,10 @@ IDTVEC(page) TRAP(T_PAGEFLT) IDTVEC(rsvd) ZTRAP(T_RESERVED) +IDTVEC(mchk) + ZTRAP(T_MACHK) +IDTVEC(simd) + ZTRAP(T_XFTRAP) IDTVEC(intrspurious) /* * The Pentium Pro local APIC may erroneously call this vector for a diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 281efed98fc..8ba5161d065 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.325 2005/09/23 02:03:44 brad Exp $ */ +/* $OpenBSD: machdep.c,v 1.326 2005/10/26 20:32:59 marco Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -2658,8 +2658,8 @@ setsegment(sd, base, limit, type, dpl, def32, gran) extern int IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl), IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(dble), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), - IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), IDTVEC(syscall), - IDTVEC(osyscall); + IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), IDTVEC(syscall), IDTVEC(mchk), + IDTVEC(osyscall), IDTVEC(simd); #if defined(I586_CPU) extern int IDTVEC(f00f_redirect); @@ -2779,8 +2779,9 @@ init386(paddr_t first_avail) setgate(&idt[ 15], &IDTVEC(rsvd), 0, SDT_SYS386TGT, SEL_KPL, GCODE_SEL); setgate(&idt[ 16], &IDTVEC(fpu), 0, SDT_SYS386TGT, SEL_KPL, GCODE_SEL); setgate(&idt[ 17], &IDTVEC(align), 0, SDT_SYS386TGT, SEL_KPL, GCODE_SEL); - setgate(&idt[ 18], &IDTVEC(rsvd), 0, SDT_SYS386TGT, SEL_KPL, GCODE_SEL); - for (i = 19; i < NRSVIDT; i++) + setgate(&idt[ 18], &IDTVEC(mchk), 0, SDT_SYS386TGT, SEL_KPL, GCODE_SEL); + setgate(&idt[ 19], &IDTVEC(simd), 0, SDT_SYS386TGT, SEL_KPL, GCODE_SEL); + for (i = 20; i < NRSVIDT; i++) setgate(&idt[i], &IDTVEC(rsvd), 0, SDT_SYS386TGT, SEL_KPL, GCODE_SEL); for (i = NRSVIDT; i < NIDT; i++) unsetgate(&idt[i]); diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 27f7b7e0850..d7662211ac1 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.71 2005/09/15 21:14:27 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.72 2005/10/26 20:32:59 marco Exp $ */ /* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */ /*- @@ -155,7 +155,8 @@ char *trap_type[] = { "segment not present fault", /* 16 T_SEGNPFLT */ "stack fault", /* 17 T_STKFLT */ "machine check", /* 18 T_MACHK ([P]Pro) */ - "reserved trap", /* 19 T_RESERVED */ + "SIMD FP fault", /* 19 T_XFTRAP */ + "reserved trap", /* 20 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 51346cfbecd..652bfbf9f1b 100644 --- a/sys/arch/i386/include/trap.h +++ b/sys/arch/i386/include/trap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.h,v 1.4 2003/06/02 23:27:47 millert Exp $ */ +/* $OpenBSD: trap.h,v 1.5 2005/10/26 20:32:59 marco Exp $ */ /* $NetBSD: trap.h,v 1.4 1994/10/27 04:16:30 cgd Exp $ */ /*- @@ -59,7 +59,8 @@ #define T_SEGNPFLT 16 /* segment not present fault */ #define T_STKFLT 17 /* stack fault */ #define T_MACHK 18 /* machine check ([P]Pro) */ -#define T_RESERVED 19 /* reserved fault base */ +#define T_XFTRAP 19 /* SIMD FP exception */ +#define T_RESERVED 20 /* reserved fault base */ /* Trap's coming from user mode */ #define T_USER 0x100 |