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 9641EAC133B for ; Wed, 19 Jul 2023 09:03:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=sfn5hfRHd889OkJhinMkHNcsxckUbk2otBkfvDbZW4Q=; 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-Unsubscribe:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:X-Gm-Message-State:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1689757431; v=1; b=Fver6liBZx9XoX4hFT8jAcfwLEFh78flP0SmJ07QVjpsq2U6jguZKdOpjDtRFad7xXmzqDGA x0OYUllHuGJxiEq41P5b1oO86cAwPf6HQunU5W5oRQMfrQmJ7mlQjb679LAvIYhV5tHc9Zwggun C/XyDBezKAKVHJ5uXrFIot1o= X-Received: by 127.0.0.2 with SMTP id 74WYYY7687511xGftIA1kCZU; Wed, 19 Jul 2023 02:03:51 -0700 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.9603.1689757430366951086 for ; Wed, 19 Jul 2023 02:03:50 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10775"; a="432594961" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="432594961" X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 02:03:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10775"; a="837609742" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="837609742" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP; 19 Jul 2023 02:03:49 -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; Wed, 19 Jul 2023 02:03:49 -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; Wed, 19 Jul 2023 02:03:49 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) 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; Wed, 19 Jul 2023 02:03:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N/HkJTXrfGwThyhZ74i+wsPpqh8BUTQ2xlR3L/FX8N9tsPFnkbyWCqLbnq+SALH++W4g92Qo/nvyQ3a1+MDjVcPgnE4zhM7Z/6Y+NfuKXqmCt7dBKi/8ZKHTrEq+EsyGcp3DGf/J1lQB5AASrdulAQ707TigP5UeP4Q4c9zL6Gp5VGF7aKqJ+bXbno2E2a7oROmOBkqC57AKpSHKD5Z+hPG8Fj5Ka7wvzzKa/ROHHpz9PxxzFf4rSr3WnViYF2PtmF7bfs4AdywAYV7xCiRZu4/xHNGe3Zhra2rHBA1jg6RTLHkZ2bXbL+jseSk24YOuLiltxLIevvA1hGS4kq8bQg== 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=/IMUnYh9KyxST8bdJ/bMqbSGSgOu+9YH73D4YFIvdgo=; b=R9gAIatAdr8uobuHdMC2YYVncFIHy4OfdsmhcPZwvxok2e2MdZI7y4dVNUk3KSdpy7C4DhKfFXJ/0Cg8e3SHxEUD6kUCVn6nX7+rQFxxZUzmeXrF1s5H1j+keae+87bH81YgYsfeYW1C5IfqipUj7FH6RAZXIhId0LHLjw/an5KdsgzgXnZEG8matCkcBpW9JdVRxmSW5MGFV9SxAZsAF8ukML8PH3M2FPU13NNlRT9NGw2APi+BLdhI07IHpgefu+8TK48Vr9SbsiZqhKKZmLnqVI4NsrBn0eynY1T31kPDKGDGAB7my+s7CBR/T2gVH2J2Zxo0pcpThOjqCMougg== 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 CH3PR11MB8701.namprd11.prod.outlook.com (2603:10b6:610:1c8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.33; Wed, 19 Jul 2023 09:03:46 +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.6588.031; Wed, 19 Jul 2023 09:03:46 +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 1/4] UefiCpuPkg: Add SendStartupIpiAllExcludingSelf Thread-Topic: [PATCH 1/4] UefiCpuPkg: Add SendStartupIpiAllExcludingSelf Thread-Index: AQHZuhTtFbjxdkm8gk+cfmBrkc0H8q/Ay5OA Date: Wed, 19 Jul 2023 09:03:46 +0000 Message-ID: References: <20230719074435.4331-1-yuanhao.xie@intel.com> <20230719074435.4331-2-yuanhao.xie@intel.com> In-Reply-To: <20230719074435.4331-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_|CH3PR11MB8701:EE_ x-ms-office365-filtering-correlation-id: 4bbbf3f6-4ea5-4a1d-d399-08db88370f6e 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: P1u7c1UK6z4t5NFEct0MkL3BvEnsLuqB/Qy5dlwEkDnTm7K0ItNrwGdrLtkgTzD23NCKGRdYNKh/y4KubVeeiptL668uoXiToRESy7uXt4VR/sX8ojBwTvC7tBAAuCe2BlojgrwulpQ5s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JtBpkVkBC4gH6Wha0SISGLT5mCNzExLWXmSUbnxuF4Jxd4A/Er9Ed6jA6?= =?us-ascii?Q?dws9WxCmpfOXKaQTDn/OSRRzRLJpDa3LB0U+mlKTfaKkKFMSO10ivu4ZpBPz?= =?us-ascii?Q?90rs7Fd6KVWPYXgWf3i5NLi1VSvFrF8e08V7nNiK99imVj40GfUCmM/t8XjW?= =?us-ascii?Q?dtwz/ptBJfjp9mSUO7r072wfIVpjb6t3GoZiQX0vSFKoqBnV7zDcY6vNs50M?= =?us-ascii?Q?lTbVtbiFSEELsLbTO4xyoCRZXCB/J2GK8nGY+rz3eIqhDj4NTF6feCt7/L4n?= =?us-ascii?Q?YEDIrLXzYMjOz/fmLBM=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: 4bbbf3f6-4ea5-4a1d-d399-08db88370f6e X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2023 09:03:46.6170 (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: EQmjD92K8vXOchxZQ6BuIp18KozOM7MtwHxitLoeK0p2Fh4kb8I1ZkSjDwmy95nU2cvGlzWh39qV/JFCqp35Cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8701 X-OriginatorOrg: intel.com Precedence: Bulk List-Unsubscribe: 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 X-Gm-Message-State: gpipFUa2HLLu7Y3C51QPQEGYx7686176AA= 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=Fver6liB; 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 > -----Original Message----- > From: Xie, Yuanhao > Sent: Wednesday, July 19, 2023 3:45 PM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao ; Dong, Guo ; > Ni, Ray ; Rhodes, Sean ; Lu, Jam= es > ; Guo, Gua > Subject: [PATCH 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 +++++++- > .../Library/BaseXApicLib/BaseXApicLib.c | 43 +++++++++++++------ > .../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 (#107045): https://edk2.groups.io/g/devel/message/107045 Mute This Topic: https://groups.io/mt/100231360/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-