diff options
| -rw-r--r-- | sys/amd64/amd64/machdep.c | 9 | ||||
| -rw-r--r-- | sys/i386/i386/machdep.c | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index b99f51506026..8f03687520e7 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; diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index b99f51506026..8f03687520e7 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/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; |
