mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use t_idt instead of idt inside setidt() if f00f_hack() has relocated the IDT.
Submitted by: Bruce Evans <bde@zeta.org.au>
This commit is contained in:
parent
03c0fb69f3
commit
622a086be3
2 changed files with 14 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue