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>
;------------------------------------------------------------------------------ ;\r
;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>\r
; SPDX-License-Identifier: BSD-2-Clause-Patent\r
;\r
; Module Name:\r
; SPDX-License-Identifier: BSD-2-Clause-Patent\r
;\r
; Module Name:\r
- ; Increment the number of APs executing here as early as possible\r
- ; This is decremented in C code when AP is finished executing\r
- mov edi, esi\r
- add edi, NumApsExecutingLocation\r
- lock inc dword [edi]\r
-\r
mov edi, esi\r
add edi, EnableExecuteDisableLocation\r
cmp byte [edi], 0\r
mov edi, esi\r
add edi, EnableExecuteDisableLocation\r
cmp byte [edi], 0\r
cmp dword [edi], 1 ; 1 == ApInitConfig\r
jnz GetApicId\r
\r
cmp dword [edi], 1 ; 1 == ApInitConfig\r
jnz GetApicId\r
\r
+ ; Increment the number of APs executing here as early as possible\r
+ ; This is decremented in C code when AP is finished executing\r
+ mov edi, esi\r
+ add edi, NumApsExecutingLocation\r
+ lock inc dword [edi]\r
+\r
; AP init\r
mov edi, esi\r
add edi, LockLocation\r
; AP init\r
mov edi, esi\r
add edi, LockLocation\r