summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library
diff options
context:
space:
mode:
authorRay Ni <ray.ni@intel.com>2019-06-04 18:49:25 +0800
committerRay Ni <ray.ni@intel.com>2019-06-10 10:53:42 +0800
commit5b9b0a8da64105ed8a87743f7d71faddf1719175 (patch)
tree25d696d11a802278f391b192a6644c114f3faf80 /UefiCpuPkg/Library
parentf0718d1d6b47745a4249f4006807a45f2245dba1 (diff)
downloadedk2-5b9b0a8da64105ed8a87743f7d71faddf1719175.tar.gz
edk2-5b9b0a8da64105ed8a87743f7d71faddf1719175.tar.bz2
edk2-5b9b0a8da64105ed8a87743f7d71faddf1719175.zip
UefiCpuPkg/MpInitLib: increase NumApsExecuting only for ApInitConfig
NumApsExecuting is only used when InitFlag == ApInitConfig for counting the processor count. The patch changes Ia32 version of waking up vector assembly code to align to x64 version of waking up vector assembly code. After the change both versions of waking up vector increase NumApsExecuting when InitFlag == ApInitConfig. Signed-off-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm14
1 files changed, 7 insertions, 7 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
index 34b8705adb..b74046b76a 100644
--- a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
+++ b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
@@ -1,5 +1,5 @@
;------------------------------------------------------------------------------ ;
-; Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
@@ -81,12 +81,6 @@ Flat32Start: ; protected mode entry point
mov esi, ebx
- ; Increment the number of APs executing here as early as possible
- ; This is decremented in C code when AP is finished executing
- mov edi, esi
- add edi, NumApsExecutingLocation
- lock inc dword [edi]
-
mov edi, esi
add edi, EnableExecuteDisableLocation
cmp byte [edi], 0
@@ -120,6 +114,12 @@ SkipEnableExecuteDisable:
cmp dword [edi], 1 ; 1 == ApInitConfig
jnz GetApicId
+ ; Increment the number of APs executing here as early as possible
+ ; This is decremented in C code when AP is finished executing
+ mov edi, esi
+ add edi, NumApsExecutingLocation
+ lock inc dword [edi]
+
; AP init
mov edi, esi
add edi, LockLocation