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 <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Signed-off-by: Ted Kuo <ted.kuo@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Xie, Yuanhao 2023-03-21 15:29:59 +08:00 committed by mergify[bot]
parent 1bfc89414d
commit b1db096575
1 changed files with 1 additions and 0 deletions

View File

@ -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