x86_64: pmap: enable NX protection during bootstrap
This commit is contained in:
@@ -29,3 +29,14 @@ gigabyte_pages:
|
||||
3: pop %rbx
|
||||
pop %rbp
|
||||
ret
|
||||
|
||||
.global enable_nx
|
||||
.type enable_nx, @function
|
||||
|
||||
enable_nx:
|
||||
mov $0xC0000080, %ecx
|
||||
rdmsr
|
||||
or $0x800, %eax
|
||||
wrmsr
|
||||
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user