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.4374.1623288826156455282 for ; Wed, 09 Jun 2021 18:33:47 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhiguang.liu@intel.com) IronPort-SDR: JrBe/kfs2lE7zZAicPCsIekLw+6N9azatPru/BQGLX1hf6NV77LpufjBkCVpsHluhzHPI9J/i0 Y6EZfMKFm7TA== X-IronPort-AV: E=McAfee;i="6200,9189,10010"; a="266359679" X-IronPort-AV: E=Sophos;i="5.83,262,1616482800"; d="scan'208";a="266359679" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2021 18:33:46 -0700 IronPort-SDR: aTs2XynLKHQp6skAQ3wyNtKwhjLJKHzBoUhNkbJVE7WCpefLEbnmVn9Cv7lNJVjbpgg4XnF3Kt vSpVJ9qUuz4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,262,1616482800"; d="scan'208";a="402630957" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by orsmga003.jf.intel.com with ESMTP; 09 Jun 2021 18:33:45 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Jian J Wang , Hao A Wu Subject: [Patch V4 1/9] MdeModulePkg: Add Universal Payload general definition header file Date: Thu, 10 Jun 2021 09:33:10 +0800 Message-Id: <20210610013318.1885-2-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.30.0.windows.2 In-Reply-To: <20210610013318.1885-1-zhiguang.liu@intel.com> References: <20210610013318.1885-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable V1: Add Universal Payload general definition header file according to Universal Payload's documentation V2: Add a macro function to check the Revision V4: The documentation link https://universalpayload.github.io/documentation/ is= added Change the term "PLD" to "UNIVERSAL_PAYLOAD". Cc: Michael D Kinney Cc: Liming Gao Cc: Jian J Wang Cc: Hao A Wu Reviewed-by: Hao A Wu Signed-off-by: Zhiguang Liu --- MdeModulePkg/Include/UniversalPayload/UniversalPayload.h | 35 ++++++++++++= +++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h b/Mde= ModulePkg/Include/UniversalPayload/UniversalPayload.h new file mode 100644 index 0000000000..fd3a2ea262 --- /dev/null +++ b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h @@ -0,0 +1,35 @@ +/** @file=0D + Universal Payload general definitions.=0D +=0D +Copyright (c) 2021, Intel Corporation. All rights reserved.
=0D +SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D + @par Revision Reference:=0D + - Universal Payload Specification 0.75 (https://universalpayload.githu= b.io/documentation/)=0D +**/=0D +=0D +#ifndef __UNIVERSAL_PAYLOAD_H__=0D +#define __UNIVERSAL_PAYLOAD_H__=0D +=0D +#pragma pack(1)=0D +=0D +typedef struct {=0D + UINT8 Revision;=0D + UINT8 Reserved;=0D + UINT16 Length;=0D +} UNIVERSAL_PAYLOAD_GENERIC_HEADER;=0D +=0D +#pragma pack()=0D +=0D +/**=0D + Returns the size of a structure of known type, up through and including = a specified field.=0D +=0D + @param TYPE The name of the data structure that contains the field= specified by Field.=0D + @param Field The name of the field in the data structure.=0D +=0D + @return size, in bytes.=0D +=0D +**/=0D +#define UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD(TYPE, Field) (OFFSET_OF(TYP= E, Field) + sizeof (((TYPE *) 0)->Field))=0D +=0D +#endif // __UNIVERSAL_PAYLOAD_H__=0D --=20 2.30.0.windows.2