From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: eric.dong@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Sun, 21 Jul 2019 03:43:24 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jul 2019 03:43:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,290,1559545200"; d="scan'208";a="170588432" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 21 Jul 2019 03:43:24 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 21 Jul 2019 03:43:23 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 21 Jul 2019 03:43:23 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.3]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.60]) with mapi id 14.03.0439.000; Sun, 21 Jul 2019 18:43:21 +0800 From: "Dong, Eric" To: "Ni, Ray" , "devel@edk2.groups.io" CC: Laszlo Ersek , "Kumar, Chandana C" , "Zeng, Star" Subject: Re: [edk2-devel] [Patch 4/5] UefiCpuPkg/CpuMpPei: Produce EDKII_PEI_MP_SERVICES2_PPI. Thread-Topic: [edk2-devel] [Patch 4/5] UefiCpuPkg/CpuMpPei: Produce EDKII_PEI_MP_SERVICES2_PPI. Thread-Index: AQHVPgOMo60b4ArD60q3StY7AXwZmqbRlG3wgANRlnA= Date: Sun, 21 Jul 2019 10:43:20 +0000 Message-ID: References: <20190719072811.6352-1-eric.dong@intel.com> <20190719072811.6352-5-eric.dong@intel.com> <734D49CCEBEEF84792F5B80ED585239D5C2388EA@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C2388EA@SHSMSX104.ccr.corp.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 Ray, Agree, will remove this parameter in next version change. Thanks, Eric > -----Original Message----- > From: Ni, Ray > Sent: Friday, July 19, 2019 4:03 PM > To: devel@edk2.groups.io; Dong, Eric > Cc: Laszlo Ersek ; Kumar, Chandana C > ; Zeng, Star > Subject: RE: [edk2-devel] [Patch 4/5] UefiCpuPkg/CpuMpPei: Produce > EDKII_PEI_MP_SERVICES2_PPI. >=20 > If FailedCpuList isn't cared by the new PPI service, can we remove the > FailedCpuList parameter from the MpInitLib library API? >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Dong, > > Eric > > Sent: Friday, July 19, 2019 3:28 PM > > To: devel@edk2.groups.io > > Cc: Ni, Ray ; Laszlo Ersek ; > > Kumar, Chandana C ; Zeng, Star > > > > Subject: [edk2-devel] [Patch 4/5] UefiCpuPkg/CpuMpPei: Produce > > EDKII_PEI_MP_SERVICES2_PPI. > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1973 > > > > Produce new EDKII_PEI_MP_SERVICES2_PPI service. > > > > It includes all APIs existed in EFI_PEI_MP_SERVICES_PPI and add new > > API EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS. > > > > Cc: Ray Ni > > Cc: Laszlo Ersek > > Cc: Chandana Kumar > > Cc: Star Zeng > > Signed-off-by: Eric Dong > > --- > > UefiCpuPkg/CpuMpPei/CpuMpPei.c | 73 > > +++++++++++++++++++++++++++++--- > > UefiCpuPkg/CpuMpPei/CpuMpPei.h | 35 ++++++++++++++- > > UefiCpuPkg/CpuMpPei/CpuMpPei.inf | 1 + > > 3 files changed, 102 insertions(+), 7 deletions(-) > > > > diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c > > b/UefiCpuPkg/CpuMpPei/CpuMpPei.c index 926541c937..5ed2297770 > 100644 > > --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c > > +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c > > @@ -1,7 +1,7 @@ > > /** @file > > CPU PEI Module installs CPU Multiple Processor PPI. > > > > - 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 > > > > **/ > > @@ -21,10 +21,31 @@ EFI_PEI_MP_SERVICES_PPI mMpServices= Ppi > =3D > > { > > PeiWhoAmI, > > }; > > > > -EFI_PEI_PPI_DESCRIPTOR mPeiCpuMpPpiDesc =3D { > > - (EFI_PEI_PPI_DESCRIPTOR_PPI | > > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), > > - &gEfiPeiMpServicesPpiGuid, > > - &mMpServicesPpi > > +// > > +// CPU MP2 PPI to be installed > > +// > > +EDKII_PEI_MP_SERVICES2_PPI mMpServices2Ppi =3D { > > + PeiGetNumberOfProcessors, > > + PeiGetProcessorInfo, > > + PeiStartupAllAPs, > > + PeiStartupThisAP, > > + PeiSwitchBSP, > > + PeiEnableDisableAP, > > + PeiWhoAmI, > > + PeiStartupAllCPUs > > +}; > > + > > +EFI_PEI_PPI_DESCRIPTOR mPeiCpuMpPpiList[] =3D { > > + { > > + EFI_PEI_PPI_DESCRIPTOR_PPI, > > + &gEdkiiPeiMpServices2PpiGuid, > > + &mMpServices2Ppi > > + }, > > + { > > + (EFI_PEI_PPI_DESCRIPTOR_PPI | > > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), > > + &gEfiPeiMpServicesPpiGuid, > > + &mMpServicesPpi > > + } > > }; > > > > /** > > @@ -402,6 +423,46 @@ PeiWhoAmI ( > > return MpInitLibWhoAmI (ProcessorNumber); } > > > > +/** > > + This service executes a caller provided function on all enabled CPU= s. > > +CPUs can > > + run either simultaneously or one at a time in sequence. This > > +service may only > > + be called from the BSP. > > + > > + @param[in] This A pointer to the EDKII_PEI_MP_SERVI= CES2_PPI > > instance. > > + @param[in] Procedure A pointer to the function to be run= on > > enabled APs of > > + the system. > > + @param[in] TimeoutInMicroSeconds > > + Indicates the time limit in microse= conds for APs to > > + return from Procedure, for blocking= mode only. Zero > > + means infinity. If the timeout exp= ires in blocking > > + mode, BSP returns EFI_TIMEOUT. > > + @param[in] ProcedureArgument The parameter passed into Procedure > > for all CPUs. > > + > > + @retval EFI_SUCCESS In blocking mode, all APs have fini= shed > before > > the > > + timeout expired. > > + @retval EFI_DEVICE_ERROR Caller processor is AP. > > + @retval EFI_NOT_READY Any enabled APs are busy. > > + @retval EFI_TIMEOUT In blocking mode, the timeout expir= ed > before > > all > > + enabled APs have finished. > > + @retval EFI_INVALID_PARAMETER Procedure is NULL. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +PeiStartupAllCPUs ( > > + IN EDKII_PEI_MP_SERVICES2_PPI *This, > > + IN EFI_AP_PROCEDURE Procedure, > > + IN UINTN TimeoutInMicroSeconds, > > + IN VOID *ProcedureArgument OPTIONAL > > + ) > > +{ > > + return MpInitLibStartupAllCPUs ( > > + Procedure, > > + TimeoutInMicroSeconds, > > + ProcedureArgument, > > + NULL > > + ); > > +} > > + > > /** > > Get GDT register value. > > > > @@ -667,7 +728,7 @@ InitializeCpuMpWorker ( > > // > > // Install CPU MP PPI > > // > > - Status =3D PeiServicesInstallPpi(&mPeiCpuMpPpiDesc); > > + Status =3D PeiServicesInstallPpi(mPeiCpuMpPpiList); > > ASSERT_EFI_ERROR (Status); > > > > return Status; > > diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h > > b/UefiCpuPkg/CpuMpPei/CpuMpPei.h index a5d8a755b2..b385c5088b > > 100644 > > --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h > > +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h > > @@ -1,7 +1,7 @@ > > /** @file > > Definitions to install Multiple Processor PPI. > > > > - 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 > > > > **/ > > @@ -15,6 +15,7 @@ > > #include #include > > #include > > +#include > > > > #include > > #include > > @@ -431,6 +432,38 @@ MemoryDiscoveredPpiNotifyCallback ( > > IN VOID *Ppi > > ); > > > > +/** > > + This service executes a caller provided function on all enabled CPU= s. > > +CPUs can > > + run either simultaneously or one at a time in sequence. This > > +service may only > > + be called from the BSP. > > + > > + @param[in] This A pointer to the EDKII_PEI_MP_SERVI= CES2_PPI > > instance. > > + @param[in] Procedure A pointer to the function to be run= on > > enabled APs of > > + the system. > > + @param[in] TimeoutInMicroSeconds > > + Indicates the time limit in microse= conds for APs to > > + return from Procedure, for blocking= mode only. Zero > > + means infinity. If the timeout exp= ires in blocking > > + mode, BSP returns EFI_TIMEOUT. > > + @param[in] ProcedureArgument The parameter passed into Procedure > > for all CPUs. > > + > > + @retval EFI_SUCCESS In blocking mode, all APs have fini= shed > before > > the > > + timeout expired. > > + @retval EFI_DEVICE_ERROR Caller processor is AP. > > + @retval EFI_NOT_READY Any enabled APs are busy. > > + @retval EFI_TIMEOUT In blocking mode, the timeout expir= ed > before > > all > > + enabled APs have finished. > > + @retval EFI_INVALID_PARAMETER Procedure is NULL. > > +**/ > > +EFI_STATUS > > +EFIAPI > > +PeiStartupAllCPUs ( > > + IN EDKII_PEI_MP_SERVICES2_PPI *This, > > + IN EFI_AP_PROCEDURE Procedure, > > + IN UINTN TimeoutInMicroSeconds, > > + IN VOID *ProcedureArgument OPTIONAL > > + ); > > + > > extern EFI_PEI_NOTIFY_DESCRIPTOR mPostMemNotifyList[]; > > > > #endif > > diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.inf > > b/UefiCpuPkg/CpuMpPei/CpuMpPei.inf > > index 4fc4ea77ba..e42ba824e4 100644 > > --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.inf > > +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.inf > > @@ -54,6 +54,7 @@ > > gEfiSecPlatformInformation2PpiGuid > > gEfiVectorHandoffInfoPpiGuid ## SOMETIMES_CONSUMES > > gEfiPeiMemoryDiscoveredPpiGuid ## CONSUMES > > + gEdkiiPeiMpServices2PpiGuid ## PRODUCES > > > > [Pcd] > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrM > > ask ## CONSUMES > > -- > > 2.21.0.windows.1 > > > > > >=20