Re: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.

2019-07-11 Thread Laszlo Ersek
Hi Ray,

On 07/11/19 08:42, Ni, Ray wrote:
> + MdePkg maintainers
> 
> We need to follow the open source community process to include MdePkg
> maintainers for this change review.
> 
> Laszlo,
> You are in the Cc list and had given Regression-Tested-By for V3 patch series.
> It would be great if you could give patch owner a hint to avoid breaking the 
> process
> though I understand it's not responsibility of the people in the CC list. 

I'm unaware of any changes to the process.

In the commit message of the patch, Cc: tags should be included for all
"M" folks under XxxPkg, and also for all "R" folks who are listed with
interest in the given area (possibly the entirety of XxxPkg). The
contributor's git config should not include a
"sendemail.suppresscc=bodycc" setting; otherwise those Cc: tags will not
actually copy the intended reviewers.

For a given XxxPkg patch, at least one Acked-by or Required-by is needed
from an "M" person listed under XxxPkg in "Maintainers.txt", on the
mailing list, before the patch can be pushed.

Reviews and comments from others are welcome for the patch. The patch
should not be pushed as long as reasonable questions are still open for
it (regardless of origin). A patch should generally spend at least 24
hours on the list before it is pushed, even if an "M" approval arrives
earlier than that (so that others have a chance at noticing the patch
and at commenting). Once no questions seem to remain open, the patch has
spent the minimum time on the list, and there is public "M" approval,
the patch can be pushed.

