x86_64: enable NX protection during AP bootstrap
This commit is contained in:
@@ -76,7 +76,7 @@ _L80A0:
|
|||||||
movl %ebx, %edi
|
movl %ebx, %edi
|
||||||
|
|
||||||
movl %cr4, %eax
|
movl %cr4, %eax
|
||||||
orl $0xb0, %eax
|
orl $0x20, %eax
|
||||||
movl %eax, %cr4
|
movl %eax, %cr4
|
||||||
|
|
||||||
movl $0x8ff8, %eax
|
movl $0x8ff8, %eax
|
||||||
@@ -85,8 +85,8 @@ _L80A0:
|
|||||||
|
|
||||||
movl $0xC0000080, %ecx
|
movl $0xC0000080, %ecx
|
||||||
rdmsr
|
rdmsr
|
||||||
# enable long mode and the 'syscall/sysret' instructions
|
# enable long mode, syscall/sysret, and NX protection
|
||||||
orl $0x00000101, %eax
|
orl $0x00000901, %eax
|
||||||
wrmsr
|
wrmsr
|
||||||
|
|
||||||
movl $0x8058, %eax
|
movl $0x8058, %eax
|
||||||
|
|||||||
Reference in New Issue
Block a user