diff options
author | ru <ru@FreeBSD.org> | 2007-04-12 11:05:24 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2007-04-12 11:05:24 +0000 |
commit | 42495f7962eb4362e4ac5811597b1b694c49ff68 (patch) | |
tree | 36ff6951e8c238426e379437426aeab248d363b0 /sys/i386 | |
parent | aa1b17d5576937821d28262c38a19e6b915c67c7 (diff) | |
download | FreeBSD-src-42495f7962eb4362e4ac5811597b1b694c49ff68.zip FreeBSD-src-42495f7962eb4362e4ac5811597b1b694c49ff68.tar.gz |
Fix PAE on SMP by enabling EFER_NXE on all APs.
Reported by: kris
Diagnosed by: alc
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/mp_machdep.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 7fa9458..15377bc 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -577,6 +577,16 @@ init_secondary(void) /* set up SSE registers */ enable_sse(); +#ifdef PAE + /* Enable the PTE no-execute bit. */ + if ((amd_feature & AMDID_NX) != 0) { + uint64_t msr; + + msr = rdmsr(MSR_EFER) | EFER_NXE; + wrmsr(MSR_EFER, msr); + } +#endif + /* A quick check from sanity claus */ if (PCPU_GET(apic_id) != lapic_id()) { printf("SMP: cpuid = %d\n", PCPU_GET(cpuid)); |