From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com []) by mx.groups.io with SMTP id smtpd.web11.4111.1623826792723508227 for ; Tue, 15 Jun 2021 23:59:53 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: ray.ni@intel.com) IronPort-SDR: bMeWyGZm7rbgjl0n0RsWtxtl8LeTl8aCnzpcCjXbGNZx62INo9covQH9VGCc069rVT8qtCyLh9 oKgKLosI1ylQ== X-IronPort-AV: E=McAfee;i="6200,9189,10016"; a="267274878" X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="267274878" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 23:59:52 -0700 IronPort-SDR: mdC/zOBGEsHF+anfEkoPhOwWHLe2j1kZfzbtKuQNfzQUBVnuBFstDrA487vv+GC5THIo+aTHDX MCV9IVPmwWkw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="488055269" Received: from ray-dev.ccr.corp.intel.com ([10.239.158.87]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2021 23:59:51 -0700 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Maurice Ma , Guo Dong , Hao A Wu Subject: [PATCH v3 1/3] MdeModulePkg/UniversalPayload: Add definition for extra info in payload Date: Wed, 16 Jun 2021 14:59:20 +0800 Message-Id: <20210616065922.196-2-ray.ni@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20210616065922.196-1-ray.ni@intel.com> References: <20210616065922.196-1-ray.ni@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Cc: Maurice Ma Cc: Guo Dong Reviewed-by: Hao A Wu --- .../Include/UniversalPayload/ExtraData.h | 28 +++++++++++++++++++ .../UniversalPayload/UniversalPayload.h | 24 ++++++++++++++++ MdeModulePkg/MdeModulePkg.dec | 3 ++ 3 files changed, 55 insertions(+) create mode 100644 MdeModulePkg/Include/UniversalPayload/ExtraData.h diff --git a/MdeModulePkg/Include/UniversalPayload/ExtraData.h b/MdeModuleP= kg/Include/UniversalPayload/ExtraData.h new file mode 100644 index 0000000000..146ec845f6 --- /dev/null +++ b/MdeModulePkg/Include/UniversalPayload/ExtraData.h @@ -0,0 +1,28 @@ +/** @file=0D +=0D + Copyright (c) 2021, Intel Corporation. All rights reserved.
=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +#ifndef EXTRA_DATA_H_=0D +#define EXTRA_DATA_H_=0D +=0D +extern GUID gUniversalPayloadExtraDataGuid;=0D +=0D +#pragma pack(1)=0D +=0D +typedef struct {=0D + CHAR8 Identifier[16];=0D + EFI_PHYSICAL_ADDRESS Base;=0D + UINT64 Size;=0D +} UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY;=0D +=0D +typedef struct {=0D + UNIVERSAL_PAYLOAD_GENERIC_HEADER PldHeader;=0D + UINT32 Count;=0D + UNIVERSAL_PAYLOAD_EXTRA_DATA_ENTRY Entry[0];=0D +} UNIVERSAL_PAYLOAD_EXTRA_DATA;=0D +=0D +#pragma pack()=0D +=0D +#endif=0D diff --git a/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h b/Mde= ModulePkg/Include/UniversalPayload/UniversalPayload.h index e661306a9b..bc8a3e0cf8 100644 --- a/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h +++ b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h @@ -11,8 +11,32 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef UNIVERSAL_PAYLOAD_H_=0D #define UNIVERSAL_PAYLOAD_H_=0D =0D +/**=0D + Main entry point to Universal Payload.=0D +=0D + @param HobList Pointer to the beginning of the HOB List from boot loade= r.=0D +**/=0D +typedef VOID (EFIAPI *UNIVERSAL_PAYLOAD_ENTRY) (VOID *HobList);=0D +=0D +#define UNIVERSAL_PAYLOAD_IDENTIFIER SIGNATURE_32('U', '= P', 'L', 'D')=0D +#define UNIVERSAL_PAYLOAD_INFO_SEC_NAME ".upld_info"=0D +#define UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX ".upld."=0D +#define UNIVERSAL_PAYLOAD_EXTRA_SEC_NAME_PREFIX_LENGTH (sizeof (UNIVERSAL_= PAYLOAD_EXTRA_SEC_NAME_PREFIX) - 1)=0D +=0D #pragma pack(1)=0D =0D +typedef struct {=0D + UINT32 Identifier;=0D + UINT32 HeaderLength;=0D + UINT16 SpecRevision;=0D + UINT8 Reserved[2];=0D + UINT32 Revision;=0D + UINT32 Attribute;=0D + UINT32 Capability;=0D + CHAR8 ProducerId[16];=0D + CHAR8 ImageId[16];=0D +} UNIVERSAL_PAYLOAD_INFO_HEADER;=0D +=0D typedef struct {=0D UINT8 Revision;=0D UINT8 Reserved;=0D diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 8c0885955b..10602a8f79 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -419,6 +419,9 @@ [Guids] ## Include/UniversalPayload/AcpiTable.h=0D gUniversalPayloadAcpiTableGuid =3D { 0x9f9a9506, 0x5597, 0x4515, { 0xba,= 0xb6, 0x8b, 0xcd, 0xe7, 0x84, 0xba, 0x87 } }=0D =0D + ## Include/UniversalPayload/ExtraData.h=0D + gUniversalPayloadExtraDataGuid =3D {0x15a5baf6, 0x1c91, 0x467d, {0x9d, 0= xfb, 0x31, 0x9d, 0x17, 0x8d, 0x4b, 0xb4}}=0D +=0D [Ppis]=0D ## Include/Ppi/AtaController.h=0D gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0,= 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}=0D --=20 2.31.1.windows.1