hw_x86_64: Enable IA-32e mode and execute-disable

Set bits 8 (LME) and 11 (NXE) in the IA32_EFER MSR to enable IA-32e mode
and execute-disable.
This commit is contained in:
Reto Buerki 2015-02-11 15:46:30 +01:00 committed by Christian Helmuth
parent d23cd7e5ff
commit 032fc3b190
1 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,13 @@
leal _kernel_pml4, %eax
mov %eax, %cr3
/* Enable IA-32e mode and execute-disable */
movl $0xc0000080, %ecx
rdmsr
btsl $8, %eax
btsl $11, %eax
wrmsr
/*
* Install initial temporary environment that is replaced later by the
* environment that init_main_thread creates.