mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Enable the no-execute feature in page tables
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user