diff options
author | tegge <tegge@FreeBSD.org> | 1998-03-05 19:37:03 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1998-03-05 19:37:03 +0000 |
commit | 3705591ee2750bfa0500fab05f978a75561afcd7 (patch) | |
tree | de05c17a919235fc46ef1274d229656413f0bcdb /sys/amd64 | |
parent | 7def2566b9da1b93b8368c272bf2fb4be44269b6 (diff) | |
download | FreeBSD-src-3705591ee2750bfa0500fab05f978a75561afcd7.zip FreeBSD-src-3705591ee2750bfa0500fab05f978a75561afcd7.tar.gz |
Use t_idt instead of idt inside setidt() if f00f_hack() has relocated the IDT.
Submitted by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index b99f515..8f03687 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.289 1998/02/09 04:45:53 eivind Exp $ + * $Id: machdep.c,v 1.290 1998/03/02 05:47:50 peter Exp $ */ #include "apm.h" @@ -1055,8 +1055,13 @@ setidt(idx, func, typ, dpl, selec) int dpl; int selec; { - struct gate_descriptor *ip = idt + idx; + struct gate_descriptor *ip; +#if defined(I586_CPU) && !defined(NO_F00F_HACK) + ip = (t_idt != NULL ? t_idt : idt) + idx; +#else + ip = idt + idx; +#endif ip->gd_looffset = (int)func; ip->gd_selector = selec; ip->gd_stkcpy = 0; |