From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web09.5531.1623108356424192682 for ; Mon, 07 Jun 2021 16:25:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=zVehQYgz; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: hao.a.wu@intel.com) IronPort-SDR: luZxzJSZRuObYPZTtgV30Bmtu0PCJdnAkczoe0kmPDyOgPDonqzqTCr5FJvDr5/sZBGZFjXXRz IYcVeVz4xiPA== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="204701949" X-IronPort-AV: E=Sophos;i="5.83,256,1616482800"; d="scan'208";a="204701949" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 16:25:53 -0700 IronPort-SDR: t/ATnccdtP2hPM3UbwIn+lsIbm4WGIvtih6avZgrClyoOKrh7cJDmJrozr5pFLHBisfLc1Ax4f iDU+T8zvsO8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,256,1616482800"; d="scan'208";a="447671949" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP; 07 Jun 2021 16:25:53 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 7 Jun 2021 16:25:52 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Mon, 7 Jun 2021 16:25:52 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Mon, 7 Jun 2021 16:25:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d6A5HLnBb4oMR7rKXeWfQqUvU8ky1njpvnCUSu+okOGYq+iFdc6EKFOfCGJFIxF4FhfvNQkl9nbBt5QDL05z6LN0eJw1FtAhw/rDZi+7vm2rdgWEjVeBU/63WWv46/KGb1j20edRp+QqYdRitf5AuUZOjGZjIpdfG7dITMEHpBcpVRPBrdrp/0l52o1RTWsbEtDeWGdq3Dz4ZnVPJLyG0M66Bn/UEUKbu/UOzmmimFvozilpbJbR++AtiQoS9AwI18CYOfcdBcWNkv9F/NKmp5JBzYbMSwnphQVGeds8TDZ0irlm/V4R+pKJ4PAnQeb1+YuDPMbfmYFPK6/lpGALPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6Ibu0IeGQuaDyQFSwNqFticXFKmnHchHQOlXLtlbOAk=; b=kqjBSsrzDjtOkOdO6rIwwSIu2VrbAXTO6i3IMPnDouHmn+J2gQj8IESAF1T3ru/SWBXLB/KUAzR/FianKK7ybZdu4IPLMtMknLcrcdslypCk0zWAQTjTFNF0XBShtVDfkWT82cRNWUjq7HnEm2VUZGD17PHcUgqnKvTcxQOqVORMLQ5tNDmnEk4sI8f/tjieA5q7jtCsBjwBxrLt5UjTkLYKlUi1Ue205CTB1Ff03i+pN8eFFCzd7XXBz2lgG4ItYfywZyDEG/K+Ld5wTl1cAcv0SdBkXcKwZ9CuO1f3aRvJPKzuBYzlA88CNLhqifOP8GM8lDzMtZVGCm5ooVLl/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6Ibu0IeGQuaDyQFSwNqFticXFKmnHchHQOlXLtlbOAk=; b=zVehQYgzHTFpUnmswi8JWSsdt+JgVPxo2eYdjcUClZICFvPnQJzzIAd79XCTOTdBjE1klF46p2rrMXORO6tyaTVryCUsydwgpwGVusqBOsDEaZZ/qAr9PflCWau06DNFxRmI/UUnJLZlqy2a5AlmpVKuwDv0ojiKV2bq7fTG8wM= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR11MB1828.namprd11.prod.outlook.com (2603:10b6:404:103::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.24; Mon, 7 Jun 2021 23:25:51 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::b9d0:5694:1b70:c031]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::b9d0:5694:1b70:c031%4]) with mapi id 15.20.4195.030; Mon, 7 Jun 2021 23:25:51 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Ni, Ray" CC: "Kinney, Michael D" , Liming Gao , "Liu, Zhiguang" , "Ma, Maurice" , "Dong, Guo" Subject: Re: [edk2-devel] [PATCH v2 1/3] MdeModulePkg/UniversalPayload: Add definition for extra info in payload Thread-Topic: [edk2-devel] [PATCH v2 1/3] MdeModulePkg/UniversalPayload: Add definition for extra info in payload Thread-Index: AQHXWEEM+sub46P/K025ZeNX5HT7WKsJN3TQ Date: Mon, 7 Jun 2021 23:25:51 +0000 Message-ID: References: <20210603062259.1390-1-ray.ni@intel.com> <20210603062259.1390-2-ray.ni@intel.com> In-Reply-To: <20210603062259.1390-2-ray.ni@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.142.16] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 04a6096b-f8ab-4118-d9e4-08d92a0b96cd x-ms-traffictypediagnostic: BN6PR11MB1828: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6vEZsDYFlw19+OOFhiZ9kkO9r1Z9dRndZBcPwwIEgZNSfIY0yf9kxiW9jQlK2APJtlwgiv2h2Bo+GHcFPtCE5lyGNFy1WeMlIVnv85/vslsRr+A2WQbe7HexFnbKFxT7PdyEL9oqx5xeY9ms75xKRLqMzzRf/FJBtgRECwB40rpds9VyEvNVbY0AMQi7nBS2BsqIs8dDv/w56/fbKksK9avP9mzG+sK6Lcy5KtCFg4PYKqboh6QrR4GyXGTbeP1DXcdjESCYO6x+DOCEztGwspVe0dTugR4CXhxP7phX++Wc/G+jEDg+AHdVuDojv7FNKLTBtqntK8Wx7u7/cSS6y+kttv4Qjybpz6rtQTPn9nConcqme09j5C1Rvvudv+W8II4+c0AO0jqhctvOOdcsL8u0+6bOHCndguJT6H/J9pO08hq33tdlYw2DqzGR/Zr47YAZk5PSaXifbrENJdxOebeGw8+lmPzZiwADGx1oDn1K84TKo+i9kNs72iHZ2wVnVGEfqhTsnIYn+zLo1vhXqzEwhwcYaLy35F5zCbtoYDXxMxFK+Ifyx2GZ4RGTgo2ZuZgIQEZxhKbfw0UPeUa7szto1uKA7zepRYqSG1Sijj4UIqBAs6l3UXZv5nvIWKA/iv3YECsxMKLVX54q5SerQHbSWeyOb8W/H3StQeb+8AVEve83x55wBr2rXC6UTEAcpSkS+44X/idNcPwerrf6vf7hyBOZ5dJGN0sjYYJZpGoLfHM11/kf4NeTlNBgsHwk900ovoG+mobVxM8+as0Unw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3666.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(136003)(376002)(366004)(39860400002)(396003)(107886003)(8676002)(110136005)(53546011)(4326008)(8936002)(316002)(54906003)(2906002)(6506007)(478600001)(26005)(186003)(966005)(66476007)(64756008)(66446008)(66946007)(6636002)(52536014)(76116006)(71200400001)(86362001)(55016002)(9686003)(38100700002)(122000001)(5660300002)(83380400001)(33656002)(7696005)(66556008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ibj8Z0lXgeH7DWvI4jpQWh7YWi+WRFvpFQT89PWyve6FKmawVUTPkiCdt2Cj?= =?us-ascii?Q?NuIo4PUjgc+aWNHGWE41TU6KQEEQv5Qc4bOZqPfcVYgGgX1DC8LuYNG2xBSK?= =?us-ascii?Q?QUt0xSevsBTRo/ixihjR+aB49BQZKECfmNbEKRQPAQHjIs47qxSy7ecYcv0S?= =?us-ascii?Q?aoh4Hn3uUY3cD4FCV9/bLI4bdPgex7KIBv0GA8ggLmAPuTUe1xjewZhIFPFo?= =?us-ascii?Q?5R73CQrT00KyYMrLmcJyLBfD0Nuj/B7qRqifViN7o+wM6f1pi50vngrYipUB?= =?us-ascii?Q?d1J4+e2mxwMl2xF1Rb98fE68kvv1FE5S2DtPqCFICNBkL8MseC5GOU3OH399?= =?us-ascii?Q?2q9BrXWuJHIB0UVyniogB12U+zO/bdfl/MsSn+8X7oPaYhAKWzNrloMLaV6Q?= =?us-ascii?Q?dniL0GTRtvfk34x78UC1TsDBB5oMzqN1ZSAgkJJR+nwKtQhlBLtaVN1pF++S?= =?us-ascii?Q?Iy2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ossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3666.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 04a6096b-f8ab-4118-d9e4-08d92a0b96cd X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2021 23:25:51.1026 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fxj1IdmPkc6B2+GzmYVryoc/swE/D9tSwQlLQDfKDFINlKuv9iZOixGDLLx9tFMHu352lg/BdsEb5+5iwfILuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1828 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Thursday, June 3, 2021 2:23 PM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Liming Gao > ; Liu, Zhiguang ; Ma, > Maurice ; Dong, Guo > Subject: [edk2-devel] [PATCH v2 1/3] MdeModulePkg/UniversalPayload: Add > definition for extra info in payload >=20 > The payload is in ELF format per the universal payload spec. > PLD_INFO_HEADER is stored in the ELF payload as a separate section > named ".upld_info". >=20 > Extra data needed by payload is stored in sections whose name starts > with ".upld.". >=20 > Signed-off-by: Ray Ni > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Maurice Ma > Cc: Guo Dong > --- > .../Include/UniversalPayload/ExtraData.h | 28 ++++++++++++++ > .../UniversalPayload/UniversalPayload.h | 38 +++++++++++++++++++ > MdeModulePkg/MdeModulePkg.dec | 3 ++ > 3 files changed, 69 insertions(+) > create mode 100644 MdeModulePkg/Include/UniversalPayload/ExtraData.h > create mode 100644 > MdeModulePkg/Include/UniversalPayload/UniversalPayload.h >=20 > diff --git a/MdeModulePkg/Include/UniversalPayload/ExtraData.h > b/MdeModulePkg/Include/UniversalPayload/ExtraData.h > new file mode 100644 > index 0000000000..07b7426683 > --- /dev/null > +++ b/MdeModulePkg/Include/UniversalPayload/ExtraData.h > @@ -0,0 +1,28 @@ > +/** @file >=20 > + >=20 > + Copyright (c) 2021, Intel Corporation. All rights reserved.
>=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > +#ifndef __EXTRA_DATA_H__ >=20 > +#define __EXTRA_DATA_H__ >=20 > + >=20 > +extern GUID gPldExtraDataGuid; >=20 > + >=20 > +#pragma pack(1) >=20 > + >=20 > +typedef struct { >=20 > + CHAR8 Identifier[16]; >=20 > + EFI_PHYSICAL_ADDRESS Base; >=20 > + UINT64 Size; >=20 > +} PLD_EXTRA_DATA_ENTRY; >=20 > + >=20 > +typedef struct { >=20 > + PLD_GENERIC_HEADER PldHeader; >=20 > + UINT32 Count; >=20 > + PLD_EXTRA_DATA_ENTRY Entry[0]; >=20 > +} PLD_EXTRA_DATA; >=20 > + >=20 > +#pragma pack() >=20 > + >=20 > +#endif >=20 > diff --git a/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h > b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h > new file mode 100644 > index 0000000000..b8e9fe11a1 > --- /dev/null > +++ b/MdeModulePkg/Include/UniversalPayload/UniversalPayload.h > @@ -0,0 +1,38 @@ > +/** @file >=20 > + >=20 > + Copyright (c) 2021, Intel Corporation. All rights reserved.
>=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > +#ifndef __UNIVERSAL_PAYLOAD_H__ >=20 > +#define __UNIVERSAL_PAYLOAD_H__ >=20 > + >=20 > +typedef VOID (EFIAPI *UNIVERSAL_PAYLOAD_ENTRY) (VOID *HobList); Do we need to add function and input parameter description comments for the= above 'typedef' like others in the codebase? With this handled, Reviewed-by: Hao A Wu Best Regards, Hao Wu >=20 > + >=20 > +#define PLD_IDENTIFIER SIGNATURE_32('U', 'P', 'L', 'D'= ) >=20 > +#define PLD_INFO_SEC_NAME ".upld_info" >=20 > +#define PLD_EXTRA_SEC_NAME_PREFIX ".upld." >=20 > +#define PLD_EXTRA_SEC_NAME_PREFIX_LENGTH (sizeof > (PLD_EXTRA_SEC_NAME_PREFIX) - 1) >=20 > + >=20 > +#pragma pack(1) >=20 > + >=20 > +typedef struct { >=20 > + UINT32 Identifier; >=20 > + UINT32 HeaderLength; >=20 > + UINT16 SpecRevision; >=20 > + UINT8 Reserved[2]; >=20 > + UINT32 Revision; >=20 > + UINT32 Attribute; >=20 > + UINT32 Capability; >=20 > + CHAR8 ProducerId[16]; >=20 > + CHAR8 ImageId[16]; >=20 > +} PLD_INFO_HEADER; >=20 > + >=20 > +typedef struct { >=20 > + UINT8 Revision; >=20 > + UINT8 Reserved[3]; >=20 > +} PLD_GENERIC_HEADER; >=20 > + >=20 > +#pragma pack() >=20 > + >=20 > +#endif >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec > b/MdeModulePkg/MdeModulePkg.dec > index 8d38383915..d823ad0ba7 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -404,6 +404,9 @@ [Guids] > ## Include/Guid/MigratedFvInfo.h >=20 > gEdkiiMigratedFvInfoGuid =3D { 0xc1ab12f7, 0x74aa, 0x408d, { 0xa2, 0xf= 4, 0xc6, > 0xce, 0xfd, 0x17, 0x98, 0x71 } } >=20 >=20 >=20 > + ## Include/UniversalPayload/ExtraData.h >=20 > + gPldExtraDataGuid =3D {0x15a5baf6, 0x1c91, 0x467d, {0x9d, 0xfb, 0x31, = 0x9d, > 0x17, 0x8d, 0x4b, 0xb4}} >=20 > + >=20 > [Ppis] >=20 > ## Include/Ppi/AtaController.h >=20 > gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { 0xb= 0, 0x7a, > 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} >=20 > -- > 2.31.1.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#76009): https://edk2.groups.io/g/devel/message/76009 > Mute This Topic: https://groups.io/mt/83277975/1768737 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20