An "M" person can defer to another "M" or "R" person, if he/she chooses
so. This is best done formally, i.e., wait until the deferred-to person
approves the patch, and then the first "M" person can give their own
Acked-by. (Standing for "I haven't reviewed in detail, but given the
circumstances / other reviews, I'm OK with this patch".)

When the patch is pushed, all feedback tags, given on the list for the
patch (regardless of origin), should be picked up, by whoever is pushing
the patch.

Let's consider the current state of this series, as an example.

- The first patch (for MdePkg) has an "M" review, from Liming.
- The second patch (for UefiCpuPkg) has an "M" review, from you.
- The series has an open question (regarding regression testing), from
myself.
- The series was posted more than 24 hours ago (as far as I can see).

So once I (hopefully) report back with an R-t-b for the series, the
series becomes pushable (assuming noone opens another question
meanwhile). In that case, any "M" person is welcome to push the patch
series -- in the current case, it will likely be Eric. When Eric
prepares for pushing the series, he's expected to pick up
- Liming's R-b for the first patch,
- my (to be posted) R-t-b for the first patch,
- your R-b for the second patch,
- my (to be posted) R-t-b for the second patch.

(I will likely send my R-t-b in response to the blurb (the "v5 0/2"
email), which means that the feedback tag applies to every patch in the
series.)

This "tag pickup" procedure is difficult to get right when using a MUA
that does not support a "threaded" view, and it is easy to get right
with a MUA that does. When I'm about to push a series, I tend to perform
one full scan over the thread:

- Whenever I reach patch-level feedback, I run "git rebase -i" for the
full series, just to pick up that one tag. (A single "reword" action
among the "pick"s.)

- Whenever I reach series-level feedback (grouped under the blurb), I
run "git rebase -i" for the full series again, and I apply the tag to
every patch in the series (all actions are set to "reword").

Thanks
Laszlo

>> -Original Message-
>> From: Dong, Eric
>> Sent: Wednesday, July 10, 2019 3:56 PM
>> To: devel@edk2.groups.io
>> Cc: Ni, Ray ; Laszlo Ersek 
>> Subject: [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.
>>
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1937
>>
>> EFI MM MP Protocol is defined in the PI 1.5 specification.
>>
>> The MM MP protocol provides a set of functions to allow execution of
>> procedures on processors that have entered MM. This protocol has the
>> following properties:
>> 1. The caller can invoke execution of a procedure on a processor, other than
>> the caller, that has also entered MM. Supports blocking and non-blocking
>> modes of operation.
>> 2. The caller can invoke a procedure on multiple processors. Supports
>> blocking and non-blocking modes of operation.
>>
>> Cc: Ray Ni 
>> Cc: Laszlo Ersek 
>> Signed-off-by: Eric Dong 
>> Reviewed-by: Ray Ni 
>> ---
>>  MdePkg/Include/Pi/PiMultiPhase.h |  16 ++
>>  MdePkg/Include/Protocol/MmMp.h   | 333
>> +++
>>  MdePkg/MdePkg.dec|   3 +
>>  3 files changed, 352 insertions(+)
>>  create mode 100644 MdePkg/Include/Protocol/MmMp.h
>>
>> diff --git a/MdePkg/Include/Pi/PiMultiPhase.h
>> b/MdePkg/Include/Pi/PiMultiPhase.h
>> index eb12527767..a5056799e1 100644
>> --- 

Re: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.

2019-07-11 Thread Liming Gao
Thanks for your CC.

The change is OK. Reviewed-by: Liming Gao 

>-Original Message-
>From: Dong, Eric
>Sent: Thursday, July 11, 2019 2:40 PM
>To: devel@edk2.groups.io; Dong, Eric ; Gao, Liming
>; Kinney, Michael D 
>Cc: Ni, Ray ; Laszlo Ersek 
>Subject: RE: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol
>definition.
>
>Hi Liming,  Mike,
>
>Can you help to review this patch?
>
>Thanks,
>Eric
>
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>> Dong, Eric
>> Sent: Wednesday, July 10, 2019 3:56 PM
>> To: devel@edk2.groups.io
>> Cc: Ni, Ray ; Laszlo Ersek 
>> Subject: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol
>> definition.
>>
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1937
>>
>> EFI MM MP Protocol is defined in the PI 1.5 specification.
>>
>> The MM MP protocol provides a set of functions to allow execution of
>> procedures on processors that have entered MM. This protocol has the
>> following properties:
>> 1. The caller can invoke execution of a procedure on a processor, other than
>> the caller, that has also entered MM. Supports blocking and non-blocking
>> modes of operation.
>> 2. The caller can invoke a procedure on multiple processors. Supports
>> blocking and non-blocking modes of operation.
>>
>> Cc: Ray Ni 
>> Cc: Laszlo Ersek 
>> Signed-off-by: Eric Dong 
>> Reviewed-by: Ray Ni 
>> ---
>>  MdePkg/Include/Pi/PiMultiPhase.h |  16 ++
>>  MdePkg/Include/Protocol/MmMp.h   | 333
>> +++
>>  MdePkg/MdePkg.dec|   3 +
>>  3 files changed, 352 insertions(+)
>>  create mode 100644 MdePkg/Include/Protocol/MmMp.h
>>
>> diff --git a/MdePkg/Include/Pi/PiMultiPhase.h
>> b/MdePkg/Include/Pi/PiMultiPhase.h
>> index eb12527767..a5056799e1 100644
>> --- a/MdePkg/Include/Pi/PiMultiPhase.h
>> +++ b/MdePkg/Include/Pi/PiMultiPhase.h
>> @@ -176,4 +176,20 @@ VOID
>>IN OUT VOID  *Buffer
>>);
>>
>> +/**
>> +  The function prototype for invoking a function on an Application
>Processor.
>> +
>> +  This definition is used by the UEFI MM MP Serices Protocol.
>> +
>> +  @param[in] ProcedureArgumentThe pointer to private data buffer.
>> +
>> +  @retval EFI_SUCCESS Excutive the procedure successfully
>> +
>> +**/
>> +typedef
>> +EFI_STATUS
>> +(EFIAPI *EFI_AP_PROCEDURE2)(
>> +  IN VOID  *ProcedureArgument
>> +);
>> +
>>  #endif
>> diff --git a/MdePkg/Include/Protocol/MmMp.h
>> b/MdePkg/Include/Protocol/MmMp.h new file mode 100644 index
>> 00..beace1386c
>> --- /dev/null
>> +++ b/MdePkg/Include/Protocol/MmMp.h
>> @@ -0,0 +1,333 @@
>> +/** @file
>> +  EFI MM MP Protocol is defined in the PI 1.5 specification.
>> +
>> +  The MM MP protocol provides a set of functions to allow execution of
>> + procedures on processors that  have entered MM. This protocol has the
>> following properties:
>> +  1. The caller can only invoke execution of a procedure on a processor,
>> other than the caller, that
>> + has also entered MM.
>> +  2. It is possible to invoke a procedure on multiple processors. Supports
>> blocking and non-blocking
>> + modes of operation.
>> +
>> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
>> +  SPDX-License-Identifier: BSD-2-Clause-Patent
>> +
>> +**/
>> +
>> +#ifndef _MM_MP_H_
>> +#define _MM_MP_H_
>> +
>> +#include 
>> +
>> +#define EFI_MM_MP_PROTOCOL_GUID \
>> +  { \
>> +0x5d5450d7, 0x990c, 0x4180, {0xa8, 0x3, 0x8e, 0x63, 0xf0, 0x60,
>> +0x83, 0x7  }  \
>> +  }
>> +
>> +//
>> +// Revision definition.
>> +//
>> +#define EFI_MM_MP_PROTOCOL_REVISION0x00
>> +
>> +//
>> +// Attribute flags
>> +//
>> +#define EFI_MM_MP_TIMEOUT_SUPPORTED0x01
>> +
>> +//
>> +// Completion token
>> +//
>> +typedef VOID* MM_COMPLETION;
>> +
>> +typedef struct {
>> +  MM_COMPLETION  Completion;
>> +  EFI_STATUS Status;
>> +} MM_DISPATCH_COMPLETION_TOKEN;
>> +
>> +typedef struct _EFI_MM_MP_PROTOCOL  EFI_MM_MP_PROTOCOL;
>> +
>> +/**
>> +  Service to retrieves the number of logical processor in the platform.
>> +
>> +  @param[in]  ThisThe EFI_MM_MP_PROTOCOL instance.
>> +  @param[out] NumberOfProcessors  Pointer to the total number of logical
>&

Re: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.

2019-07-11 Thread Ni, Ray
+ MdePkg maintainers

We need to follow the open source community process to include MdePkg
maintainers for this change review.

Laszlo,
You are in the Cc list and had given Regression-Tested-By for V3 patch series.
It would be great if you could give patch owner a hint to avoid breaking the 
process
though I understand it's not responsibility of the people in the CC list. 

Thanks,
Ray


> -Original Message-
> From: Dong, Eric
> Sent: Wednesday, July 10, 2019 3:56 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Laszlo Ersek 
> Subject: [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1937
> 
> EFI MM MP Protocol is defined in the PI 1.5 specification.
> 
> The MM MP protocol provides a set of functions to allow execution of
> procedures on processors that have entered MM. This protocol has the
> following properties:
> 1. The caller can invoke execution of a procedure on a processor, other than
> the caller, that has also entered MM. Supports blocking and non-blocking
> modes of operation.
> 2. The caller can invoke a procedure on multiple processors. Supports
> blocking and non-blocking modes of operation.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Signed-off-by: Eric Dong 
> Reviewed-by: Ray Ni 
> ---
>  MdePkg/Include/Pi/PiMultiPhase.h |  16 ++
>  MdePkg/Include/Protocol/MmMp.h   | 333
> +++
>  MdePkg/MdePkg.dec|   3 +
>  3 files changed, 352 insertions(+)
>  create mode 100644 MdePkg/Include/Protocol/MmMp.h
> 
> diff --git a/MdePkg/Include/Pi/PiMultiPhase.h
> b/MdePkg/Include/Pi/PiMultiPhase.h
> index eb12527767..a5056799e1 100644
> --- a/MdePkg/Include/Pi/PiMultiPhase.h
> +++ b/MdePkg/Include/Pi/PiMultiPhase.h
> @@ -176,4 +176,20 @@ VOID
>IN OUT VOID  *Buffer
>);
> 
> +/**
> +  The function prototype for invoking a function on an Application Processor.
> +
> +  This definition is used by the UEFI MM MP Serices Protocol.
> +
> +  @param[in] ProcedureArgumentThe pointer to private data buffer.
> +
> +  @retval EFI_SUCCESS Excutive the procedure successfully
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_AP_PROCEDURE2)(
> +  IN VOID  *ProcedureArgument
> +);
> +
>  #endif
> diff --git a/MdePkg/Include/Protocol/MmMp.h
> b/MdePkg/Include/Protocol/MmMp.h new file mode 100644 index
> 00..beace1386c
> --- /dev/null
> +++ b/MdePkg/Include/Protocol/MmMp.h
> @@ -0,0 +1,333 @@
> +/** @file
> +  EFI MM MP Protocol is defined in the PI 1.5 specification.
> +
> +  The MM MP protocol provides a set of functions to allow execution of
> + procedures on processors that  have entered MM. This protocol has the
> following properties:
> +  1. The caller can only invoke execution of a procedure on a processor,
> other than the caller, that
> + has also entered MM.
> +  2. It is possible to invoke a procedure on multiple processors. Supports
> blocking and non-blocking
> + modes of operation.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _MM_MP_H_
> +#define _MM_MP_H_
> +
> +#include 
> +
> +#define EFI_MM_MP_PROTOCOL_GUID \
> +  { \
> +0x5d5450d7, 0x990c, 0x4180, {0xa8, 0x3, 0x8e, 0x63, 0xf0, 0x60,
> +0x83, 0x7  }  \
> +  }
> +
> +//
> +// Revision definition.
> +//
> +#define EFI_MM_MP_PROTOCOL_REVISION0x00
> +
> +//
> +// Attribute flags
> +//
> +#define EFI_MM_MP_TIMEOUT_SUPPORTED0x01
> +
> +//
> +// Completion token
> +//
> +typedef VOID* MM_COMPLETION;
> +
> +typedef struct {
> +  MM_COMPLETION  Completion;
> +  EFI_STATUS Status;
> +} MM_DISPATCH_COMPLETION_TOKEN;
> +
> +typedef struct _EFI_MM_MP_PROTOCOL  EFI_MM_MP_PROTOCOL;
> +
> +/**
> +  Service to retrieves the number of logical processor in the platform.
> +
> +  @param[in]  ThisThe EFI_MM_MP_PROTOCOL instance.
> +  @param[out] NumberOfProcessors  Pointer to the total number of logical
> processors in the system,
> +  including the BSP and all APs.
> +
> +  @retval EFI_SUCCESS The number of processors was retrieved
> successfully
> +  @retval EFI_INVALID_PARAMETER   NumberOfProcessors is NULL
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_MM_GET_NUMBER_OF_PROCESSORS) (
> +  IN CONST EFI_MM_MP_PROTOCOL  *This,
> +  OUT  UINTN   *NumberOfProcessors
> +);
> +
> +
> +/**
> +  This service allows the caller to invoke a procedure one of the
> +application processors (AP). This
> +  function uses an optional token parameter to support blocking and
> +non-blocking modes. If the token
> +  is passed into the call, the function will operate in a non-blocking
> +fashion and the caller can
> +  check for completion with CheckOnProcedure or WaitForProcedure.
> +
> +  @param[in] This   The EFI_MM_MP_PROTOCOL instance.
> +  @param[in] Procedure  A pointer to the procedure to be run 
> on
> the 

Re: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.

2019-07-11 Thread Dong, Eric
Hi Liming,  Mike,

Can you help to review this patch? 

Thanks,
Eric

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Dong, Eric
> Sent: Wednesday, July 10, 2019 3:56 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Laszlo Ersek 
> Subject: [edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol
> definition.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1937
> 
> EFI MM MP Protocol is defined in the PI 1.5 specification.
> 
> The MM MP protocol provides a set of functions to allow execution of
> procedures on processors that have entered MM. This protocol has the
> following properties:
> 1. The caller can invoke execution of a procedure on a processor, other than
> the caller, that has also entered MM. Supports blocking and non-blocking
> modes of operation.
> 2. The caller can invoke a procedure on multiple processors. Supports
> blocking and non-blocking modes of operation.
> 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Signed-off-by: Eric Dong 
> Reviewed-by: Ray Ni 
> ---
>  MdePkg/Include/Pi/PiMultiPhase.h |  16 ++
>  MdePkg/Include/Protocol/MmMp.h   | 333
> +++
>  MdePkg/MdePkg.dec|   3 +
>  3 files changed, 352 insertions(+)
>  create mode 100644 MdePkg/Include/Protocol/MmMp.h
> 
> diff --git a/MdePkg/Include/Pi/PiMultiPhase.h
> b/MdePkg/Include/Pi/PiMultiPhase.h
> index eb12527767..a5056799e1 100644
> --- a/MdePkg/Include/Pi/PiMultiPhase.h
> +++ b/MdePkg/Include/Pi/PiMultiPhase.h
> @@ -176,4 +176,20 @@ VOID
>IN OUT VOID  *Buffer
>);
> 
> +/**
> +  The function prototype for invoking a function on an Application Processor.
> +
> +  This definition is used by the UEFI MM MP Serices Protocol.
> +
> +  @param[in] ProcedureArgumentThe pointer to private data buffer.
> +
> +  @retval EFI_SUCCESS Excutive the procedure successfully
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_AP_PROCEDURE2)(
> +  IN VOID  *ProcedureArgument
> +);
> +
>  #endif
> diff --git a/MdePkg/Include/Protocol/MmMp.h
> b/MdePkg/Include/Protocol/MmMp.h new file mode 100644 index
> 00..beace1386c
> --- /dev/null
> +++ b/MdePkg/Include/Protocol/MmMp.h
> @@ -0,0 +1,333 @@
> +/** @file
> +  EFI MM MP Protocol is defined in the PI 1.5 specification.
> +
> +  The MM MP protocol provides a set of functions to allow execution of
> + procedures on processors that  have entered MM. This protocol has the
> following properties:
> +  1. The caller can only invoke execution of a procedure on a processor,
> other than the caller, that
> + has also entered MM.
> +  2. It is possible to invoke a procedure on multiple processors. Supports
> blocking and non-blocking
> + modes of operation.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _MM_MP_H_
> +#define _MM_MP_H_
> +
> +#include 
> +
> +#define EFI_MM_MP_PROTOCOL_GUID \
> +  { \
> +0x5d5450d7, 0x990c, 0x4180, {0xa8, 0x3, 0x8e, 0x63, 0xf0, 0x60,
> +0x83, 0x7  }  \
> +  }
> +
> +//
> +// Revision definition.
> +//
> +#define EFI_MM_MP_PROTOCOL_REVISION0x00
> +
> +//
> +// Attribute flags
> +//
> +#define EFI_MM_MP_TIMEOUT_SUPPORTED0x01
> +
> +//
> +// Completion token
> +//
> +typedef VOID* MM_COMPLETION;
> +
> +typedef struct {
> +  MM_COMPLETION  Completion;
> +  EFI_STATUS Status;
> +} MM_DISPATCH_COMPLETION_TOKEN;
> +
> +typedef struct _EFI_MM_MP_PROTOCOL  EFI_MM_MP_PROTOCOL;
> +
> +/**
> +  Service to retrieves the number of logical processor in the platform.
> +
> +  @param[in]  ThisThe EFI_MM_MP_PROTOCOL instance.
> +  @param[out] NumberOfProcessors  Pointer to the total number of logical
> processors in the system,
> +  including the BSP and all APs.
> +
> +  @retval EFI_SUCCESS The number of processors was retrieved
> successfully
> +  @retval EFI_INVALID_PARAMETER   NumberOfProcessors is NULL
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EFI_MM_GET_NUMBER_OF_PROCESSORS) (
> +  IN CONST EFI_MM_MP_PROTOCOL  *This,
> +  OUT  UINTN   *NumberOfProcessors
> +);
> +
> +
> +/**
> +  This service allows the caller to invoke a procedure one of the
> +application processors (AP). This
> +  function uses an optional token parameter to support blocking and
> +non-blocking modes. If the token
> +  is passed into the call, the function will operate in a non-blocking
> +fashion and the caller can
> +  check for completion with CheckOnProcedure 

[edk2-devel] [Patch v5 1/2] MdePkg: Add new MM MP Protocol definition.

2019-07-10 Thread Dong, Eric
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1937

EFI MM MP Protocol is defined in the PI 1.5 specification.

The MM MP protocol provides a set of functions to allow execution of
procedures on processors that have entered MM. This protocol has the
following properties:
1. The caller can invoke execution of a procedure on a processor, other
than the caller, that has also entered MM. Supports blocking and
non-blocking modes of operation.
2. The caller can invoke a procedure on multiple processors. Supports
blocking and non-blocking modes of operation.

Cc: Ray Ni 
Cc: Laszlo Ersek 
Signed-off-by: Eric Dong 
Reviewed-by: Ray Ni 
---
 MdePkg/Include/Pi/PiMultiPhase.h |  16 ++
 MdePkg/Include/Protocol/MmMp.h   | 333 +++
 MdePkg/MdePkg.dec|   3 +
 3 files changed, 352 insertions(+)
 create mode 100644 MdePkg/Include/Protocol/MmMp.h

diff --git a/MdePkg/Include/Pi/PiMultiPhase.h b/MdePkg/Include/Pi/PiMultiPhase.h
index eb12527767..a5056799e1 100644
--- a/MdePkg/Include/Pi/PiMultiPhase.h
+++ b/MdePkg/Include/Pi/PiMultiPhase.h
@@ -176,4 +176,20 @@ VOID
   IN OUT VOID  *Buffer
   );
 
+/**
+  The function prototype for invoking a function on an Application Processor.
+
+  This definition is used by the UEFI MM MP Serices Protocol.
+
+  @param[in] ProcedureArgumentThe pointer to private data buffer.
+
+  @retval EFI_SUCCESS Excutive the procedure successfully
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_AP_PROCEDURE2)(
+  IN VOID  *ProcedureArgument
+);
+
 #endif
diff --git a/MdePkg/Include/Protocol/MmMp.h b/MdePkg/Include/Protocol/MmMp.h
new file mode 100644
index 00..beace1386c
--- /dev/null
+++ b/MdePkg/Include/Protocol/MmMp.h
@@ -0,0 +1,333 @@
+/** @file
+  EFI MM MP Protocol is defined in the PI 1.5 specification.
+
+  The MM MP protocol provides a set of functions to allow execution of 
procedures on processors that
+  have entered MM. This protocol has the following properties:
+  1. The caller can only invoke execution of a procedure on a processor, other 
than the caller, that
+ has also entered MM.
+  2. It is possible to invoke a procedure on multiple processors. Supports 
blocking and non-blocking
+ modes of operation.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _MM_MP_H_
+#define _MM_MP_H_
+
+#include 
+
+#define EFI_MM_MP_PROTOCOL_GUID \
+  { \
+0x5d5450d7, 0x990c, 0x4180, {0xa8, 0x3, 0x8e, 0x63, 0xf0, 0x60, 0x83, 0x7  
}  \
+  }
+
+//
+// Revision definition.
+//
+#define EFI_MM_MP_PROTOCOL_REVISION0x00
+
+//
+// Attribute flags
+//
+#define EFI_MM_MP_TIMEOUT_SUPPORTED0x01
+
+//
+// Completion token
+//
+typedef VOID* MM_COMPLETION;
+
+typedef struct {
+  MM_COMPLETION  Completion;
+  EFI_STATUS Status;
+} MM_DISPATCH_COMPLETION_TOKEN;
+
+typedef struct _EFI_MM_MP_PROTOCOL  EFI_MM_MP_PROTOCOL;
+
+/**
+  Service to retrieves the number of logical processor in the platform.
+
+  @param[in]  ThisThe EFI_MM_MP_PROTOCOL instance.
+  @param[out] NumberOfProcessors  Pointer to the total number of logical 
processors in the system,
+  including the BSP and all APs.
+
+  @retval EFI_SUCCESS The number of processors was retrieved 
successfully
+  @retval EFI_INVALID_PARAMETER   NumberOfProcessors is NULL
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_MM_GET_NUMBER_OF_PROCESSORS) (
+  IN CONST EFI_MM_MP_PROTOCOL  *This,
+  OUT  UINTN   *NumberOfProcessors
+);
+
+
+/**
+  This service allows the caller to invoke a procedure one of the application 
processors (AP). This
+  function uses an optional token parameter to support blocking and 
non-blocking modes. If the token
+  is passed into the call, the function will operate in a non-blocking fashion 
and the caller can
+  check for completion with CheckOnProcedure or WaitForProcedure.
+
+  @param[in] This   The EFI_MM_MP_PROTOCOL instance.
+  @param[in] Procedure  A pointer to the procedure to be run 
on the designated target
+AP of the system. Type 
EFI_AP_PROCEDURE2 is defined below in
+related definitions.
+  @param[in] CpuNumber  The zero-based index of the processor 
number of the target
+AP, on which the code stream is 
supposed to run. If the number
+points to the calling processor then 
it will not run the
+supplied code.
+  @param[in] TimeoutInMicroseconds  Indicates the time limit in 
microseconds for this AP to
+finish execution of Procedure, either 
for blocking or
+non-blocking mode. Zero means 
infinity. If the timeout
+expires