From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: eric.dong@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Sun, 09 Jun 2019 19:38:01 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jun 2019 19:38:00 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 09 Jun 2019 19:38:00 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 9 Jun 2019 19:38:00 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 9 Jun 2019 19:38:00 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.134]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.187]) with mapi id 14.03.0415.000; Mon, 10 Jun 2019 10:37:58 +0800 From: "Dong, Eric" To: "Ni, Ray" , "devel@edk2.groups.io" CC: Laszlo Ersek Subject: Re: [PATCH v2 1/2] UefiCpuPkg/MpInitLib: increase NumApsExecuting only for ApInitConfig Thread-Topic: [PATCH v2 1/2] UefiCpuPkg/MpInitLib: increase NumApsExecuting only for ApInitConfig Thread-Index: AQHVG2J5GsIbymyv60a240VbpoXJR6aUNC7A Date: Mon, 10 Jun 2019 02:37:57 +0000 Message-ID: References: <20190605054920.123184-1-ray.ni@intel.com> <20190605054920.123184-2-ray.ni@intel.com> In-Reply-To: <20190605054920.123184-2-ray.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: eric.dong@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong > -----Original Message----- > From: Ni, Ray > Sent: Wednesday, June 5, 2019 1:49 PM > To: devel@edk2.groups.io > Cc: Laszlo Ersek ; Dong, Eric > Subject: [PATCH v2 1/2] UefiCpuPkg/MpInitLib: increase NumApsExecuting > only for ApInitConfig >=20 > NumApsExecuting is only used when InitFlag =3D=3D ApInitConfig for counti= ng the > processor count. >=20 > 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 =3D=3D ApInitConfig. >=20 > 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(-) >=20 > 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: ; prote= cted mode entry > point >=20 > mov esi, ebx >=20 > - ; 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 =3D=3D ApInitConfig > jnz GetApicId >=20 > + ; 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