summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-10-24 17:38:40 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-10-24 17:38:40 +0000
commitc5ca5a55a1042de99ab805c46c097ddee0201c3a (patch)
tree7402ce5c4ad569c3fc683d56a9f550ebffd6cc6e
parente41febc84bf8630e945f4e839c04fde106509681 (diff)
Notes
-rw-r--r--sys/amd64/amd64/trap.c10
-rw-r--r--sys/i386/i386/trap.c10
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index c08fc58e782a..fd4c8fe9080d 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -286,10 +286,14 @@ trap(frame)
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if (i == -2) {
/*
- * f00f hack workaround has triggered, treat
- * as illegal instruction not page fault.
+ * The f00f hack workaround has triggered, so
+ * treat the fault as an illegal instruction
+ * (T_PRIVINFLT) instead of a page fault.
*/
- ucode = T_PRIVINFLT;
+ type = frame.tf_trapno = T_PRIVINFLT;
+
+ /* Proceed as in that case. */
+ ucode = type;
i = SIGILL;
break;
}
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index c08fc58e782a..fd4c8fe9080d 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -286,10 +286,14 @@ trap(frame)
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
if (i == -2) {
/*
- * f00f hack workaround has triggered, treat
- * as illegal instruction not page fault.
+ * The f00f hack workaround has triggered, so
+ * treat the fault as an illegal instruction
+ * (T_PRIVINFLT) instead of a page fault.
*/
- ucode = T_PRIVINFLT;
+ type = frame.tf_trapno = T_PRIVINFLT;
+
+ /* Proceed as in that case. */
+ ucode = type;
i = SIGILL;
break;
}