From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: ray.ni@intel.com) Received: from mga11.intel.com (mga11.intel.com []) by groups.io with SMTP; Tue, 04 Jun 2019 22:49:36 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2019 22:49:36 -0700 X-ExtLoop1: 1 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.16]) by fmsmga006.fm.intel.com with ESMTP; 04 Jun 2019 22:49:35 -0700 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Laszlo Ersek , Eric Dong Subject: [PATCH v2 1/2] UefiCpuPkg/MpInitLib: increase NumApsExecuting only for ApInitConfig Date: Wed, 5 Jun 2019 13:49:19 +0800 Message-Id: <20190605054920.123184-2-ray.ni@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190605054920.123184-1-ray.ni@intel.com> References: <20190605054920.123184-1-ray.ni@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Laszlo Ersek Cc: Eric Dong --- UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 14 +++++++------- 1 file 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.
+; Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
; 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 -- 2.21.0.windows.1