diff options
author | Ray Ni <ray.ni@intel.com> | 2021-05-01 20:17:45 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-06-16 07:51:00 +0000 |
commit | c511426abe2a86f8d28ea2b2afa8c434757a4617 (patch) | |
tree | 9cd909512b680757227df251bcceb3e33813eba8 /MdeModulePkg | |
parent | fa24b6ed2679ce238de312204ff516928c34e631 (diff) | |
download | edk2-c511426abe2a86f8d28ea2b2afa8c434757a4617.zip edk2-c511426abe2a86f8d28ea2b2afa8c434757a4617.tar.gz edk2-c511426abe2a86f8d28ea2b2afa8c434757a4617.tar.bz2 |
MdeModulePkg/UniversalPayload: Add definition for extra info in payload
The payload is in ELF format per the universal payload spec.
UNIVERSAL_PAYLOAD_INFO_HEADER is stored in the ELF payload as a separate
section named ".upld_info".
Extra data needed by payload is stored in sections whose name starts
with ".upld.".
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Include/UniversalPayload/ExtraData.h | 28 | ||||
-rw-r--r-- | MdeModulePkg/Include/UniversalPayload/UniversalPayload.h | 24 | ||||
-rw-r--r-- | MdeModulePkg/MdeModulePkg.dec | 3 |
3 files changed, 55 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/UniversalPayload/ExtraData.h b/MdeModulePkg/Include/UniversalPayload/ExtraData.h new file mode 100644 index 0000000..146ec84 --- /dev/null +++ b/MdeModulePkg/Include/UniversalPayload/ExtraData.h @@ -0,0 +1,28 @@ +/** @file
+
+ Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+#ifndef EXTRA_DATA_H_
+#define EXTRA_DATA_H_
+
+extern GUID gUniversalPayloadExtraDataGuid;
+
+#pragma pack(1)
+
+typedef struct {
+ CHAR8 Identifier[16];
+ EFI_PHYSICAL_ADDRESS Base;
+ UINT64 Size;
+} UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY;
+
+typedef struct {
+ UNIVERSAL_PAYLOAD_GENERIC_HEADER PldHeader;
+ UINT32 Count;
+ UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY Entry[0];
+} UNIVERSAL_PAYLOAD_EXTRA_DATA;
+
+#pragma pack()
+
+#endif
diff --git a/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h index e661306..bc8a3e0 100644 --- a/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h +++ b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h @@ -11,9 +11,33 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef UNIVERSAL_PAYLOAD_H_
#define UNIVERSAL_PAYLOAD_H_
+/**
+ Main entry point to Universal Payload.
+
+ @param HobList Pointer to the beginning of the HOB List from boot loader.
+**/
+typedef VOID (EFIAPI *UNIVERSAL_PAYLOAD_ENTRY) (VOID *HobList);
+
+#define UNIVERSAL_PAYLOAD_IDENTIFIER SIGNATURE_32('U', 'P', 'L', 'D')
+#define UNIVERSAL_PAYLOAD_INFO_SEC_NAME ".upld_info"
+#define UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX ".upld."
+#define UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX_LENGTH (sizeof (UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX) - 1)
+
#pragma pack(1)
typedef struct {
+ UINT32 Identifier;
+ UINT32 HeaderLength;
+ UINT16 SpecRevision;
+ UINT8 Reserved[2];
+ UINT32 Revision;
+ UINT32 Attribute;
+ UINT32 Capability;
+ CHAR8 ProducerId[16];
+ CHAR8 ImageId[16];
+} UNIVERSAL_PAYLOAD_INFO_HEADER;
+
+typedef struct {
UINT8 Revision;
UINT8 Reserved;
UINT16 Length;
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 8c08859..10602a8 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -419,6 +419,9 @@ ## Include/UniversalPayload/AcpiTable.h
gUniversalPayloadAcpiTableGuid = { 0x9f9a9506, 0x5597, 0x4515, { 0xba, 0xb6, 0x8b, 0xcd, 0xe7, 0x84, 0xba, 0x87 } }
+ ## Include/UniversalPayload/ExtraData.h
+ gUniversalPayloadExtraDataGuid = {0x15a5baf6, 0x1c91, 0x467d, {0x9d, 0xfb, 0x31, 0x9d, 0x17, 0x8d, 0x4b, 0xb4}}
+
[Ppis]
## Include/Ppi/AtaController.h
gPeiAtaControllerPpiGuid = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}
|