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 B1610D80056 for ; Fri, 21 Jul 2023 03:52:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=hFyxN+UgKCGjWvVkmBmt5rvCchzh45cu8lhd5GB6Phg=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-IronPort-AV:X-IronPort-AV:X-Received:X-ExtLoop1:X-IronPort-AV:X-IronPort-AV:X-Received:X-Received:X-Received:X-Received:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:X-Received:X-Received:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator:x-ms-publictraffictype:x-ms-traffictypediagnostic:x-ms-office365-filtering-correlation-id:x-ld-processed:x-ms-exchange-senderadcheck:x-ms-exchange-antispam-relay:x-microsoft-antispam-message-info:x-ms-exchange-antispam-messagedata-chunkcount:x-ms-exchange-antispam-messagedata-0:MIME-Version:X-MS-Exchange-CrossTenant-AuthAs:X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-Network-Message-Id:X-MS-Exchange-CrossTenant-originalarrivaltime:X-MS-Exchange-CrossTenant-fromentityheader:X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype:X-MS-Exchange-CrossTenant-userprincipalname:X-MS-Exchange-Transport-Cro ssTenantHeadersStamped:X-OriginatorOrg:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:X-Gm-Message-State:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1689911543; v=1; b=C18RaYbgjj1BRHU/yqy1FQ4DYmBQRzw8KH44UYcivfuZsiso9iKbvyIuPiab0TIe4qe91Hvq yoCAVb3dnNfdPmJgjIZ61RPnHPNJiT3q5D9mw3DJzQ5NMpLpTzNh+5IdFafAYmQ1AzKRD4tHBJE wv48cQ7vdDweul9YS3Q7Nw+M= X-Received: by 127.0.0.2 with SMTP id aaGfYY7687511xYuBXkzn9d2; Thu, 20 Jul 2023 20:52:23 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.38.1689911542616381479 for ; Thu, 20 Jul 2023 20:52:22 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="364396075" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="364396075" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2023 20:52:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="814794294" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="814794294" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 20 Jul 2023 20:52:21 -0700 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.27; Thu, 20 Jul 2023 20:52:21 -0700 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.27 via Frontend Transport; Thu, 20 Jul 2023 20:52:21 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 20 Jul 2023 20:52:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MHmaWvR026/eabyhynopufhasRA3JsBjJdDZk67qRWNkZyodCLiKGq8MmtHSvnrG76f6+Qn/ckZxdhsDxPIsZQSHpi+nrH4bckT4v7Q4CmBTagQK9mPkBgRtczls1Ec64Q9Oe687M2VN0gLoM0KG0IRDclvCzYueO1QNPIjp9SkdxhkwABx2AR5EoPG9FkoWJyLXVOYAs8NLYFXLPXmQvRsMeX8hjFzqE6xmB62wdtTKrSg6hN7iZnVhA2XrzObjZKvK9tBAdVpK1+NBzXCsEcJGzwcv5ae7hkkQg1hOb5q82yBewTQ+zvNNrBXRD1aUtCDFKS1VrBZ2x+wTWbeKLQ== 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=qI3gVTCnYMUA1ov3WZZWSiyEgJGGJgsI2O+7nDe/ujA=; b=Wo4yiCtTPTUJh+TthfRKOch28uPUhb/fDuWOnHzRZ/I0078LHrdwvyd8SmmDx07cc2EX96epzDS9/T1f6/AkZXwL2f1YizV4qa3RjHxqIdi5CwFkoJ7suSDjS1nAGRw/wV1biz05aIaw3qZmcVql6tYaU/kVrghAGNWMq83Bql63SiPKMUj6zHB0nTBVXFoMdZstIoScwphtbGTsBa7j+z30MN5gd46RDmV+hUw8J4vOX7LiHlAhUXz8Ib/Cnfi5OuULnWwYfxOEbTtPHvzeF92gjMlqF4o/0QdZnGobGO/vSO4X27inebfuCL8LvCe3px3gX0pTQki8LwD441XAcA== 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 DS7PR11MB6175.namprd11.prod.outlook.com (2603:10b6:8:99::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Fri, 21 Jul 2023 03:52:12 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::bf9a:54ca:d270:59b]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::bf9a:54ca:d270:59b%5]) with mapi id 15.20.6609.025; Fri, 21 Jul 2023 03:52:12 +0000 From: "Ni, Ray" To: "Xie, Yuanhao" , "devel@edk2.groups.io" CC: "Dong, Guo" , "Rhodes, Sean" , "Lu, James" , "Guo, Gua" Subject: Re: [edk2-devel] [Patch V3 1/4] UefiCpuPkg: Add SendStartupIpiAllExcludingSelf Thread-Topic: [Patch V3 1/4] UefiCpuPkg: Add SendStartupIpiAllExcludingSelf Thread-Index: AQHZutjsOfOI0rpCmkecYgrRVfagDq/Dl7Kw Date: Fri, 21 Jul 2023 03:52:12 +0000 Message-ID: References: <20230720070736.4562-1-yuanhao.xie@intel.com> <20230720070736.4562-2-yuanhao.xie@intel.com> In-Reply-To: <20230720070736.4562-2-yuanhao.xie@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DS7PR11MB6175:EE_ x-ms-office365-filtering-correlation-id: de397d3e-0bd8-4a65-3d10-08db899ddd9b x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: V2xwO5IleohP1H3YsTEsy4/FdSgN8OpINuu/bZQ1lzBFN262bK11ud8HBi5Uyf6gpvE9ICANUGT4EocJOt7qxFaI60jU9yC1KE1T/6rY4s3DFOkcfE3fsdLIQF8FSXDwTuXdYhGNNeYDdjggGe4Z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KQjXHnszotZOAn5D1O0VsxUQ5C/JR8vRV1ATGZIBo0WTGzEETULUem?= =?us-ascii?Q?uO8UDadPe0eNCSpOS4dRBu+H/TkeOxH6tdwPHftyy044MolLA9vU/SAEzR1z?= =?us-ascii?Q?PovySoguZo6viTDhCWBHGn9oeDFWE+QZZ1X/112jSNsx85KxmDoW0AG8+BND?= =?us-ascii?Q?KiCZAgy9gGTKW+wcNiAKJEMGO9yyyFaYoShUliD2/LqTjA5oWyvHNhGf2x3c?= =?us-ascii?Q?vE8sYRA5iY7FQN430gjHO/S1zZ2V1wXWRUEew6skuMQuBf+QUebx4DJH59sm?= =?us-ascii?Q?petVEDK+Mf7yPyS8IqI=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: de397d3e-0bd8-4a65-3d10-08db899ddd9b X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2023 03:52:12.3286 (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: eTuR6vYMSt0aZVlElVB06xfVy4cI8Z867phBdRUVEhPCAJFhNZQPvxG6rAUtMywZgUZ38gnwhmYDB5I5FPaLMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6175 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: M0wj0yOwt8eMJfii2Qd2vroux7686176AA= 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=C18RaYbg; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Reviewed-by: Ray Ni > -----Original Message----- > From: Xie, Yuanhao > Sent: Thursday, July 20, 2023 3:08 PM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao ; Dong, Guo ; > Ni, Ray ; Rhodes, Sean ; Lu, Jam= es > ; Guo, Gua > Subject: [Patch V3 1/4] UefiCpuPkg: Add SendStartupIpiAllExcludingSelf >=20 > From: Yuanhao Xie >=20 > Add new API SendStartupIpiAllExcludingSelf(), and modify > SendInitSipiSipiAllExcludingSelf() by let it call the new API. >=20 > Cc: Guo Dong > Cc: Ray Ni > Cc: Sean Rhodes > Cc: James Lu > Cc: Gua Guo > Signed-off-by: Yuanhao Xie > --- > UefiCpuPkg/Include/Library/LocalApicLib.h | 17 ++++++++= ++++++++- > UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 43 > ++++++++++++++++++++++++++++++------------- > UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 43 > ++++++++++++++++++++++++++++++------------- > 3 files changed, 76 insertions(+), 27 deletions(-) >=20 > diff --git a/UefiCpuPkg/Include/Library/LocalApicLib.h > b/UefiCpuPkg/Include/Library/LocalApicLib.h > index b55d88b0f5..d7c2ad3f70 100644 > --- a/UefiCpuPkg/Include/Library/LocalApicLib.h > +++ b/UefiCpuPkg/Include/Library/LocalApicLib.h > @@ -4,7 +4,7 @@ > Local APIC library assumes local APIC is enabled. It does not > handles cases where local APIC is disabled. >=20 > - Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2023, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -185,6 +185,21 @@ SendInitIpiAllExcludingSelf ( > VOID > ); >=20 > +/** > + Send a Start-up IPI to all processors excluding self. > + This function returns after the IPI has been accepted by the target pr= ocessors. > + if StartupRoutine >=3D 1M, then ASSERT. > + if StartupRoutine is not multiple of 4K, then ASSERT. > + @param StartupRoutine Points to a start-up routine which is below 1M > physical > + address and 4K aligned. > +**/ > + > +VOID > +EFIAPI > +SendStartupIpiAllExcludingSelf ( > + IN UINT32 StartupRoutine > + ); > + > /** > Send an INIT-Start-up-Start-up IPI sequence to a specified target proc= essor. >=20 > diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c > b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c > index 008b8a070b..d56c6275cc 100644 > --- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c > +++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c > @@ -3,7 +3,7 @@ >=20 > This local APIC library instance supports xAPIC mode only. >=20 > - Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2023, Intel Corporation. All rights reserved.
> Copyright (c) 2017 - 2020, AMD Inc. All rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent > @@ -497,6 +497,33 @@ SendInitIpiAllExcludingSelf ( > SendIpi (IcrLow.Uint32, 0); > } >=20 > +/** > + Send a Start-up IPI to all processors excluding self. > + This function returns after the IPI has been accepted by the target pr= ocessors. > + if StartupRoutine >=3D 1M, then ASSERT. > + if StartupRoutine is not multiple of 4K, then ASSERT. > + @param StartupRoutine Points to a start-up routine which is below 1M > physical > + address and 4K aligned. > +**/ > +VOID > +EFIAPI > +SendStartupIpiAllExcludingSelf ( > + IN UINT32 StartupRoutine > + ) > +{ > + LOCAL_APIC_ICR_LOW IcrLow; > + > + ASSERT (StartupRoutine < 0x100000); > + ASSERT ((StartupRoutine & 0xfff) =3D=3D 0); > + > + IcrLow.Uint32 =3D 0; > + IcrLow.Bits.Vector =3D (StartupRoutine >> 12); > + IcrLow.Bits.DeliveryMode =3D LOCAL_APIC_DELIVERY_MODE_STARTUP; > + IcrLow.Bits.Level =3D 1; > + IcrLow.Bits.DestinationShorthand =3D > LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF; > + SendIpi (IcrLow.Uint32, 0); > +} > + > /** > Send an INIT-Start-up-Start-up IPI sequence to a specified target proc= essor. >=20 > @@ -551,22 +578,12 @@ SendInitSipiSipiAllExcludingSelf ( > IN UINT32 StartupRoutine > ) > { > - LOCAL_APIC_ICR_LOW IcrLow; > - > - ASSERT (StartupRoutine < 0x100000); > - ASSERT ((StartupRoutine & 0xfff) =3D=3D 0); > - > SendInitIpiAllExcludingSelf (); > MicroSecondDelay (PcdGet32 (PcdCpuInitIpiDelayInMicroSeconds)); > - IcrLow.Uint32 =3D 0; > - IcrLow.Bits.Vector =3D (StartupRoutine >> 12); > - IcrLow.Bits.DeliveryMode =3D LOCAL_APIC_DELIVERY_MODE_STARTUP; > - IcrLow.Bits.Level =3D 1; > - IcrLow.Bits.DestinationShorthand =3D > LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF; > - SendIpi (IcrLow.Uint32, 0); > + SendStartupIpiAllExcludingSelf (StartupRoutine); > if (!StandardSignatureIsAuthenticAMD ()) { > MicroSecondDelay (200); > - SendIpi (IcrLow.Uint32, 0); > + SendStartupIpiAllExcludingSelf (StartupRoutine); > } > } >=20 > diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c > b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c > index 0ba0499631..aa4eb11181 100644 > --- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c > +++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c > @@ -4,7 +4,7 @@ > This local APIC library instance supports x2APIC capable processors > which have xAPIC and x2APIC modes. >=20 > - Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2023, Intel Corporation. All rights reserved.
> Copyright (c) 2017 - 2020, AMD Inc. All rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent > @@ -736,6 +736,33 @@ SendInitIpiAllExcludingSelf ( > SendIpi (IcrLow.Uint32, 0); > } >=20 > +/** > + Send a Start-up IPI to all processors excluding self. > + This function returns after the IPI has been accepted by the target pr= ocessors. > + if StartupRoutine >=3D 1M, then ASSERT. > + if StartupRoutine is not multiple of 4K, then ASSERT. > + @param StartupRoutine Points to a start-up routine which is below 1M > physical > + address and 4K aligned. > +**/ > +VOID > +EFIAPI > +SendStartupIpiAllExcludingSelf ( > + IN UINT32 StartupRoutine > + ) > +{ > + LOCAL_APIC_ICR_LOW IcrLow; > + > + ASSERT (StartupRoutine < 0x100000); > + ASSERT ((StartupRoutine & 0xfff) =3D=3D 0); > + > + IcrLow.Uint32 =3D 0; > + IcrLow.Bits.Vector =3D (StartupRoutine >> 12); > + IcrLow.Bits.DeliveryMode =3D LOCAL_APIC_DELIVERY_MODE_STARTUP; > + IcrLow.Bits.Level =3D 1; > + IcrLow.Bits.DestinationShorthand =3D > LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF; > + SendIpi (IcrLow.Uint32, 0); > +} > + > /** > Send an INIT-Start-up-Start-up IPI sequence to a specified target proc= essor. >=20 > @@ -790,22 +817,12 @@ SendInitSipiSipiAllExcludingSelf ( > IN UINT32 StartupRoutine > ) > { > - LOCAL_APIC_ICR_LOW IcrLow; > - > - ASSERT (StartupRoutine < 0x100000); > - ASSERT ((StartupRoutine & 0xfff) =3D=3D 0); > - > SendInitIpiAllExcludingSelf (); > MicroSecondDelay (PcdGet32 (PcdCpuInitIpiDelayInMicroSeconds)); > - IcrLow.Uint32 =3D 0; > - IcrLow.Bits.Vector =3D (StartupRoutine >> 12); > - IcrLow.Bits.DeliveryMode =3D LOCAL_APIC_DELIVERY_MODE_STARTUP; > - IcrLow.Bits.Level =3D 1; > - IcrLow.Bits.DestinationShorthand =3D > LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF; > - SendIpi (IcrLow.Uint32, 0); > + SendStartupIpiAllExcludingSelf (StartupRoutine); > if (!StandardSignatureIsAuthenticAMD ()) { > MicroSecondDelay (200); > - SendIpi (IcrLow.Uint32, 0); > + SendStartupIpiAllExcludingSelf (StartupRoutine); > } > } >=20 > -- > 2.36.1.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 (#107117): https://edk2.groups.io/g/devel/message/107117 Mute This Topic: https://groups.io/mt/100251415/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-