From b1db09657546f4983a1ec18336b36212b5875c3f Mon Sep 17 00:00:00 2001 From: "Xie, Yuanhao" Date: Tue, 21 Mar 2023 15:29:59 +0800 Subject: UefiCpuPkg: Solve that stack top address is not mapped in pagetable For the case CPU logic index is 0, RSP points to the very top of all AP stacks. That address is not mapped in page table. Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Ted Kuo Reviewed-by: Ray Ni --- UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 1 + 1 file changed, 1 insertion(+) diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm index 9ebe317..5bcdf77 100644 --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm @@ -315,6 +315,7 @@ MwaitCheckGeneric: MwaitLoopGeneric: cli mov rax, rsp ; Set Monitor Address + sub eax, 8 ; To ensure the monitor address is in the page table xor ecx, ecx ; ecx = 0 xor edx, edx ; edx = 0 monitor -- cgit v1.1