diff mbox

[edk2,3/4] UefiCpuPkg/MpInitLib/X64/MpFuncs.nasm: fix fatal typo

Message ID 20161117001754.4383-4-lersek@redhat.com
State New
Headers show

Commit Message

Laszlo Ersek Nov. 17, 2016, 12:17 a.m. UTC
The recent patch "UefiCpuPkg/MpInitLib: Program AP stack in fixed address"
inadvertently broke the first startup of APs during X64 PEI, because in
the TestLock section of the code, it replaced the access to the
NumApsExecuting counter with an access to the unrelated InitFlag field.

Cc: Jeff Fan <jeff.fan@intel.com>
Fixes: 845c5be1fd9bf7edfac4a103dfab70829686978f
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
index 6a8794d83b5d..138b97312b1d 100644
--- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
+++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
@@ -131,13 +131,13 @@  LongModeStart:
 
 TestLock:
     xchg       qword [edi], rax
     cmp        rax, NotVacantFlag
     jz         TestLock
 
-    lea        ecx, [esi + InitFlagLocation]
+    lea        ecx, [esi + NumApsExecutingLocation]
     inc        dword [ecx]
     mov        ebx, [ecx]
 
 Releaselock:
     mov        rax, VacantFlag
     xchg       qword [edi], rax