From a33cbf355e3fc9dfcfead16ecaaa6812520399c1 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 23 Oct 2001 22:29:16 +0000 Subject: [PATCH] Set the code and signal for the F00F hack fault directly instead of changing the code in the trapframe and looping back to the top of trap again. Tested by: cjc --- sys/amd64/amd64/trap.c | 10 +++------- sys/i386/i386/trap.c | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index bbe69b45d080..c08fc58e782a 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -214,11 +214,6 @@ trap(frame) } eva = 0; - -#if defined(I586_CPU) && !defined(NO_F00F_HACK) -restart: -#endif - type = frame.tf_trapno; code = frame.tf_err; @@ -294,8 +289,9 @@ restart: * f00f hack workaround has triggered, treat * as illegal instruction not page fault. */ - frame.tf_trapno = T_PRIVINFLT; - goto restart; + ucode = T_PRIVINFLT; + i = SIGILL; + break; } #endif if (i == -1) diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index bbe69b45d080..c08fc58e782a 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -214,11 +214,6 @@ trap(frame) } eva = 0; - -#if defined(I586_CPU) && !defined(NO_F00F_HACK) -restart: -#endif - type = frame.tf_trapno; code = frame.tf_err; @@ -294,8 +289,9 @@ restart: * f00f hack workaround has triggered, treat * as illegal instruction not page fault. */ - frame.tf_trapno = T_PRIVINFLT; - goto restart; + ucode = T_PRIVINFLT; + i = SIGILL; + break; } #endif if (i == -1)