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:
parent
d23cd7e5ff
commit
032fc3b190
|
@ -38,6 +38,13 @@
|
||||||
leal _kernel_pml4, %eax
|
leal _kernel_pml4, %eax
|
||||||
mov %eax, %cr3
|
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
|
* Install initial temporary environment that is replaced later by the
|
||||||
* environment that init_main_thread creates.
|
* environment that init_main_thread creates.
|
||||||
|
|
Loading…
Reference in New Issue