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 <[email protected]>
Cc: Ray Ni <[email protected]>
Cc: Sean Rhodes <[email protected]>
Cc: James Lu <[email protected]>
Cc: Gua Guo <[email protected]>
Signed-off-by: Ted Kuo <[email protected]>
---
 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 9ebe31795b..5bcdf7726b 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
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101480): https://edk2.groups.io/g/devel/message/101480
Mute This Topic: https://groups.io/mt/97750173/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to