global ASM_PFX(gPatchSmmCr3)\r
global ASM_PFX(gPatchSmmCr4)\r
global ASM_PFX(gPatchSmmCr0)\r
-global ASM_PFX(gSmmInitStack)\r
+global ASM_PFX(gPatchSmmInitStack)\r
global ASM_PFX(gcSmiInitGdtr)\r
global ASM_PFX(gcSmmInitSize)\r
global ASM_PFX(gcSmmInitTemplate)\r
\r
BITS 64\r
@LongMode: ; long-mode starts here\r
- DB 0x48, 0xbc ; mov rsp, imm64\r
-ASM_PFX(gSmmInitStack): DQ 0\r
+ mov rsp, strict qword 0 ; source operand will be patched\r
+ASM_PFX(gPatchSmmInitStack):\r
and sp, 0xfff0 ; make sure RSP is 16-byte aligned\r
;\r
; Accoring to X64 calling convention, XMM0~5 are volatile, we need to save\r