From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.19783.1611805218639078506 for ; Wed, 27 Jan 2021 19:40:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=EbWM+jh5; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: eric.dong@intel.com) IronPort-SDR: qma2GS1B7Pt9NKSF9YOVusDXiDYOGHoWUgVnSCcFj5GUGYuTS2s2lUQN+3AKilEWg8wqAEqLO5 5bNo7iksY9ZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9877"; a="180319302" X-IronPort-AV: E=Sophos;i="5.79,381,1602572400"; d="scan'208,217";a="180319302" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 19:40:17 -0800 IronPort-SDR: D754drlG1F0LLte7Wx/+sTKcfT7doTcc/ccGk+c5hWyh7DOPk2QjGEM3AJh/dLMhDPHa+s21BY dOL6CcWl1Xkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,381,1602572400"; d="scan'208,217";a="505164175" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga004.jf.intel.com with ESMTP; 27 Jan 2021 19:40:16 -0800 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 27 Jan 2021 19:40:16 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Wed, 27 Jan 2021 19:40:16 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.106) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 27 Jan 2021 19:38:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aNUVi1NfQFSk9aGClAgb0c2T+2cDGBneG1fOmnVvjRNicdEQDWvfdLwnwA6FcqCBWYtZ7M9eNp7TI7tMeLG4BHsePdJPbjh8eY4MJylZRQQSD5UIMljmmfQNKHlBHCy8p51AYtPLj8nJBUfviM0TMIvR3VXe3wH07Z7LyD8Py4WZp3j15LEp1PtJNYsTDLg32rwYNAeqlv0vX1hLlEErCf9OAqRf29H9qWTTZ35Jd+j4TLQKfUELnb/Yh/o3dfrW3+NEWx1Jv9GFhEn2I01vZomM02/ykhyANukXrIZCZgoXpwpMv8yyCSgoip5V8LEMi0NOeT+iefXhnI7ZKBDV/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j7GesCO33ctsrOVszUHuyyfjREzcuKn31WclnkY6lEo=; b=FbK+CW5bIhOBBSFPbnLJ11SLXf9lI5M6KG787cV+tBnyG3OehyFgAaRKEORB6Raj7QxfHwHasNh3OZBL+nf/B29JRSZCifbhmkOPrBKm1hK125LKG5SCpDQDAqZmdRtpAtTZp0nbmPn2ziP8Xo2Dt8vwMIgb/ltdTtE6g59CQG8cyfdPjpiVtm2d6psyXDxQV97Oa8hCKIG+kauTsqcRi322KqaWjILBG2Hf/ryjC5zG6WsIbMhBzopqoKTqCHIvbDdT2GTS+SdwvljgaPyz/qzYXpTjo371MVdpmjlAqoDz9iHV9AMsgK7b5EjpPAn8MUK2B22QSiMG/qY5Xwnleg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j7GesCO33ctsrOVszUHuyyfjREzcuKn31WclnkY6lEo=; b=EbWM+jh5HSbGczblHgDBOHlRuWwkSMxyMJt4PURLDiC8upuFJ96+vORRjXzPnDDn65SgYJDY06XX07LVDwjcG6BckWDdxqHfjYXRw2JxdXGB4E83safvAQFwNM/q0UmM/kslblDPMkpdN3bjVwjPknm6D/kdQEAMmSjzh31P3ys= Received: from CY4PR11MB1272.namprd11.prod.outlook.com (2603:10b6:903:29::9) by CY4PR1101MB2069.namprd11.prod.outlook.com (2603:10b6:910:17::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.17; Thu, 28 Jan 2021 03:38:44 +0000 Received: from CY4PR11MB1272.namprd11.prod.outlook.com ([fe80::59b2:5d29:472d:1d36]) by CY4PR11MB1272.namprd11.prod.outlook.com ([fe80::59b2:5d29:472d:1d36%5]) with mapi id 15.20.3784.019; Thu, 28 Jan 2021 03:38:44 +0000 From: "Dong, Eric" To: "Ni, Ray" , Laszlo Ersek , "Kumar, Rahul1" CC: "devel@edk2.groups.io" Subject: Re: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Don't increase CpuCount in ApWakeupFunction Thread-Topic: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Don't increase CpuCount in ApWakeupFunction Thread-Index: AQHW86cytahL1AI/Xk2XOb69wmTXw6o8YvQggAADtnA= Date: Thu, 28 Jan 2021 03:38:44 +0000 Message-ID: References: <165DB23DD3EC13FE.27537@groups.io> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 82562e54-b8e4-4668-0f8b-08d8c33e36a3 x-ms-traffictypediagnostic: CY4PR1101MB2069: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3631; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xcvwwP1o9ATxaJSOxu1naDCEygSGpjmgm6icsn3XtF9Av4D03jEElPjMEd/xdfBQeRFcnNKwRS+qjU/l3+VjtE0SjBtkeHG3D1erZMIkGaQ6EOqU18GYgX4g551zhq4iPUPaRkipu2IvdxkuxiYFVF7lgZ4I43Q4ZetL82lMPisYxG2zjeypwReUvgSLNk/iY+9cmm/MtZ+O1puYwm5LmqgvTl4Ti43aZN97ZeYUOn5e7fQw9yE/BbrHzRaEbMaU1WzbCyoJX2ItlPUUHjUbHP1wRMhD7rlooaSaX758hKf01e8H7qu4PVEHsVnvDpNplw+jJO2LR3OSeejuUhMnf76YD678KuZaxMYNHHabPnjjKxtJ/iPoU7fMyF4bMNja1O2jRk1z2vi7YhbSHt5mxsIYz4e0jtK1DYh3zFKFEbINw8mmqoDvgtti4kyu5/3Ilk6gnzJTwPQ2J6dqLlWpMPnHGB1vbFKMR9ayhEQJCPQwf8QoVMuLxMCPgjUlhAUHXmyfx6sgDNGQuJvcPIrKb5DYCG8LVxK8TMkiUqnOuNKHZdbOHqrRp0F6UoalPpCztCFDqQIsoVIOxZEHxJzsFZBzTvj3VsMarOZNmzHaiz0= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1272.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(396003)(366004)(346002)(376002)(136003)(39860400002)(83380400001)(166002)(52536014)(110136005)(33656002)(7696005)(66556008)(66476007)(66446008)(316002)(76116006)(64756008)(66946007)(6506007)(53546011)(186003)(26005)(5660300002)(8676002)(55016002)(6636002)(9686003)(2906002)(8936002)(478600001)(4326008)(71200400001)(966005)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?/l4LkuPMUWWZhuw7oIIeOn+q4Ct7UcCIA+F0/yh822RB4KQkJBkq34zmMvf6?= =?us-ascii?Q?lXJIurxgSKD1SB7WP76mscuZwsQzS3DqBGFzZ0QM9k1n4X4qJ1In1KthfYJB?= =?us-ascii?Q?GUQLPBNpnjIiIRWpcgcAcmVb7qDts5woFhOs22jfo+buwOVGz8zTJIGObAfp?= =?us-ascii?Q?Hxz2YoZkNNo7OabDJJOSFm37f6JjMN+Z7wSLTAv86G33M3WwyqA2YFvJkjoT?= =?us-ascii?Q?YZkh0uZzI8ZZsnBkijyh0d0ASB38me2x0CgTuj/H++a8PdYpEwMEr6VANEE1?= =?us-ascii?Q?P/YKZVJXomHTb4VfS4LfvZYCF8ENNg7hxDTv3Trek8IBbptF89AdXWHVqoUp?= =?us-ascii?Q?woHzmIxq6hglAMBpoCLP1VtR4YqvkCyIdZ/t/2iRFga3kfwDvyifXIaSNwd3?= =?us-ascii?Q?vIMEHV86ZKqsi/kEJQt/o47g1Z0oNbpivWe1ksCWSa85ZuZFGnswRth3fRy3?= =?us-ascii?Q?xG6NAYsbroHQy9gDM0tuwJwIxlYnaWQQpgR/gpbQlcbeAQFSj/0fxnKqSJ9t?= =?us-ascii?Q?HjuZAy2OEvFLjc32GT3wnpNaH4XfehreZ0UxXz+fU7FBcusdFrLe9K22SeP9?= =?us-ascii?Q?Pc77iZjhHi4zSZvZO8FAnEmjsu6JP1fCWKXKGoNZT5ZVgxfnJ7mBPhcg+6Ix?= =?us-ascii?Q?PlP4+5JyUyBv2vN6lo2PxELXrELtipiSJ+DxK6dT1JGBw2bsUoAIz1vYYSk2?= =?us-ascii?Q?rXUSnJynbRPl4lxrrmf+Bo3QCvg6BT1bZqJNyepl70pmyUXzRiqK1dDZJSGV?= =?us-ascii?Q?ZaTGxsqoT0xREck6+yM85ncJBGMgasFHVciNN/NSZp0+B8krjeU8cyWlFB2V?= =?us-ascii?Q?7/oR+e7kJMLGBMU4xhfgNbfUncDW90ejmvH1W4mCX8n62YUlPlytu42YzBCR?= =?us-ascii?Q?mkUy3MouVEfKKtRGkBk0eFmFM9KoS4el3Th6/8JIh9sIFNfiRJVS8tHHUN0a?= =?us-ascii?Q?4KqGbu1Fnr1Hamo0/npPNi42U60sB7B7AbOrSzWJOOw3QbjbjkI9lACsmMTG?= =?us-ascii?Q?fDB+v2L6B8xlg+fP0hY1UhfMDFLCusU/OUYGiyyehB/0b8KHELufPwnbGpmh?= =?us-ascii?Q?kL7q57eK?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1272.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82562e54-b8e4-4668-0f8b-08d8c33e36a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jan 2021 03:38:44.3400 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LTd34k/OMPN7CxPKawJcMiOD4XlNea05IKaly9XtJ4dGNzvlqkZfu9R4jYT9yZ7eGm9ij6NiGDx+Bvt+D7ybjw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2069 Return-Path: eric.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR11MB1272FC366AF7E4DA3A77C956FEBA9CY4PR11MB1272namp_" --_000_CY4PR11MB1272FC366AF7E4DA3A77C956FEBA9CY4PR11MB1272namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong From: Ni, Ray Sent: Thursday, January 28, 2021 11:27 AM To: Dong, Eric ; Laszlo Ersek ; Kum= ar, Rahul1 Cc: devel@edk2.groups.io; Ni, Ray Subject: RE: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Don't increase CpuC= ount in ApWakeupFunction Somehow I forgot to add "Cc" tag in the patch resulting the package maintai= ners are not CCed. Add them back. > -----Original Message----- > From: devel@edk2.groups.io > On Behalf Of Ni, Ray > Sent: Tuesday, January 26, 2021 1:50 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Don't increase > CpuCount in ApWakeupFunction > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3179 > > When BSP first time wakes all APs, each AP atomically increases > CpuMpData->CpuCount and CpuMpData->FinishedCount. > Each AP atomically increases CpuMpData->NumApsExecuting > in early assembly code and decreases it before it enters to HLT or > MWAIT state. > > Putting them together, the 3 variables are changed in the following order= : > 1. NumApsExecuting++ // in assembly > 2. CpuCpunt++ > 4. FinishedCount++ > 3. NumApsExecuting-- // in C > > BSP waits for a certain timeout and then polls NumApsExecuting > until it drops to zero. It assumes all APs are waken up concurrently > and NumApsExecuting only drops to zero when all APs have checked in. > > Then it additionally waits for FinishedCount =3D=3D CpuCount - 1. > (FinishedCount doesn't include BSP while CpuCount includes BSP.) > > There is no need to additionally wait for > FinishedCount =3D=3D CpuCount - 1 because when NumApsExecuting =3D=3D 0, > the number of increments of FinishedCount and CpuCount should equal. > > This patch simplifies the code to remove "CpuCount++" in > ApWakeupFunction() and assigns FinishedCount + 1 to CpuCount after > WakeUpAP(). > > Signed-off-by: Ray Ni > > --- > UefiCpuPkg/Library/MpInitLib/MpLib.c | 16 +++++----------- > 1 file changed, 5 insertions(+), 11 deletions(-) > > diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c > b/UefiCpuPkg/Library/MpInitLib/MpLib.c > index 8b1f7f84ba..2568986d8c 100644 > --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c > +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c > @@ -1,7 +1,7 @@ > /** @file > > CPU MP Initialize Library common functions. > > > > - Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
> > + Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.
> > Copyright (c) 2020, AMD Inc. All rights reserved.
> > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -485,14 +485,12 @@ CollectProcessorCount ( > CpuMpData->InitFlag =3D ApInitConfig; > > WakeUpAP (CpuMpData, TRUE, 0, NULL, NULL, TRUE); > > CpuMpData->InitFlag =3D ApInitDone; > > - ASSERT (CpuMpData->CpuCount <=3D PcdGet32 > (PcdCpuMaxLogicalProcessorNumber)); > > // > > - // Wait for all APs finished the initialization > > + // When InitFlag =3D=3D ApInitConfig, WakeUpAP () guarantees all APs a= re > checked in. > > + // FinishedCount is the number of check-in APs. > > // > > - while (CpuMpData->FinishedCount < (CpuMpData->CpuCount - 1)) { > > - CpuPause (); > > - } > > - > > + CpuMpData->CpuCount =3D CpuMpData->FinishedCount + 1; > > + ASSERT (CpuMpData->CpuCount <=3D PcdGet32 > (PcdCpuMaxLogicalProcessorNumber)); > > > > // > > // Enable x2APIC mode if > > @@ -751,10 +749,6 @@ ApWakeupFunction ( > CurrentApicMode =3D GetApicMode (); > > while (TRUE) { > > if (CpuMpData->InitFlag =3D=3D ApInitConfig) { > > - // > > - // Add CPU number > > - // > > - InterlockedIncrement ((UINT32 *) &CpuMpData->CpuCount); > > ProcessorNumber =3D ApIndex; > > // > > // This is first time AP wakeup, get BIST information from AP stac= k > > -- > 2.27.0.windows.1 > > > > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#70757): https://edk2.groups.io/g/devel/message/70757 > Mute This Topic: https://groups.io/mt/80124850/1712937 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [ray.ni@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D > --_000_CY4PR11MB1272FC366AF7E4DA3A77C956FEBA9CY4PR11MB1272namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Reviewed-by: Eric Dong <eric.dong@intel.com>

 

From: Ni, Ray <ray.ni@intel.com>
Sent: Thursday, January 28, 2021 11:27 AM
To: Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@= redhat.com>; Kumar, Rahul1 <rahul1.kumar@intel.com>
Cc: devel@edk2.groups.io; Ni, Ray <ray.ni@intel.com>
Subject: RE: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Don't increa= se CpuCount in ApWakeupFunction

 

Somehow I forg= ot to add "Cc" tag in the patc= h resulting the package maintainers are not&n= bsp;CCed.
Add them back.

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of = ;Ni, Ray
> Sent: Tuesday, January&nbs= p;26, 2021 1:50 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PAT= CH] UefiCpuPkg/MpInitLib: Don't increase
> CpuCount in ApWakeupFuncti= on

