From nobody Mon Feb 9 18:20:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76293+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76293+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623288833; cv=none; d=zohomail.com; s=zohoarc; b=SbIg3grhaHFdQgSeoQLCj95PpJjmguW3JKjqH6OF708zbKF+kt/gOdWxFThYW1h1bDYuM8e4A7Exgz+IHHqFmacs/U/Nd0RCoHP/dMbhrZtBV7zP3nQWkWepsciOZ5XcNg8mBY/+LlazmCBVntUejwanaDjR57lBtOpcrXZWrqU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623288833; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=XAbrY3Cu06SlVGCxTpuWobYgOpllXmkjjthveOSfN4A=; b=Q1D74iUv6x9qWEbKVOoa1OPSRHdpLK6xHv0mzH5rVT5tbrBtaY/HakgzPBhh+hqy7fbdqzHev92AFDZ87o48WxxLbu2kkrElfzQu1TVIR/qWZ3X+Sg8OkBTxq/MsDjqG27rpDje8sXcjYykF0Qs00+bXIUi/Md0Boj0PuHBm1SE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76293+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623288833620529.835201833152; Wed, 9 Jun 2021 18:33:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id edhfYY1788612xAwlFGz75ur; Wed, 09 Jun 2021 18:33:53 -0700 X-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 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" X-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" X-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: [edk2-devel] [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> In-Reply-To: <20210610013318.1885-1-zhiguang.liu@intel.com> References: <20210610013318.1885-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: g6QMK8ZRL0f3B4q5FGHKyYEbx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623288833; bh=I4TH+7DYu+cgnS8vq2AIfSiSov67sey2CGJACT41HwE=; h=Cc:Date:From:Reply-To:Subject:To; b=l9WgH3RX6sIyyTocPzgDuzP1n8u2RLCj6O0dGzurrGvNPyoncngj/cR59VMchIf7y/O 4AZJLYQnU8fDkuTCVr0E3DySyOCJE4geY5MT8dPGdqlvqPVfCmLpVpjK0LdEztsJw8qm7 Zr+1MLaxb0KwTvOaxZ3FLpQbmFNYj72UOX4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 + Universal Payload general definitions. + +Copyright (c) 2021, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + - Universal Payload Specification 0.75 (https://universalpayload.githu= b.io/documentation/) +**/ + +#ifndef __UNIVERSAL_PAYLOAD_H__ +#define __UNIVERSAL_PAYLOAD_H__ + +#pragma pack(1) + +typedef struct { + UINT8 Revision; + UINT8 Reserved; + UINT16 Length; +} UNIVERSAL_PAYLOAD_GENERIC_HEADER; + +#pragma pack() + +/** + Returns the size of a structure of known type, up through and including = a specified field. + + @param TYPE The name of the data structure that contains the field= specified by Field. + @param Field The name of the field in the data structure. + + @return size, in bytes. + +**/ +#define UNIVERSAL_PAYLOAD_SIZEOF_THROUGH_FIELD(TYPE, Field) (OFFSET_OF(TYP= E, Field) + sizeof (((TYPE *) 0)->Field)) + +#endif // __UNIVERSAL_PAYLOAD_H__ --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76293): https://edk2.groups.io/g/devel/message/76293 Mute This Topic: https://groups.io/mt/83435784/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-