diff options
author | Xie, Yuanhao <yuanhao.xie@intel.com> | 2023-03-21 15:29:59 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-03-27 05:08:15 +0000 |
commit | b1db09657546f4983a1ec18336b36212b5875c3f (patch) | |
tree | 524f0d2614579e0db9121f77b048af3cf673b3d1 /UefiCpuPkg | |
parent | 1bfc89414dbc2b4e620e06231ae98d714914fc46 (diff) | |
download | edk2-b1db09657546f4983a1ec18336b36212b5875c3f.tar.gz edk2-b1db09657546f4983a1ec18336b36212b5875c3f.tar.bz2 edk2-b1db09657546f4983a1ec18336b36212b5875c3f.zip |
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>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 1 |
1 files changed, 1 insertions, 0 deletions
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
|