From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Dong, Eric" <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
"Kumar, Chandana C" <chandana.c.kumar@intel.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [edk2-devel] [Patch 3/5] UefiCpuPkg: Add new EDKII_PEI_MP_SERVICES2_PPI
Date: Fri, 19 Jul 2019 07:57:46 +0000 [thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C23888B@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190719072811.6352-4-eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io <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 <ray.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>; Kumar,
> Chandana C <chandana.c.kumar@intel.com>; Zeng, Star
> <star.zeng@intel.com>
> Subject: [edk2-devel] [Patch 3/5] UefiCpuPkg: Add new
> EDKII_PEI_MP_SERVICES2_PPI
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1973
>
> Add definition for new EDKII_PEI_MP_SERVICES2_PPI.
>
> 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 <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Chandana Kumar <chandana.c.kumar@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
> UefiCpuPkg/Include/Ppi/EdkiiMpServices2.h | 72
> +++++++++++++++++++++++
> UefiCpuPkg/UefiCpuPkg.dec | 3 +
> 2 files changed, 75 insertions(+)
> create mode 100644 UefiCpuPkg/Include/Ppi/EdkiiMpServices2.h
>
> 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.<BR>
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef __EDKII_PEI_MP_SERVICES2_PPI_H__
> +#define __EDKII_PEI_MP_SERVICES2_PPI_H__
> +
> +#include <Ppi/MpServices.h>
> +
> +#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_SERVICES2_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 microseconds for APs to
> + return from Procedure, for blocking mode only. Zero
> + means infinity. If the timeout expires 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 finished 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.
> #
>
> +[Ppis]
> + gEdkiiPeiMpServices2PpiGuid = { 0x5cb9cb3d, 0x31a4, 0x480c, { 0x94,
> 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
>
>
>
next prev parent reply other threads:[~2019-07-19 7:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-19 7:28 [Patch 0/5] UefiCpuPkg: Enable Edkii Mp Services2 Ppi Dong, Eric
2019-07-19 7:28 ` [Patch 1/5] UefiCpuPkg/Include/MpInitLib.h: Add MpInitLibStartupAllCPUs API Dong, Eric
2019-07-19 7:52 ` [edk2-devel] " Ni, Ray
2019-07-19 7:28 ` [Patch 2/5] UefiCpuPkg/MpInitLib: " Dong, Eric
2019-07-19 7:56 ` [edk2-devel] " Ni, Ray
2019-07-19 7:28 ` [Patch 3/5] UefiCpuPkg: Add new EDKII_PEI_MP_SERVICES2_PPI Dong, Eric
2019-07-19 7:57 ` Ni, Ray [this message]
2019-07-19 7:28 ` [Patch 4/5] UefiCpuPkg/CpuMpPei: Produce EDKII_PEI_MP_SERVICES2_PPI Dong, Eric
2019-07-19 8:03 ` [edk2-devel] " Ni, Ray
2019-07-21 10:43 ` Dong, Eric
2019-07-19 7:28 ` [Patch 5/5] UefiCpuPkg/RegisterCpuFeaturesLib: Start all processors simultaneously Dong, Eric
2019-07-19 8:06 ` [edk2-devel] " Ni, Ray
2019-07-19 12:45 ` [Patch 0/5] UefiCpuPkg: Enable Edkii Mp Services2 Ppi Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=734D49CCEBEEF84792F5B80ED585239D5C23888B@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox