]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm
UefiCpuPkg/PiSmmCpuDxeSmm: patch "XdSupported" with PatchInstructionX86()
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / X64 / SmiEntry.nasm
index 9971ae6f064a8023e4fd0047492fbfd89fa8a3b4..5d731e2280957a418f53b5707a60414ca9b7ab73 100644 (file)
@@ -54,7 +54,8 @@ extern ASM_PFX(CpuSmmDebugEntry)
 extern ASM_PFX(CpuSmmDebugExit)\r
 \r
 global ASM_PFX(gPatchSmbase)\r
 extern ASM_PFX(CpuSmmDebugExit)\r
 \r
 global ASM_PFX(gPatchSmbase)\r
-global ASM_PFX(mXdSupported)\r
+extern ASM_PFX(mXdSupported)\r
+global ASM_PFX(gPatchXdSupported)\r
 global ASM_PFX(gPatchSmiStack)\r
 global ASM_PFX(gPatchSmiCr3)\r
 global ASM_PFX(gcSmiHandlerTemplate)\r
 global ASM_PFX(gPatchSmiStack)\r
 global ASM_PFX(gPatchSmiCr3)\r
 global ASM_PFX(gcSmiHandlerTemplate)\r
@@ -118,8 +119,8 @@ ASM_PFX(gPatchSmiCr3):
     ltr     ax\r
 \r
 ; enable NXE if supported\r
     ltr     ax\r
 \r
 ; enable NXE if supported\r
-    DB      0xb0                        ; mov al, imm8\r
-ASM_PFX(mXdSupported):     DB      1\r
+    mov     al, strict byte 1           ; source operand may be patched\r
+ASM_PFX(gPatchXdSupported):\r
     cmp     al, 0\r
     jz      @SkipXd\r
 ;\r
     cmp     al, 0\r
     jz      @SkipXd\r
 ;\r