1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

After consultation with David, change

#ifndef NO_F00F_HACK
to
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
This commit is contained in:
Jordan K. Hubbard 1997-12-04 14:35:40 +00:00
parent fe8cc63f6d
commit e41b6f2db7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31535
7 changed files with 29 additions and 29 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
* $Id: identcpu.c,v 1.33 1997/11/07 08:52:27 phk Exp $
* $Id: identcpu.c,v 1.34 1997/12/03 02:45:42 sef Exp $
*/
#include "opt_cpu.h"
@ -107,7 +107,7 @@ do_cpuid(u_long ax, u_long *p)
);
}
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
int has_f00f_bug = 0;
#endif
@ -140,7 +140,7 @@ printcpuinfo(void)
break;
case 0x500:
strcat(cpu_model, "Pentium"); /* nb no space */
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
/*
* XXX - If/when Intel fixes the bug, this
* should also check the version of the

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.275 1997/12/03 02:45:46 sef Exp $
* $Id: machdep.c,v 1.276 1997/12/03 16:27:33 sef Exp $
*/
#include "apm.h"
@ -866,7 +866,7 @@ u_int my_tr; /* which task register setting */
#endif /* VM86 */
#endif
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@ -1539,7 +1539,7 @@ init386(first)
proc0.p_addr->u_pcb.pcb_ext = 0;
}
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
void f00f_hack(void);
SYSINIT(f00f_hack, SI_SUB_INTRINSIC, SI_ORDER_FIRST, f00f_hack, NULL);
@ -1571,7 +1571,7 @@ f00f_hack(void) {
panic("vm_map_protect failed");
return;
}
#endif /* NO_F00F_HACK */
#endif /* defined(I586_CPU) && !NO_F00F_HACK */
int
ptrace_set_pc(p, addr)

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.115 1997/11/24 13:25:37 bde Exp $
* $Id: trap.c,v 1.116 1997/12/03 02:45:50 sef Exp $
*/
/*
@ -142,7 +142,7 @@ static char *trap_msg[] = {
static void userret __P((struct proc *p, struct trapframe *frame,
u_quad_t oticks));
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
extern struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@ -216,7 +216,7 @@ trap(frame)
u_long eva;
#endif
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
#endif
type = frame.tf_trapno;
@ -284,7 +284,7 @@ trap(frame)
i = trap_pfault(&frame, TRUE);
if (i == -1)
return;
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if (i == -2)
goto restart;
#endif
@ -660,7 +660,7 @@ trap_pfault(frame, usermode)
* treat it is as an illegal instruction, and not a page
* fault.
*/
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if ((eva == (unsigned int)&t_idt[6]) && has_f00f_bug) {
frame->tf_trapno = T_PRIVINFLT;
return -2;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
* $Id: identcpu.c,v 1.33 1997/11/07 08:52:27 phk Exp $
* $Id: identcpu.c,v 1.34 1997/12/03 02:45:42 sef Exp $
*/
#include "opt_cpu.h"
@ -107,7 +107,7 @@ do_cpuid(u_long ax, u_long *p)
);
}
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
int has_f00f_bug = 0;
#endif
@ -140,7 +140,7 @@ printcpuinfo(void)
break;
case 0x500:
strcat(cpu_model, "Pentium"); /* nb no space */
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
/*
* XXX - If/when Intel fixes the bug, this
* should also check the version of the

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.275 1997/12/03 02:45:46 sef Exp $
* $Id: machdep.c,v 1.276 1997/12/03 16:27:33 sef Exp $
*/
#include "apm.h"
@ -866,7 +866,7 @@ u_int my_tr; /* which task register setting */
#endif /* VM86 */
#endif
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@ -1539,7 +1539,7 @@ init386(first)
proc0.p_addr->u_pcb.pcb_ext = 0;
}
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
void f00f_hack(void);
SYSINIT(f00f_hack, SI_SUB_INTRINSIC, SI_ORDER_FIRST, f00f_hack, NULL);
@ -1571,7 +1571,7 @@ f00f_hack(void) {
panic("vm_map_protect failed");
return;
}
#endif /* NO_F00F_HACK */
#endif /* defined(I586_CPU) && !NO_F00F_HACK */
int
ptrace_set_pc(p, addr)

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.115 1997/11/24 13:25:37 bde Exp $
* $Id: trap.c,v 1.116 1997/12/03 02:45:50 sef Exp $
*/
/*
@ -142,7 +142,7 @@ static char *trap_msg[] = {
static void userret __P((struct proc *p, struct trapframe *frame,
u_quad_t oticks));
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
extern struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@ -216,7 +216,7 @@ trap(frame)
u_long eva;
#endif
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
#endif
type = frame.tf_trapno;
@ -284,7 +284,7 @@ trap(frame)
i = trap_pfault(&frame, TRUE);
if (i == -1)
return;
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if (i == -2)
goto restart;
#endif
@ -660,7 +660,7 @@ trap_pfault(frame, usermode)
* treat it is as an illegal instruction, and not a page
* fault.
*/
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if ((eva == (unsigned int)&t_idt[6]) && has_f00f_bug) {
frame->tf_trapno = T_PRIVINFLT;
return -2;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.115 1997/11/24 13:25:37 bde Exp $
* $Id: trap.c,v 1.116 1997/12/03 02:45:50 sef Exp $
*/
/*
@ -142,7 +142,7 @@ static char *trap_msg[] = {
static void userret __P((struct proc *p, struct trapframe *frame,
u_quad_t oticks));
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
extern struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@ -216,7 +216,7 @@ trap(frame)
u_long eva;
#endif
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
restart:
#endif
type = frame.tf_trapno;
@ -284,7 +284,7 @@ trap(frame)
i = trap_pfault(&frame, TRUE);
if (i == -1)
return;
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if (i == -2)
goto restart;
#endif
@ -660,7 +660,7 @@ trap_pfault(frame, usermode)
* treat it is as an illegal instruction, and not a page
* fault.
*/
#ifndef NO_F00F_HACK
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if ((eva == (unsigned int)&t_idt[6]) && has_f00f_bug) {
frame->tf_trapno = T_PRIVINFLT;
return -2;