diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2007-04-12 11:05:24 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2007-04-12 11:05:24 +0000 |
| commit | f76f6cfd25da6f568ab0d8063a566db727c6a1fc (patch) | |
| tree | 36ff6951e8c238426e379437426aeab248d363b0 | |
| parent | d62f5d4e5cd7f5aea196e45c253deab5605cc5a1 (diff) | |
Notes
| -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 7fa94581c716..15377bc363dd 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)); |
