summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/trap.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-06-18 14:32:21 +0000
committerbde <bde@FreeBSD.org>1999-06-18 14:32:21 +0000
commit72f8c1311e27806ce9eb0083b1c7fc2f556fd3a2 (patch)
tree8c997750c061f4eb3e486241e34a34dc83eb8f72 /sys/amd64/amd64/trap.c
parent97705ed6e4ac0c801217439c360072830d00cf8b (diff)
downloadFreeBSD-src-72f8c1311e27806ce9eb0083b1c7fc2f556fd3a2.zip
FreeBSD-src-72f8c1311e27806ce9eb0083b1c7fc2f556fd3a2.tar.gz
Changed the global `idt' from an array to a pointer so that npx.c
automatically hacks on the active copy of the IDT if f00f_hack() has changed it. This also allows simplifications in setidt(). This fixes breakage of FP exception handling by rev.1.55 of sys/kernel.h. FP exceptions were sent to npx.c's probe handlers because npx.c "restored" the old handlers to the wrong copy of the IDT. The SYSINIT for f00f_hack() was purposely run quite late to avoid problems like this, but it is bogusly associated with the SYSINIT for proc0 so it was moved with the latter. Problem reported and fix tested by: Martin Cracauer <cracauer@cons.org>
Diffstat (limited to 'sys/amd64/amd64/trap.c')
-rw-r--r--sys/amd64/amd64/trap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index df6e295..1d9d216 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.137 1999/05/06 18:12:17 peter Exp $
+ * $Id: trap.c,v 1.138 1999/06/01 18:19:47 jlemon Exp $
*/
/*
@@ -147,7 +147,6 @@ static __inline void userret __P((struct proc *p, struct trapframe *frame,
u_quad_t oticks));
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
-extern struct gate_descriptor *t_idt;
extern int has_f00f_bug;
#endif
@@ -727,7 +726,7 @@ trap_pfault(frame, usermode, eva)
* fault.
*/
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
- if ((eva == (unsigned int)&t_idt[6]) && has_f00f_bug) {
+ if ((eva == (unsigned int)&idt[6]) && has_f00f_bug) {
frame->tf_trapno = T_PRIVINFLT;
return -2;
}
OpenPOWER on IntegriCloud