summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorGuo Dong <guo.dong@intel.com>2021-01-07 07:53:23 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-01-12 06:35:30 +0000
commitedd74ad3ad79b855f76d9cf60a96c405cb3e863b (patch)
tree6e04d1e6d15833beff169a13fcd740a2154f6539 /UefiCpuPkg
parente992cc3f4859f653d6a42c4d600c80378759901a (diff)
downloadedk2-edd74ad3ad79b855f76d9cf60a96c405cb3e863b.tar.gz
edk2-edd74ad3ad79b855f76d9cf60a96c405cb3e863b.tar.bz2
edk2-edd74ad3ad79b855f76d9cf60a96c405cb3e863b.zip
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>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm8
1 files changed, 4 insertions, 4 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
index 5532a1d391..aecfd07bc0 100644
--- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
+++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
@@ -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