UefiCpuPkg/MpInitLib: Fix a hang in above 4GB case

This patch fixed the hang in UEFICpuPkg when it is dispatched above 4GB.
In UEFI BIOS case CpuInfoInHob is provided to DXE under 4GB from PEI.
When using UEFI payload and bootloaders, CpuInfoInHob will be allocated
above 4GB since it is not provided from bootloader. so we need update
the code to make sure this hob could be accessed correctly in this case.

Signed-off-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Guo Dong 2021-01-07 07:53:23 +08:00 committed by mergify[bot]
parent e992cc3f48
commit edd74ad3ad
1 changed files with 4 additions and 4 deletions

View File

@ -303,17 +303,17 @@ GetProcessorNumber:
;
xor ebx, ebx
lea eax, [esi + CpuInfoLocation]
mov edi, [eax]
mov rdi, [eax]
GetNextProcNumber:
cmp dword [edi], edx ; APIC ID match?
cmp dword [rdi], edx ; APIC ID match?
jz ProgramStack
add edi, 20
add rdi, 20
inc ebx
jmp GetNextProcNumber
ProgramStack:
mov rsp, qword [edi + 12]
mov rsp, qword [rdi + 12]
CProcedureInvoke:
push rbp ; Push BIST data at top of AP stack