--- /dev/null
+/** @file\r
+ EFI MM Communication Protocol 2 as defined in the PI 1.7 errata A specification.\r
+\r
+ This protocol provides a means of communicating between drivers outside of MM and MMI\r
+ handlers inside of MM.\r
+\r
+ Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2019, Arm Limited. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef _MM_COMMUNICATION2_H_\r
+#define _MM_COMMUNICATION2_H_\r
+\r
+#include <Protocol/MmCommunication.h>\r
+\r
+#define EFI_MM_COMMUNICATION2_PROTOCOL_GUID \\r
+ { \\r
+ 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 } \\r
+ }\r
+\r
+typedef struct _EFI_MM_COMMUNICATION2_PROTOCOL EFI_MM_COMMUNICATION2_PROTOCOL;\r
+\r
+/**\r
+ Communicates with a registered handler.\r
+\r
+ This function provides a service to send and receive messages from a registered UEFI service.\r
+\r
+ @param[in] This The EFI_MM_COMMUNICATION_PROTOCOL instance.\r
+ @param[in] CommBufferPhysical Physical address of the MM communication buffer\r
+ @param[in] CommBufferVirtual Virtual address of the MM communication buffer\r
+ @param[in] CommSize The size of the data buffer being passed in. On exit, the size of data\r
+ being returned. Zero if the handler does not wish to reply with any data.\r
+ This parameter is optional and may be NULL.\r
+\r
+ @retval EFI_SUCCESS The message was successfully posted.\r
+ @retval EFI_INVALID_PARAMETER CommBufferPhysical was NULL or CommBufferVirtual was NULL.\r
+ @retval EFI_BAD_BUFFER_SIZE The buffer is too large for the MM implementation.\r
+ If this error is returned, the MessageLength field\r
+ in the CommBuffer header or the integer pointed by\r
+ CommSize, are updated to reflect the maximum payload\r
+ size the implementation can accommodate.\r
+ @retval EFI_ACCESS_DENIED The CommunicateBuffer parameter or CommSize parameter,\r
+ if not omitted, are in address range that cannot be\r
+ accessed by the MM environment.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_MM_COMMUNICATE2)(\r
+ IN CONST EFI_MM_COMMUNICATION2_PROTOCOL *This,\r
+ IN OUT VOID *CommBufferPhysical,\r
+ IN OUT VOID *CommBufferVirtual,\r
+ IN OUT UINTN *CommSize OPTIONAL\r
+ );\r
+\r
+///\r
+/// EFI MM Communication Protocol provides runtime services for communicating\r
+/// between DXE drivers and a registered MMI handler.\r
+///\r
+struct _EFI_MM_COMMUNICATION2_PROTOCOL {\r
+ EFI_MM_COMMUNICATE2 Communicate;\r
+};\r
+\r
+extern EFI_GUID gEfiMmCommunication2ProtocolGuid;\r
+\r
+#endif\r
+\r
## Include/Protocol/SpiSmmNorFlash.h\r
gEfiSpiSmmNorFlashProtocolGuid = { 0xaab18f19, 0xfe14, 0x4666, { 0x86, 0x04, 0x87, 0xff, 0x6d, 0x66, 0x2c, 0x9a }}\r
\r
+ #\r
+ # Protocols defined in PI 1.7.\r
+ #\r
+\r
+ ## Include/Protocol/MmCommunication2.h\r
+ gEfiMmCommunication2ProtocolGuid = { 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 }}\r
+\r
#\r
# Protocols defined in UEFI2.1/UEFI2.0/EFI1.1\r
#\r