> REF: https://bugzilla.tianocore.org/show= _bug.cgi?id=3D3179

> When BSP first time&n= bsp;wakes all APs, each AP atomically increas= es
> CpuMpData->CpuCount and = ;CpuMpData->FinishedCount.
> Each AP atomically in= creases CpuMpData->NumApsExecuting
> in early assembly cod= e and decreases it before it enters to&n= bsp;HLT or
> MWAIT state.

> Putting them together,&nbs= p;the 3 variables are changed in the fol= lowing order:
> 1. NumApsExecuting++ //&nb= sp;in assembly
> 2. CpuCpunt++
> 4. FinishedCount++
> 3. NumApsExecuting-- //&nb= sp;in C

> BSP waits for a = certain timeout and then polls NumApsExecuting
> until it drops to&nbs= p;zero. It assumes all APs are waken up&= nbsp;concurrently
> and NumApsExecuting only&n= bsp;drops to zero when all APs have chec= ked in.

> Then it additionally = waits for FinishedCount =3D=3D CpuCount - 1.<= /span>
> (FinishedCount doesn't inc= lude BSP while CpuCount includes BSP.)

> There is no need = ;to additionally wait for
> FinishedCount =3D=3D CpuCo= unt - 1 because when NumApsExecuting =3D=3D&n= bsp;0,
> the number of increme= nts of FinishedCount and CpuCount should equa= l.

> This patch simplifies = ;the code to remove "CpuCount++" in
> ApWakeupFunction() and ass= igns FinishedCount + 1 to CpuCount after
> WakeUpAP().

> Signed-off-by: Ray Ni = ;<ray.ni@intel.com> > ---
>  UefiCpuPkg/Library/MpInitLib/M= pLib.c | 16 +++++-----------
>  1 file changed, = ;5 insertions(+), 11 deletions(-)

> diff --git a/UefiCpuPkg/Li= brary/MpInitLib/MpLib.c
> b/UefiCpuPkg/Library/MpInitLib/MpLib= .c
> index 8b1f7f84ba..2568986d8c&nb= sp;100644
> --- a/UefiCpuPkg/Library/MpInit= Lib/MpLib.c
> +++ b/UefiCpuPkg/Library/MpInit= Lib/MpLib.c
> @@ -1,7 +1,7 @@
>  /** @file

>    CPU MP I= nitialize Library common functions.



> -  Copyright (c) = ;2016 - 2020, Intel Corporation. All rights&n= bsp;reserved.<BR>

> +  Copyright (c) = ;2016 - 2021, Intel Corporation. All rights&n= bsp;reserved.<BR>

>    Copyright (c)=  2020, AMD Inc. All rights reserved.<BR>= ;



>    SPDX-License-Ident= ifier: BSD-2-Clause-Patent

> @@ -485,14 +485,12 @@=  CollectProcessorCount (
>    CpuMpData->Init= Flag =3D ApInitConfig;

>    WakeUpAP (Cpu= MpData, TRUE, 0, NULL, NULL, TRUE);

>    CpuMpData->Init= Flag =3D ApInitDone;

> -  ASSERT (CpuMpData-= >CpuCount <=3D PcdGet32
> (PcdCpuMaxLogicalProcessorNumber));<= /span>

>    //

> -  // Wait for&n= bsp;all APs finished the initialization

> +  // When InitF= lag =3D=3D ApInitConfig, WakeUpAP () guarantees&nb= sp;all APs are
> checked in.

> +  // FinishedCount&n= bsp;is the number of check-in APs.

>    //

> -  while (CpuMpData-&= gt;FinishedCount < (CpuMpData->CpuCount - 1))&nbs= p;{

> -    CpuPause&nb= sp;();

> -  }

> -

> +  CpuMpData->CpuCount&= nbsp;=3D CpuMpData->FinishedCount + 1;

> +  ASSERT (CpuMpData-= >CpuCount <=3D PcdGet32
> (PcdCpuMaxLogicalProcessorNumber));<= /span>



>    //

>    // Enable&nbs= p;x2APIC mode if

> @@ -751,10 +749,6 @@&= nbsp;ApWakeupFunction (
>    CurrentApicMode&nb= sp;=3D GetApicMode ();

>    while (TRUE)&= nbsp;{

>      if&nbs= p;(CpuMpData->InitFlag =3D=3D ApInitConfig) {

> -      = ;//

> -      = ;// Add CPU number

> -      = ;//

> -      = ;InterlockedIncrement ((UINT32 *) &CpuMpData->CpuCoun= t);

>       =  ProcessorNumber =3D ApIndex;

>       =  //

>       =  // This is first time AP wakeup, g= et BIST information from AP stack

> --
> 2.27.0.windows.1



> -=3D-=3D-=3D-=3D-=3D-=3D
> Groups.io Links: You = receive all messages sent to this group.
> View/Reply Online (#70757)= : https://edk= 2.groups.io/g/devel/message/70757
> Mute This Topic: https://groups.io/mt/80124850= /1712937
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub&nbs= p;[ray.ni@intel.com]
> -=3D-=3D-=3D-=3D-=3D-=3D

--_000_CY4PR11MB1272FC366AF7E4DA3A77C956FEBA9CY4PR11MB1272namp_--