diff --git a/arch/x86_64/asm/rt0_32.s b/arch/x86_64/asm/rt0_32.s index 4e6fc3f..59ffdc2 100644 --- a/arch/x86_64/asm/rt0_32.s +++ b/arch/x86_64/asm/rt0_32.s @@ -297,10 +297,11 @@ _rt0_enter_long_mode: or eax, 1 << 5 mov cr4, eax - ; Now enable long mode by modifying the EFER MSR + ; Now enable long mode (bit 8) and the no-execute support (bit 11) by + ; modifying the EFER MSR mov ecx, 0xc0000080 rdmsr ; read msr value to eax - or eax, 1 << 8 + or eax, (1 << 8) | (1<<11) wrmsr ; Finally enable paging