From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 4C408AC0AF4 for ; Tue, 19 Dec 2023 03:56:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=JY4hA8YayKttwPt0/xtiiGDQ8B9/P+caDDDWJMRpm9Q=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1702958159; v=1; b=QiPIniSjvhtssW5DyIzyZQwuO885b+X0aeZw2ResZBdokPh+tQFWU6L39tGH4C8xjgX8kwvN z02jZ2IzxaAibj9Qxd+Px5nxwkFGG8wXEJBe2Yuv5y/E+3jSpBQSLcpGrpSfysiVHMupCROltv5 GlP7RoEdU8lIyb9Y0fSxdWq0= X-Received: by 127.0.0.2 with SMTP id S0JFYY7687511x3quesoE057; Mon, 18 Dec 2023 19:55:59 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.5015.1702958159371789616 for ; Mon, 18 Dec 2023 19:55:59 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="392777894" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="392777894" X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 19:55:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="894109539" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="894109539" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Dec 2023 19:55:59 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 18 Dec 2023 19:55:58 -0800 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 18 Dec 2023 19:55:58 -0800 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 18 Dec 2023 19:55:58 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 18 Dec 2023 19:55:58 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iu7JIdgUecGIFgahKXFruGjfYQidbnfF3xssu1p/1qQ63PvI4VxjAzi/K4zo13VGhZhMws1hqHkokm30n4azNmY3O5/pmX1SbTCowIHtx3IxAFnmqqkcNhTJ870pHD14KzTydSB7RRwB5A0w69FBYxekecHAYT/OPvkCIW8u3OS/hx3R0Hu2ldcb0Gxz7E4NJDUOcqb+iv81IMsQowTOfmwYbgqRVwq6jLhhJJnbRDXGHV8wlQgEcPwLOAwK4kRkOXKUBzyAWJbqYFpGyh5SGp4yP71SnG5VNjatpQbCaEMA2jBmEXZIMFWf0KRSjwaTJcbJnuiLif0H/vp8h6BAww== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y4085lW+nYc0Ckh05aFZuDC5FRlwHcMa32rG10Cy38M=; b=B8MA88VgTeOg+w/D3gf2JP2Rp0qGxUMnvdr0UDmZqpyYYOw1CpUXxBXw+Rv11tK+lvcYzMZUx0r8S7hNHi/wVT5pTK0Am8uqtH5NbH51IDxMHolK74FiqFgFyh76Vjd3d7iIZ38BR9uwUcvXK4cBRrU/0WQzKzP04pCAYKafNAL+vuPD+m8i9saLSGE8pLpjNYE6K89s4UQD08E+Fis01PfPic8clDIrCH9qt834LARMERO2qkWOLTTyx50Ka1FwoPmB0fn1eo6t3xCgp/ysBQEX9uNR2aYwJbGcuG1CWGUdl0KidAQ3NUEBXqqSXFb8oPcFtCYkGdOfLI6HFmHJZg== 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 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DS7PR11MB6040.namprd11.prod.outlook.com (2603:10b6:8:77::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 03:55:56 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858%4]) with mapi id 15.20.7091.034; Tue, 19 Dec 2023 03:55:55 +0000 From: "Ni, Ray" To: "Wu, Jiaxin" , "devel@edk2.groups.io" CC: Laszlo Ersek , "Dong, Eric" , "Zeng, Star" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [edk2-devel] [PATCH v4 1/8] UefiCpuPkg/PiSmmCpuDxeSmm: Optimize Semaphore Sync between BSP and AP Thread-Topic: [PATCH v4 1/8] UefiCpuPkg/PiSmmCpuDxeSmm: Optimize Semaphore Sync between BSP and AP Thread-Index: AQHaLzzVVihv4vViJkO0O0wPngXYR7Cv/9vw Date: Tue, 19 Dec 2023 03:55:55 +0000 Message-ID: References: <20231215095515.9484-1-jiaxin.wu@intel.com> <20231215095515.9484-2-jiaxin.wu@intel.com> In-Reply-To: <20231215095515.9484-2-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DS7PR11MB6040:EE_ x-ms-office365-filtering-correlation-id: aa8aa866-15bd-4087-69af-08dc00466728 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: kpwGxN9ttgLOvGOHh/iV8EBPauL0UIUrhZTG/ciTo04metaON3ORMt/TpJO3JkEqigjN0Wx4OHxDoSbUXdfiS/3pNmsyksx9p3CUwAykfGGPpx5fEoChq5UpEwlPz+cxVs5ezS04naIyZvO77O2Nu1NOYwXMGdISvrOwZEz9tkuW/wCDgVCrWO0TpW61bUpZAvBHjbzSUEZjMDWX3EUdwI2uYnTAJiSOuIhUtur5DyHXYtiSUBzxWOevPoBLDgeGjE+HIRgVBEC3Gzkcd7er+GI1HeCXQmqMQYCfjpysI/zg2ojk+XD9qKa3f1QnHG8SRx98YuVbosdYUVtfUke5wjrTwDiRe3WYvn/aKiKLJ5T87/d7iYtKFOvrDpHXI2+cQe+dI2iL0gJ16YKwm6337/fCAB3ENZ4Ad3jP1NKD6Z2V13ZU6wDDW1Ssz5b8vNBa58wCTu6QtOn6I5k8K+hga0cAukqhQLhhcD9/1YaXQ7rQDDZLNLlzG8FUuwP48+cQVMO8o9geEN063NnQdHd6Tp3yGkKehcJQcatwSzkosSTI0Yv8NA4NjtGfVCmMT/X8vNlAnFnuaO4r3zhFSQWqH+8EPlS8uVTmncG0ttPGAzou83iLw9O1yzoRnFdzs3oL x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?kJJiZbCuxe/v5ZO5M6+6kLNVRr3u2jQCKLIbra8m001Flz6OMhL15lFMFzpX?= =?us-ascii?Q?uxBv3q6lEIb6QwG2+YsQLuNy4ArTjUunNCopeqsF4y+vsrmOVHKKyFS9amRx?= =?us-ascii?Q?/X6ijMe+87LfxvMgJO9jodFi7H4FHXQF5oLtIPj5HhbPgAu6jUFidMPlBhs9?= =?us-ascii?Q?mklS4CkHDuTYXojKVlPbqkBi0KhyjNoya4o8NsA7PvFpdRu2xA3xv9j+w56j?= =?us-ascii?Q?+UwpKo7nPiigUOUaV6g91ytKPGG4uNqi37ZfbYqRrCtDypHjOtk/Kkao00oh?= =?us-ascii?Q?OP/ZsXsvH/Oc5D2UIeLMKgt7KITRdhnqG4ufQJkIzWRjmA2d4zHLUC2PUVUo?= =?us-ascii?Q?2cP6FyrTYQqKUqBv2GZgEOVuAwrS5H0wrHlpiyVWif94pTq0kyLEGW1HXQID?= =?us-ascii?Q?cDHQUzkK5QfGz/jiw+ByKeICvjnPDcepEsJOcu9+KeNS5v39v7Itz1Ak/hhk?= =?us-ascii?Q?/z1qhPgNlMG3zaIhwoMrydF8AKNQhU7gX5dyHiekTh5kDRUmK8KMmbqfl4VN?= =?us-ascii?Q?IYiyy/G6HHeo+3lTLBr1DnEj9dFuui5HU/g4CFNZiMa53IrK78RBQIkFNt9k?= =?us-ascii?Q?xpQuNy0NEZFpdIkPJahBGMAdCSw1AcVI9HTjIB+AHCzNq4k/tIFrUUpMorY+?= =?us-ascii?Q?ZWyd0XmlV/WuUlj5Kif6tMIJgLO3DW/03JuI/EATi7lJYP0DRB8AGX5yiBfo?= =?us-ascii?Q?/zWqm0ogQKDTH5HjNKDA23LjHHYg5eNfLjsdMGhIrqxZgFtsD+wVjk4LCGAt?= =?us-ascii?Q?Sm5N+SoTXmqDDO5K3b8s6U3a5S+6sISRATwF1WrRnMoKLWrKBCwGQI+aztbs?= =?us-ascii?Q?jx60ZQEFQOLPCsAKfN34EJGHe3vnYZjubqaFmsSGn/9hFwaw959JZk2k19Aa?= =?us-ascii?Q?nr9E/QP2VLafzpCD30s7bwxbCV/YbZCym21AOywQ5BtoOIpfTHB6Ct5ClOuT?= =?us-ascii?Q?h1cjkYd73HeAbpRvxW9/X+Z/9MacLphdMExaqdSAbrPJQT0q9y03eK21HtUw?= =?us-ascii?Q?dRBemX78wYuJOQ50jiAEczcpf0MQN3b3b/tQiNy9bMAzGL9mov5TAxjcotGf?= =?us-ascii?Q?T1b84uQ6gAPfZQw/tSQeyyCjbUzyvc1ep7L3XPdn+Rzk1yI2h3xbWaDDqcug?= =?us-ascii?Q?1P10cN1JRzN1ImNt83E0r2EN10VGhaR/q7ZQBkZQPzgqvpundEgYU6VBNUYE?= =?us-ascii?Q?wG4ntjD4fod+/pDfaO/MTyIdfpjOSnM4zAtqMorTQN6jGMMsW/iI7f2ewGYQ?= =?us-ascii?Q?2U5dGVYvYWzfK6It2JCkcgXUjClZ4nvTOyPexf3NARL2hOMEWmMgWZrYL9rW?= =?us-ascii?Q?bgCjaRc0buXinsDLnf2s7C/GsgjFLIyk8y4jiJv1Hy2Po8w35EOaBG2r7E7r?= =?us-ascii?Q?LSLVbC8+YMlHOy7OhjtRy2phK/s4HZGnp3FQr4ukTwwikq1xVkDf2qV1dF8l?= =?us-ascii?Q?ftBxmmllw1ZAJVX1smHSUDOMgI2Ht9LElnHy7JzaxdeVhxi4FPW82eept1EN?= =?us-ascii?Q?S4CpX/VC+/hjOEtFi0S+w8OdH1XIavDPMgaEy6QADk+EL8jVsgFJ7WTskgC7?= =?us-ascii?Q?Mx/Vwo0DV1cEeLmjLEI=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa8aa866-15bd-4087-69af-08dc00466728 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2023 03:55:55.8155 (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: CzvvY2aNYjywgLE4aP/GfohoM4Ql9h+FgTgj5I5gRA4kX4JC8HaW19AxR471btrmbogZsPKkaF2IWjkEClA6/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6040 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: bJTIFaoc6kwx6suEcmkQnA1Kx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=QiPIniSj; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Ray Ni Thanks, Ray > -----Original Message----- > From: Wu, Jiaxin > Sent: Friday, December 15, 2023 5:55 PM > To: devel@edk2.groups.io > Cc: Laszlo Ersek ; Dong, Eric ; N= i, > Ray ; Zeng, Star ; Kumar, Rahul R > ; Gerd Hoffmann > Subject: [PATCH v4 1/8] UefiCpuPkg/PiSmmCpuDxeSmm: Optimize > Semaphore Sync between BSP and AP >=20 > This patch is to define 3 new functions (WaitForBsp & ReleaseBsp & > ReleaseOneAp) used for the semaphore sync between BSP & AP. With the > change, BSP and AP Sync flow will be easy understand as below: > BSP: ReleaseAllAPs or ReleaseOneAp --> AP: WaitForBsp > BSP: WaitForAllAPs <-- AP: ReleaseBsp >=20 > Cc: Laszlo Ersek > Cc: Eric Dong > Cc: Ray Ni > Cc: Zeng Star > Cc: Rahul Kumar > Cc: Gerd Hoffmann > Signed-off-by: Jiaxin Wu > Reviewed-by: Laszlo Ersek > --- > UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 72 > ++++++++++++++++++++++++++++------- > 1 file changed, 58 insertions(+), 14 deletions(-) >=20 > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > index b279f5dfcc..54542262a2 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > @@ -120,10 +120,11 @@ LockdownSemaphore ( >=20 > return Value; > } >=20 > /** > + Used for BSP to wait all APs. > Wait all APs to performs an atomic compare exchange operation to > release semaphore. >=20 > @param NumberOfAPs AP number >=20 > **/ > @@ -139,10 +140,11 @@ WaitForAllAPs ( > WaitForSemaphore (mSmmMpSyncData->CpuData[BspIndex].Run); > } > } >=20 > /** > + Used for BSP to release all APs. > Performs an atomic compare exchange operation to release semaphore > for each AP. >=20 > **/ > VOID > @@ -157,10 +159,52 @@ ReleaseAllAPs ( > ReleaseSemaphore (mSmmMpSyncData->CpuData[Index].Run); > } > } > } >=20 > +/** > + Used for BSP to release one AP. > + > + @param ApSem IN: 32-bit unsigned integer > + OUT: original integer + 1 > +**/ > +VOID > +ReleaseOneAp ( > + IN OUT volatile UINT32 *ApSem > + ) > +{ > + ReleaseSemaphore (ApSem); > +} > + > +/** > + Used for AP to wait BSP. > + > + @param ApSem IN: 32-bit unsigned integer > + OUT: original integer - 1 > +**/ > +VOID > +WaitForBsp ( > + IN OUT volatile UINT32 *ApSem > + ) > +{ > + WaitForSemaphore (ApSem); > +} > + > +/** > + Used for AP to release BSP. > + > + @param BspSem IN: 32-bit unsigned integer > + OUT: original integer + 1 > +**/ > +VOID > +ReleaseBsp ( > + IN OUT volatile UINT32 *BspSem > + ) > +{ > + ReleaseSemaphore (BspSem); > +} > + > /** > Check whether the index of CPU perform the package level register > programming during System Management Mode initialization. >=20 > The index of Processor specified by > mPackageFirstThreadIndex[PackageIndex] > @@ -632,11 +676,11 @@ BSPHandler ( > // Signal all APs it's time for backup MTRRs > // > ReleaseAllAPs (); >=20 > // > - // WaitForSemaphore() may wait for ever if an AP happens to enter > SMM at > + // WaitForAllAPs() may wait for ever if an AP happens to enter SMM > at > // exactly this point. Please make sure PcdCpuSmmMaxSyncLoops > has been set > // to a large enough value to avoid this situation. > // Note: For HT capable CPUs, threads within a core share the same > set of MTRRs. > // We do the backup first and then set MTRR to avoid race conditio= n > for threads > // in the same core. > @@ -652,11 +696,11 @@ BSPHandler ( > // Let all processors program SMM MTRRs together > // > ReleaseAllAPs (); >=20 > // > - // WaitForSemaphore() may wait for ever if an AP happens to enter > SMM at > + // WaitForAllAPs() may wait for ever if an AP happens to enter SMM > at > // exactly this point. Please make sure PcdCpuSmmMaxSyncLoops > has been set > // to a large enough value to avoid this situation. > // > ReplaceOSMtrrs (CpuIndex); >=20 > @@ -898,50 +942,50 @@ APHandler ( >=20 > if ((SyncMode =3D=3D SmmCpuSyncModeTradition) || > SmmCpuFeaturesNeedConfigureMtrrs ()) { > // > // Notify BSP of arrival at this point > // > - ReleaseSemaphore (mSmmMpSyncData->CpuData[BspIndex].Run); > + ReleaseBsp (mSmmMpSyncData->CpuData[BspIndex].Run); > } >=20 > if (SmmCpuFeaturesNeedConfigureMtrrs ()) { > // > // Wait for the signal from BSP to backup MTRRs > // > - WaitForSemaphore (mSmmMpSyncData->CpuData[CpuIndex].Run); > + WaitForBsp (mSmmMpSyncData->CpuData[CpuIndex].Run); >=20 > // > // Backup OS MTRRs > // > MtrrGetAllMtrrs (&Mtrrs); >=20 > // > // Signal BSP the completion of this AP > // > - ReleaseSemaphore (mSmmMpSyncData->CpuData[BspIndex].Run); > + ReleaseBsp (mSmmMpSyncData->CpuData[BspIndex].Run); >=20 > // > // Wait for BSP's signal to program MTRRs > // > - WaitForSemaphore (mSmmMpSyncData->CpuData[CpuIndex].Run); > + WaitForBsp (mSmmMpSyncData->CpuData[CpuIndex].Run); >=20 > // > // Replace OS MTRRs with SMI MTRRs > // > ReplaceOSMtrrs (CpuIndex); >=20 > // > // Signal BSP the completion of this AP > // > - ReleaseSemaphore (mSmmMpSyncData->CpuData[BspIndex].Run); > + ReleaseBsp (mSmmMpSyncData->CpuData[BspIndex].Run); > } >=20 > while (TRUE) { > // > // Wait for something to happen > // > - WaitForSemaphore (mSmmMpSyncData->CpuData[CpuIndex].Run); > + WaitForBsp (mSmmMpSyncData->CpuData[CpuIndex].Run); >=20 > // > // Check if BSP wants to exit SMM > // > if (!(*mSmmMpSyncData->InsideSmm)) { > @@ -977,16 +1021,16 @@ APHandler ( >=20 > if (SmmCpuFeaturesNeedConfigureMtrrs ()) { > // > // Notify BSP the readiness of this AP to program MTRRs > // > - ReleaseSemaphore (mSmmMpSyncData->CpuData[BspIndex].Run); > + ReleaseBsp (mSmmMpSyncData->CpuData[BspIndex].Run); >=20 > // > // Wait for the signal from BSP to program MTRRs > // > - WaitForSemaphore (mSmmMpSyncData->CpuData[CpuIndex].Run); > + WaitForBsp (mSmmMpSyncData->CpuData[CpuIndex].Run); >=20 > // > // Restore OS MTRRs > // > SmmCpuFeaturesReenableSmrr (); > @@ -994,26 +1038,26 @@ APHandler ( > } >=20 > // > // Notify BSP the readiness of this AP to Reset states/semaphore for t= his > processor > // > - ReleaseSemaphore (mSmmMpSyncData->CpuData[BspIndex].Run); > + ReleaseBsp (mSmmMpSyncData->CpuData[BspIndex].Run); >=20 > // > // Wait for the signal from BSP to Reset states/semaphore for this > processor > // > - WaitForSemaphore (mSmmMpSyncData->CpuData[CpuIndex].Run); > + WaitForBsp (mSmmMpSyncData->CpuData[CpuIndex].Run); >=20 > // > // Reset states/semaphore for this processor > // > *(mSmmMpSyncData->CpuData[CpuIndex].Present) =3D FALSE; >=20 > // > // Notify BSP the readiness of this AP to exit SMM > // > - ReleaseSemaphore (mSmmMpSyncData->CpuData[BspIndex].Run); > + ReleaseBsp (mSmmMpSyncData->CpuData[BspIndex].Run); > } >=20 > /** > Checks whether the input token is the current used token. >=20 > @@ -1277,11 +1321,11 @@ InternalSmmStartupThisAp ( > mSmmMpSyncData->CpuData[CpuIndex].Status =3D CpuStatus; > if (mSmmMpSyncData->CpuData[CpuIndex].Status !=3D NULL) { > *mSmmMpSyncData->CpuData[CpuIndex].Status =3D EFI_NOT_READY; > } >=20 > - ReleaseSemaphore (mSmmMpSyncData->CpuData[CpuIndex].Run); > + ReleaseOneAp (mSmmMpSyncData->CpuData[CpuIndex].Run); >=20 > if (Token =3D=3D NULL) { > AcquireSpinLock (mSmmMpSyncData->CpuData[CpuIndex].Busy); > ReleaseSpinLock (mSmmMpSyncData->CpuData[CpuIndex].Busy); > } > -- > 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112682): https://edk2.groups.io/g/devel/message/112682 Mute This Topic: https://groups.io/mt/103187891/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-