mirror of https://github.com/acidanthera/audk.git
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:
parent
1bfc89414d
commit
b1db096575
|
@ -315,6 +315,7 @@ MwaitCheckGeneric:
|
||||||
MwaitLoopGeneric:
|
MwaitLoopGeneric:
|
||||||
cli
|
cli
|
||||||
mov rax, rsp ; Set Monitor Address
|
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 ecx, ecx ; ecx = 0
|
||||||
xor edx, edx ; edx = 0
|
xor edx, edx ; edx = 0
|
||||||
monitor
|
monitor
|
||||||
|
|
Loading…
Reference in New Issue