--- /dev/null
+/** @file\r
+ EFI MM Communication PPI definition.\r
+\r
+ This PPI provides a means of communicating between drivers outside\r
+ of MM and MMI handlers inside of MM in PEI phase.\r
+\r
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) Microsoft Corporation.\r
+\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+\r
+#ifndef MM_COMMUNICATION_PPI_H_\r
+#define MM_COMMUNICATION_PPI_H_\r
+\r
+#define EFI_PEI_MM_COMMUNICATION_PPI_GUID \\r
+ { \\r
+ 0xae933e1c, 0xcc47, 0x4e38, { 0x8f, 0xe, 0xe2, 0xf6, 0x1d, 0x26, 0x5, 0xdf } \\r
+ }\r
+\r
+typedef struct _EFI_PEI_MM_COMMUNICATION_PPI EFI_PEI_MM_COMMUNICATION_PPI;\r
+\r
+/**\r
+ Communicates with a registered handler.\r
+\r
+ This function provides a service to send and receive messages from a registered PEI service.\r
+ The EFI_PEI_MM_COMMUNICATION_PPI driver is responsible for doing any of the copies such that\r
+ the data lives in PEI-service-accessible RAM.\r
+\r
+ A given implementation of the EFI_PEI_MM_COMMUNICATION_PPI may choose to use the\r
+ EFI_MM_CONTROL_PPI for effecting the mode transition, or it may use some other method.\r
+\r
+ The agent invoking the communication interface must be physical/virtually 1:1 mapped.\r
+\r
+ To avoid confusion in interpreting frames, the CommBuffer parameter should always begin with\r
+ EFI_MM_COMMUNICATE_HEADER. The header data is mandatory for messages sent into the MM agent.\r
+\r
+ Once inside of MM, the MM infrastructure will call all registered handlers with the same\r
+ HandlerType as the GUID specified by HeaderGuid and the CommBuffer pointing to Data.\r
+\r
+ This function is not reentrant.\r
+\r
+ @param[in] This The EFI_PEI_MM_COMMUNICATION_PPI instance.\r
+ @param[in] CommBuffer Pointer to the buffer to convey into MMRAM.\r
+ @param[in] CommSize The size of the data buffer being passed in. On exit, the\r
+ size of data being returned. Zero if the handler does not\r
+ wish to reply with any data.\r
+\r
+ @retval EFI_SUCCESS The message was successfully posted.\r
+ @retval EFI_INVALID_PARAMETER The buffer was NULL.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PEI_MM_COMMUNICATE)(\r
+ IN CONST EFI_PEI_MM_COMMUNICATION_PPI *This,\r
+ IN OUT VOID *CommBuffer,\r
+ IN OUT UINTN *CommSize\r
+ );\r
+\r
+///\r
+/// EFI MM Communication PPI provides services for communicating between PEIM and a registered\r
+/// MMI handler.\r
+///\r
+struct _EFI_PEI_MM_COMMUNICATION_PPI {\r
+ EFI_PEI_MM_COMMUNICATE Communicate;\r
+};\r
+\r
+extern EFI_GUID gEfiPeiMmCommunicationPpiGuid;\r
+\r
+#endif\r
## Include/Ppi/MmConfiguration.h\r
gEfiPeiMmConfigurationPpi = { 0xc109319, 0xc149, 0x450e, { 0xa3, 0xe3, 0xb9, 0xba, 0xdd, 0x9d, 0xc3, 0xa4 } }\r
\r
+ ## Include/Ppi/MmCommunication.h\r
+ gEfiPeiMmCommunicationPpiGuid = { 0xae933e1c, 0xcc47, 0x4e38, { 0x8f, 0xe, 0xe2, 0xf6, 0x1d, 0x26, 0x5, 0xdf } }\r
+\r
#\r
# PPIs defined in PI 1.7.\r
#\r