From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2541AAC18BA for ; Fri, 30 Aug 2024 18:06:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=HzVn+2poTQWv+CDjR7jwcLeL1q0GAmL9ctTSIEB6TOs=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1725041208; v=1; b=fljxyWaieeZ3wFQfXBNDsKtOrjX350GqoZTBTAklogfMcHzCKV6cQrxxqpjr5B9b6lNiaF5H EUgEvCCnfG2nC7WPYMbQNQPL4q+GPpXTDhMIFTnmRgNiH7lulAAQSy2M7uvYVk3kdvXF6dKjegF dcrZYJ6VhEVujOVljR9M6DM8EV6xNBolf6N4G1wyTM4Jn19VoaYek+x2FrrG+24sqAlhFvlP45L 5P2W7CrC87o78f9ZVuhLF64Bdiqo+fZt5PuaMk7WgGfBHx3dVAhSF2keRks7m5LID6qhOc8niws dyI7ef+KPLy/xsg8mzH2HcimniDoYa8u0eOCa64MNJ0Aw== X-Received: by 127.0.0.2 with SMTP id 2t4QYY7687511xpyGLGcNoEJ; Fri, 30 Aug 2024 11:06:47 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by mx.groups.io with SMTP id smtpd.web11.990.1725041206512817231 for ; Fri, 30 Aug 2024 11:06:46 -0700 X-CSE-ConnectionGUID: g0NPzOMATHeJAUOg05xPug== X-CSE-MsgGUID: FaYCezZsQY2V5UKr1IaHlQ== X-IronPort-AV: E=McAfee;i="6700,10204,11180"; a="27458407" X-IronPort-AV: E=Sophos;i="6.10,189,1719903600"; d="scan'208";a="27458407" X-Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2024 11:06:44 -0700 X-CSE-ConnectionGUID: XESAhiDZTWOrU3MF7ahd2Q== X-CSE-MsgGUID: iBdiA0APQx6f+VPsaKuWoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,189,1719903600"; d="scan'208";a="94780075" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 30 Aug 2024 11:06:43 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 30 Aug 2024 11:06:42 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 30 Aug 2024 11:06:42 -0700 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 30 Aug 2024 11:06:42 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.44) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 30 Aug 2024 11:06:37 -0700 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by DS0PR11MB6373.namprd11.prod.outlook.com (2603:10b6:8:cb::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20; Fri, 30 Aug 2024 18:06:34 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::a886:6510:729d:f9d0]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::a886:6510:729d:f9d0%5]) with mapi id 15.20.7918.019; Fri, 30 Aug 2024 18:06:34 +0000 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "jonathan.cameron@huawei.com" , Yuquan Wang CC: "marcin.juszkiewicz@linaro.org" , "gaoliming@byosoft.com.cn" , "ardb+tianocore@kernel.org" , "chenbaozi@phytium.com.cn" , "wangyinfeng@phytium.com.cn" , "shuyiqi@phytium.com.cn" , "qemu-devel@nongnu.org" , "Kinney, Michael D" Subject: Re: [edk2-devel] [RFC PATCH 1/1] MdePkg/IndustryStandard: add definitions for ACPI 6.4 CEDT Thread-Topic: [edk2-devel] [RFC PATCH 1/1] MdePkg/IndustryStandard: add definitions for ACPI 6.4 CEDT Thread-Index: AQHa+oH4NXtM1oKKn0a6oV85YWa4T7I/py8AgABvHGA= Date: Fri, 30 Aug 2024 18:06:34 +0000 Message-ID: References: <20240830021117.538954-1-wangyuquan1236@phytium.com.cn> <20240830021117.538954-2-wangyuquan1236@phytium.com.cn> <20240830121646.0000729a@Huawei.com> In-Reply-To: <20240830121646.0000729a@Huawei.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|DS0PR11MB6373:EE_ x-ms-office365-filtering-correlation-id: e31f0d7a-a23a-4f98-009d-08dcc91e7ba8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?KnRjiA0eCqNX+0hNntEi2FbVjXEw/yGjU7NXDUFIYNz3+CgR4+/d6zX/8lWg?= =?us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ejY0vvgsF0/?= =?us-ascii?Q?0xCHjMEmKWNKCWdHrrRqvvk1hp7FC7VOqH0S4cBlTKj+GeiJLyCdaHQX7Yuv?= =?us-ascii?Q?OkXaZdsW3VP60RCCdVu9VZWnz/njlL5OkNOI9XPWAZex0Xm/+P7rfWrx5wNY?= =?us-ascii?Q?C8AabpyQC3r9f7ByTkSfcoMFgsqddxgnDW1zznTy0fgEKufDcED2Ij8ohVjo?= =?us-ascii?Q?7xjxILSKdwntYMh01EfyENp0QByfaGxoJg85n+uDIklMnFiYcRsN4RxElKRp?= =?us-ascii?Q?JPxjUUqGUmjHuRN3f0InsuN6u8bEPHc09p8V7IdglZmIb5WhRuEIx4ycNaE8?= =?us-ascii?Q?ABqX+nsdZdCN/rhxsFkuvdR9kaHXfvAmi8yNfXXZo5AKrBXFPHGCQwDOveHY?= =?us-ascii?Q?Uh5ZsIYQoK1wHHI7CWSePaHXyr6qS/EEvYQzG6F+abxNAFi9/UNvh/SQFiDF?= =?us-ascii?Q?TC3PvW8=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?J6DCGp8ZjGvXkAi0P6dUnKJGTXy0s2PEHrEuDqzeDPwsPGEgK7smCIytCXt8?= =?us-ascii?Q?4aFqaT08aE427Ge1BPp0XhzRc7aC3/iqmQkjyDH3cf+mDUkNef5dm8w+c0p6?= =?us-ascii?Q?4ydKgtOKGWa6uI0iOQHreByYWfCA1qoNVnxS4mQW/+A6BE4Sk5SYmsGR6nhW?= =?us-ascii?Q?vTENrkfVN+Y8Sq9RZtkwL1+Oa9dpThdfkFeXCMQXIYBHi5fmd2yHIeFPtCoW?= =?us-ascii?Q?vJ5Q1OHAfiYVJD+1BWSyASqYrOyEVt0vaJSXFN4d/pANIfasGId3x8wphyMu?= =?us-ascii?Q?vwW8QxJnh/s3JzKfNtVt17z3N04Rk9VC3+BTyD9t6GxGmZ4y6ESv+swFNQcF?= =?us-ascii?Q?7LAl784rO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jdHYRAYUb511XqS?= =?us-ascii?Q?oUFLUb5eKMAmmRIomqCvQzozy3Bhuo5pPOaGvZtPswRsnGzrMPxEeKiyUtr0?= =?us-ascii?Q?c0FVuKOqGucQZD1W/XR+/J8nIGCD9ZjrrOevqz34AB3p0jbqpXGVpuvcvZzg?= =?us-ascii?Q?CksjbUzKk13Jdezvizspdk+/xZluKi+Ulz6Ew4CxFQurNWoLdb6E5VqzdlsY?= =?us-ascii?Q?MJLg6uUQut/YzGH1435gjZCZNX0Z/Mom+yRy8urmfxBhwz3TaVj/SKjUN1gJ?= =?us-ascii?Q?WkIutYmfLxQwBaP+CRgcU0dooA0Ird68f4RdmXXBd0X/+5Xb8GH/pVyXA1Ib?= =?us-ascii?Q?wCD29s0gH0B63yfQHO0/HTDFU0NOHkU4dAqWAe/DrgKm7jJA+cc8p0Gt4SbA?= =?us-ascii?Q?pQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e31f0d7a-a23a-4f98-009d-08dcc91e7ba8 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2024 18:06:34.0245 (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: 5i0WIc6gvl7885bWyo2StXNhFd2pim+D2OGkFXpVbwIKCejfzFTTz8WKxhb2QfOZbtAo3YEsFntLmuuZUfuWVySki+TB4hgCysP99MEMFuk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB6373 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 30 Aug 2024 11:06:46 -0700 Resent-From: michael.d.kinney@intel.com Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: UVbAn7kQttj5iseek9gX4BISx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=fljxyWai; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io For this MdePkg change to add an ACPI table type, do you mind opening a PR? There are some minor code style issues that need to be addressed. Structure type names and define names should be all upper case. __CXL_Early_Discovery_TABLE_H__ -> __CXL_EARLY_DISCOVERY_TABLE_H__ File names should be camel case. CXLEarlyDiscoveryTable.h -> CxlEarlyDiscoveryTable.h Also, please provide links to the supporting public specifications in the include file headers. Thanks, Mike > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Jonathan > Cameron via groups.io > Sent: Friday, August 30, 2024 4:17 AM > To: Yuquan Wang > Cc: marcin.juszkiewicz@linaro.org; gaoliming@byosoft.com.cn; Kinney, > Michael D ; ardb+tianocore@kernel.org; > chenbaozi@phytium.com.cn; wangyinfeng@phytium.com.cn; > shuyiqi@phytium.com.cn; qemu-devel@nongnu.org; devel@edk2.groups.io > Subject: Re: [edk2-devel] [RFC PATCH 1/1] MdePkg/IndustryStandard: add > definitions for ACPI 6.4 CEDT >=20 > On Fri, 30 Aug 2024 10:11:17 +0800 > Yuquan Wang wrote: > One request - when cross posting to multiple lists, it is useful to > add something to the patch title to make it clear what is EDK2, what > is QEMU etc. >=20 > [RFC EDK2 PATCH 1/1] >=20 > It might irritate the EDK2 folk but it is useful for everyone else > to figure out what they are looking at. >=20 > > This adds #defines and struct typedefs for the various structure > > types in the ACPI 6.4 CXL Early Discovery Table (CEDT). >=20 > It's in the CXL spec, not ACPI spec so call out in this > patch description that all that was added in ACPI 6.4 was > the reservation of the ID. The rest needs to refer to appropriate > CXL specifications. >=20 > For naming I have no idea on the EDK2 Convention for > structures in specifications other than ACPI that are for > ACPI structures. The current one is definitely missleading > however. >=20 >=20 > > > > Signed-off-by: Yuquan Wang > > --- > > MdePkg/Include/IndustryStandard/Acpi64.h | 5 ++ > > .../IndustryStandard/CXLEarlyDiscoveryTable.h | 69 > +++++++++++++++++++ > > 2 files changed, 74 insertions(+) > > create mode 100644 > MdePkg/Include/IndustryStandard/CXLEarlyDiscoveryTable.h > > >=20 > > diff --git a/MdePkg/Include/IndustryStandard/CXLEarlyDiscoveryTable.h > b/MdePkg/Include/IndustryStandard/CXLEarlyDiscoveryTable.h > > new file mode 100644 > > index 0000000000..84f88dc737 > > --- /dev/null > > +++ b/MdePkg/Include/IndustryStandard/CXLEarlyDiscoveryTable.h > > @@ -0,0 +1,69 @@ > > +/** @file > > + ACPI CXL Early Discovery Table (CEDT) definitions. > > + > > + Copyright (c) 2024, Phytium Technology Co Ltd. All rights reserved. > > + > > +**/ > > + > > +#ifndef __CXL_Early_Discovery_TABLE_H__ > > +#define __CXL_Early_Discovery_TABLE_H__ > > + > > +#include > > +#include > > + > > +#define EFI_ACPI_CXL_Early_Discovery_TABLE_REVISION_01 0x1 > //CXL2.0 > > +#define EFI_ACPI_CXL_Early_Discovery_TABLE_REVISION_02 0x2 > //CXL3.1 > > + > > +#define EFI_ACPI_CEDT_TYPE_CHBS 0x0 > > +#define EFI_ACPI_CEDT_TYPE_CFMWS 0x1 >=20 > Sensible to add all defines from the start? > So CXIMS, RDPAS and CSDS > (only that last one was added in 3.1 / revision 2.0) >=20 >=20 > > +} EFI_ACPI_6_4_CEDT_Structure; > > + >=20 > > +/// > > +/// Definition for CXL Host Bridge Structure > > +/// > > +typedef struct { > > + EFI_ACPI_6_4_CEDT_Structure header; > > + UINT32 UID; > > + UINT32 CXLVersion; > > + UINT32 Reserved; > > + UINT64 Base; > > + UINT64 Length; > > +} EFI_ACPI_6_4_CXL_Host_Bridge_Structure; > Should this naming reflect where it's actually defined? > EFI_ACPI_CXL_3_1_CXL_Host_Bridge_Structure etc >=20 > > + > > +/// > > +/// Definition for CXL Fixed Memory Window Structure > > +/// > > +typedef struct { > > + EFI_ACPI_6_4_CEDT_Structure header; > > + UINT32 Reserved; > > + UINT64 BaseHPA; > > + UINT64 WindowSize; > > + UINT8 InterleaveMembers; > > + UINT8 InterleaveArithmetic; > > + UINT16 Reserved1; > > + UINT32 Granularity; > > + UINT16 Restrictions; > > + UINT16 QtgId; > > + UINT32 FirstTarget; >=20 > Is this common for an EDK2 definition? If it were kernel we'd > be using a [] to indicate this has variable number of elements. > I'm too lazy to check for EDK2 equivalents ;) >=20 > > +} EFI_ACPI_6_4_CXL_Fixed_Memory_Window_Structure; > > + > > +#pragma pack() > > + > > +#endif >=20 >=20 >=20 >=20 >=20 -=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 (#120453): https://edk2.groups.io/g/devel/message/120453 Mute This Topic: https://groups.io/mt/108173030/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-