Fix PAE on SMP by enabling EFER_NXE on all APs.
Reported by: kris Diagnosed by: alc
This commit is contained in:
parent
d62f5d4e5c
commit
f76f6cfd25
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user