summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Pi/PiMultiPhase.h
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Include/Pi/PiMultiPhase.h')
-rw-r--r--MdePkg/Include/Pi/PiMultiPhase.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/MdePkg/Include/Pi/PiMultiPhase.h b/MdePkg/Include/Pi/PiMultiPhase.h
index 1c7332e..5a22ca0 100644
--- a/MdePkg/Include/Pi/PiMultiPhase.h
+++ b/MdePkg/Include/Pi/PiMultiPhase.h
@@ -111,6 +111,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED
///
+/// MM Communicate header constants
+///
+#define COMMUNICATE_HEADER_V3_GUID \
+ { \
+ 0x68e8c853, 0x2ba9, 0x4dd7, { 0x9a, 0xc0, 0x91, 0xe1, 0x61, 0x55, 0xc9, 0x35 } \
+ }
+
+///
/// Structure describing a MMRAM region and its accessibility attributes.
///
typedef struct {
@@ -156,6 +164,47 @@ typedef struct _EFI_MM_RESERVED_MMRAM_REGION {
UINT64 MmramReservedSize;
} EFI_MM_RESERVED_MMRAM_REGION;
+#pragma pack(1)
+
+///
+/// To avoid confusion in interpreting frames, the buffer communicating to MM core through
+/// EFI_MM_COMMUNICATE3 or later should always start with EFI_MM_COMMUNICATE_HEADER_V3.
+///
+typedef struct {
+ ///
+ /// Indicator GUID for MM core that the communication buffer is compliant with this v3 header.
+ /// Must be gEfiMmCommunicateHeaderV3Guid.
+ ///
+ EFI_GUID HeaderGuid;
+ ///
+ /// Describes the size of the entire buffer (in bytes) available for communication, including this communication header.
+ ///
+ UINT64 BufferSize;
+ ///
+ /// Reserved for future use.
+ ///
+ UINT64 Reserved;
+ ///
+ /// Allows for disambiguation of the message format.
+ ///
+ EFI_GUID MessageGuid;
+ ///
+ /// Describes the size of MessageData (in bytes) and does not include the size of the header.
+ ///
+ UINT64 MessageSize;
+ ///
+ /// Designates an array of bytes that is MessageSize in size.
+ ///
+ UINT8 MessageData[];
+} EFI_MM_COMMUNICATE_HEADER_V3;
+
+#pragma pack()
+
+STATIC_ASSERT (
+ (sizeof (EFI_MM_COMMUNICATE_HEADER_V3) == OFFSET_OF (EFI_MM_COMMUNICATE_HEADER_V3, MessageData)), \
+ "sizeof (EFI_MM_COMMUNICATE_HEADER_V3) does not align with the beginning of flexible array MessageData"
+ );
+
typedef enum {
EFI_PCD_TYPE_8,
EFI_PCD_TYPE_16,
@@ -215,4 +264,6 @@ EFI_STATUS
IN VOID *ProcedureArgument
);
+extern EFI_GUID gEfiMmCommunicateHeaderV3Guid;
+
#endif