Enable the no-execute feature in page tables

This commit is contained in:
Philipp Oppermann
2015-09-02 20:36:03 +02:00
parent 2655ac093c
commit 23e8270a60

View File

@@ -68,7 +68,8 @@ enable_paging:
; set the long mode bit in the EFER MSR (model specific register)
mov ecx, 0xC0000080
rdmsr
or eax, 1 << 8
or eax, 1 << 8 ; enable long mode
or eax, 1 << 11 ; enable no-execute bit in page tables
wrmsr
; enable paging in the cr0 register