summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-10-24 17:38:40 +0000
committerjhb <jhb@FreeBSD.org>2001-10-24 17:38:40 +0000
commit2ab888f17b2c93c264994e23078f8aaaa5a81cbd (patch)
tree7402ce5c4ad569c3fc683d56a9f550ebffd6cc6e /sys/amd64
parentd21dd859f6a4af1b564c79f9848d875de721970c (diff)
downloadFreeBSD-src-2ab888f17b2c93c264994e23078f8aaaa5a81cbd.zip
FreeBSD-src-2ab888f17b2c93c264994e23078f8aaaa5a81cbd.tar.gz
- Clean up the comments slightly here to make them more readable.
- Set the type and trapframe number for the F00F workaround since type can be used later by sv_transtrap(). Debuggers might also want to look at the type in the trapframe. Submitted by: bde (mostly)
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/trap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index c08fc58..fd4c8fe 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;
}
OpenPOWER on IntegriCloud