From 390fe86657066805cb64f48befc7614c28109c7d Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 3 May 2023 19:20:07 +0100 Subject: [PATCH] x86_64: enable NX protection during AP bootstrap --- arch/x86_64/acpi/ap_trampoline.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86_64/acpi/ap_trampoline.S b/arch/x86_64/acpi/ap_trampoline.S index 4c8519a..94cd87c 100644 --- a/arch/x86_64/acpi/ap_trampoline.S +++ b/arch/x86_64/acpi/ap_trampoline.S @@ -76,7 +76,7 @@ _L80A0: movl %ebx, %edi movl %cr4, %eax - orl $0xb0, %eax + orl $0x20, %eax movl %eax, %cr4 movl $0x8ff8, %eax @@ -85,8 +85,8 @@ _L80A0: movl $0xC0000080, %ecx rdmsr - # enable long mode and the 'syscall/sysret' instructions - orl $0x00000101, %eax + # enable long mode, syscall/sysret, and NX protection + orl $0x00000901, %eax wrmsr movl $0x8058, %eax