summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2004-02-25 23:12:39 +0000
committerpeter <peter@FreeBSD.org>2004-02-25 23:12:39 +0000
commit8b23ea5630bf30dc0b5ae2c3fc53e737387fa8cd (patch)
treed2c7551e507fbf763edeb8b5830bc7b23b6db2d6
parent79ae057bef0a8c333d2cf506a7a5928ed2f67b34 (diff)
downloadFreeBSD-src-8b23ea5630bf30dc0b5ae2c3fc53e737387fa8cd.zip
FreeBSD-src-8b23ea5630bf30dc0b5ae2c3fc53e737387fa8cd.tar.gz
Since we don't use PG_NX yet, don't turn on EFER_NXE quite yet. This needs
to be done based on the cpuid bits. AMD says that we should test the cpuid features bits for certain things, such as this.
-rw-r--r--sys/amd64/amd64/machdep.c2
-rw-r--r--sys/amd64/amd64/mpboot.S4
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index d6bd710..3f0b159 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1104,9 +1104,11 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
#error "have you forgotten the isa device?";
#endif
+#if 0 /* Not till we test the features bit */
/* Turn on PTE NX (no execute) bit */
msr = rdmsr(MSR_EFER) | EFER_NXE;
wrmsr(MSR_EFER, msr);
+#endif
proc0.p_uarea = (struct user *)(physfree + KERNBASE);
bzero(proc0.p_uarea, UAREA_PAGES * PAGE_SIZE);
diff --git a/sys/amd64/amd64/mpboot.S b/sys/amd64/amd64/mpboot.S
index ca53a87..8d049b4 100644
--- a/sys/amd64/amd64/mpboot.S
+++ b/sys/amd64/amd64/mpboot.S
@@ -102,7 +102,11 @@ protmode:
*/
movl $MSR_EFER, %ecx
rdmsr
+#if 0 /* not till we test the NX cpuid bits */
orl $EFER_LME | EFER_SCE | EFER_NXE, %eax
+#else
+ orl $EFER_LME | EFER_SCE, %eax
+#endif
wrmsr
/*
OpenPOWER on IntegriCloud