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.136, mailfrom: ray.ni@intel.com) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by groups.io with SMTP; Mon, 22 Jul 2019 22:54:49 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 22:54:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,297,1559545200"; d="scan'208";a="174444180" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 22 Jul 2019 22:54:48 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jul 2019 22:54:48 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jul 2019 22:54:47 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.55]) with mapi id 14.03.0439.000; Tue, 23 Jul 2019 13:51:00 +0800 From: "Ni, Ray" To: "Dong, Eric" , "devel@edk2.groups.io" CC: Laszlo Ersek , "Kumar, Chandana C" , "Zeng, Star" Subject: Re: [Patch v2 4/6] UefiCpuPkg: Add new EDKII_PEI_MP_SERVICES2_PPI Thread-Topic: [Patch v2 4/6] UefiCpuPkg: Add new EDKII_PEI_MP_SERVICES2_PPI Thread-Index: AQHVQF0miyPSgX6Fsk+Sg7dgLvGKsKbXs++Q Date: Tue, 23 Jul 2019 05:51:00 +0000 Deferred-Delivery: Tue, 23 Jul 2019 05:50:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C240D54@SHSMSX104.ccr.corp.intel.com> References: <20190722071423.17372-1-eric.dong@intel.com> <20190722071423.17372-5-eric.dong@intel.com> In-Reply-To: <20190722071423.17372-5-eric.dong@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Dong, Eric > Sent: Monday, July 22, 2019 3:14 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Laszlo Ersek ; Kumar, > Chandana C ; Zeng, Star > > Subject: [Patch v2 4/6] UefiCpuPkg: Add new EDKII_PEI_MP_SERVICES2_PPI >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1973 >=20 > Add definition for new EDKII_PEI_MP_SERVICES2_PPI. >=20 > It includes all APIs existed in EFI_PEI_MP_SERVICES_PPI and add new API > EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS. >=20 > Cc: Ray Ni > Cc: Laszlo Ersek > Cc: Chandana Kumar > Cc: Star Zeng > Signed-off-by: Eric Dong > --- > UefiCpuPkg/Include/Ppi/EdkiiMpServices2.h | 72 > +++++++++++++++++++++++ > UefiCpuPkg/UefiCpuPkg.dec | 3 + > 2 files changed, 75 insertions(+) > create mode 100644 UefiCpuPkg/Include/Ppi/EdkiiMpServices2.h >=20 > diff --git a/UefiCpuPkg/Include/Ppi/EdkiiMpServices2.h > b/UefiCpuPkg/Include/Ppi/EdkiiMpServices2.h > new file mode 100644 > index 0000000000..c6b9712cc0 > --- /dev/null > +++ b/UefiCpuPkg/Include/Ppi/EdkiiMpServices2.h > @@ -0,0 +1,72 @@ > +/** @file > + This file declares edkii Multi-processor service PPI. > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef __EDKII_PEI_MP_SERVICES2_PPI_H__ #define > +__EDKII_PEI_MP_SERVICES2_PPI_H__ > + > +#include > + > +#define EDKII_PEI_MP_SERVICES2_PPI_GUID \ > + { \ > + 0x5cb9cb3d, 0x31a4, 0x480c, { 0x94, 0x98, 0x29, 0xd2, 0x69, 0xba, > +0xcf, 0xba} \ > + } > + > +typedef struct _EDKII_PEI_MP_SERVICES2_PPI > EDKII_PEI_MP_SERVICES2_PPI; > + > +typedef EFI_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS > EDKII_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS; > +typedef EFI_PEI_MP_SERVICES_GET_PROCESSOR_INFO > EDKII_PEI_MP_SERVICES_GET_PROCESSOR_INFO; > +typedef EFI_PEI_MP_SERVICES_STARTUP_ALL_APS > EDKII_PEI_MP_SERVICES_STARTUP_ALL_APS; > +typedef EFI_PEI_MP_SERVICES_STARTUP_THIS_AP > EDKII_PEI_MP_SERVICES_STARTUP_THIS_AP; > +typedef EFI_PEI_MP_SERVICES_SWITCH_BSP > EDKII_PEI_MP_SERVICES_SWITCH_BSP; > +typedef EFI_PEI_MP_SERVICES_ENABLEDISABLEAP > EDKII_PEI_MP_SERVICES_ENABLEDISABLEAP; > +typedef EFI_PEI_MP_SERVICES_WHOAMI > EDKII_PEI_MP_SERVICES_WHOAMI; > + > +/** > + Activate all of the application proessors. > + > + @param[in] This A pointer to the EDKII_PEI_MP_SERVICES= 2_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 microsecon= ds for APs to > + return from Procedure, for blocking mo= de only. Zero > + means infinity. If the timeout expire= s 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 finishe= d 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 expired = before > all > + enabled APs have finished. > + @retval EFI_INVALID_PARAMETER Procedure is NULL. > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS) ( > + IN EDKII_PEI_MP_SERVICES2_PPI *This, > + IN EFI_AP_PROCEDURE Procedure, > + IN UINTN TimeoutInMicroSeconds, > + IN VOID *ProcedureArgument OPTIONAL > + ); > + > +struct _EDKII_PEI_MP_SERVICES2_PPI { > + EDKII_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS > GetNumberOfProcessors; > + EDKII_PEI_MP_SERVICES_GET_PROCESSOR_INFO GetProcessorInfo; > + EDKII_PEI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs; > + EDKII_PEI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP; > + EDKII_PEI_MP_SERVICES_SWITCH_BSP SwitchBSP; > + EDKII_PEI_MP_SERVICES_ENABLEDISABLEAP EnableDisableAP; > + EDKII_PEI_MP_SERVICES_WHOAMI WhoAmI; > + EDKII_PEI_MP_SERVICES_STARTUP_ALL_CPUS StartupAllCPUs; > +}; > + > +extern EFI_GUID gEdkiiPeiMpServices2PpiGuid; > + > +#endif > diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec > index 6ddf0cd224..5a555644b7 100644 > --- a/UefiCpuPkg/UefiCpuPkg.dec > +++ b/UefiCpuPkg/UefiCpuPkg.dec > @@ -75,6 +75,9 @@ > # 0x80000001 | Invalid value provided. > # >=20 > +[Ppis] > + gEdkiiPeiMpServices2PpiGuid =3D { 0x5cb9cb3d, 0x31a4, 0x480c, { 0x9= 4, > 0x98, 0x29, 0xd2, 0x69, 0xba, 0xcf, 0xba}} > + > [PcdsFeatureFlag] > ## Indicates if SMM Profile will be enabled. > # If enabled, instruction executions in and data accesses to memory > outside of SMRAM will be logged. > -- > 2.21.0.windows.1