summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/efi/Pi
diff options
context:
space:
mode:
authorMichael Brown2025-11-11 17:18:45 +0100
committerMichael Brown2025-11-12 00:24:22 +0100
commit27ec3c76ab2dfdc384c589b9f4c8a610a33ba8d1 (patch)
treeb6491caef5006abe8f3ebcf00873484dbe193520 /src/include/ipxe/efi/Pi
parent[efi] Mark Arm/ProcessorBind.h as a non-imported header (diff)
downloadipxe-27ec3c76ab2dfdc384c589b9f4c8a610a33ba8d1.tar.gz
ipxe-27ec3c76ab2dfdc384c589b9f4c8a610a33ba8d1.tar.xz
ipxe-27ec3c76ab2dfdc384c589b9f4c8a610a33ba8d1.zip
[efi] Update to current EDK2 headers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi/Pi')
-rw-r--r--src/include/ipxe/efi/Pi/PiMultiPhase.h51
-rw-r--r--src/include/ipxe/efi/Pi/PiS3BootScript.h2
-rw-r--r--src/include/ipxe/efi/Pi/PiStatusCode.h2
3 files changed, 53 insertions, 2 deletions
diff --git a/src/include/ipxe/efi/Pi/PiMultiPhase.h b/src/include/ipxe/efi/Pi/PiMultiPhase.h
index 187b131bc..828ea52f6 100644
--- a/src/include/ipxe/efi/Pi/PiMultiPhase.h
+++ b/src/include/ipxe/efi/Pi/PiMultiPhase.h
@@ -113,6 +113,14 @@ FILE_LICENCE ( BSD2_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 {
@@ -158,6 +166,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,
@@ -217,4 +266,6 @@ EFI_STATUS
IN VOID *ProcedureArgument
);
+extern EFI_GUID gEfiMmCommunicateHeaderV3Guid;
+
#endif
diff --git a/src/include/ipxe/efi/Pi/PiS3BootScript.h b/src/include/ipxe/efi/Pi/PiS3BootScript.h
index f016e1245..97092ddf9 100644
--- a/src/include/ipxe/efi/Pi/PiS3BootScript.h
+++ b/src/include/ipxe/efi/Pi/PiS3BootScript.h
@@ -1,5 +1,5 @@
/** @file
- This file contains the boot script defintions that are shared between the
+ This file contains the boot script definitions that are shared between the
Boot Script Executor PPI and the Boot Script Save Protocol.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
diff --git a/src/include/ipxe/efi/Pi/PiStatusCode.h b/src/include/ipxe/efi/Pi/PiStatusCode.h
index 3bdc96edf..81611ba7d 100644
--- a/src/include/ipxe/efi/Pi/PiStatusCode.h
+++ b/src/include/ipxe/efi/Pi/PiStatusCode.h
@@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
FILE_LICENCE ( BSD2_PATENT );
//
-// Required for IA32, X64, IPF, ARM and EBC defines for CPU exception types
+// Required for IA32, X64, IPF, and EBC defines for CPU exception types
//
#include <ipxe/efi/Protocol/DebugSupport.h>