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 774E07803D0 for ; Tue, 3 Sep 2024 18:03:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WJc+T+kJ6OPqtAFgUHyhWAYpAIed6J0GxjtfuAWStxk=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To: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=20240830; t=1725386639; v=1; x=1725645837; b=Z6yxJahBBXzy2GeA7OlZkehm/0ZBBXfzdo2vMWWpddNtslqkwMruAhVoUph/qWezStggWaoF jYjbnM7lJiZctN8bD36DuMcpqxGjn1OujgMWu0FioMGKmmsvJrYUL6qVnOTOpdodJ4704scED2r 6E5WeGn56bzCsRtEvduieiEPZex3Js8jwTiiplBNbzxCvFV8HDcL4+fZEWIutHfiMjGiddYFqck nc0Y5viUBHihgKORltEspJeEXBQqAw/s+c8LgBS8cDQqsTcroLPBg5IcFulojDStjytAuVe0YLy O80KjBH0bzfbegn9FgfmZVqgEIcpzlUyhNVxhfGOor0FA== X-Received: by 127.0.0.2 with SMTP id hghsYY7687511xwlEhdK30jK; Tue, 03 Sep 2024 11:03:57 -0700 X-Received: from BN8PR05CU002.outbound.protection.outlook.com (BN8PR05CU002.outbound.protection.outlook.com [52.101.57.92]) by mx.groups.io with SMTP id smtpd.web11.1555.1725042807638324191 for ; Fri, 30 Aug 2024 11:33:27 -0700 X-Received: from LV3PR01MB8464.prod.exchangelabs.com (2603:10b6:408:1a3::7) by CYYPR01MB8611.prod.exchangelabs.com (2603:10b6:930:bc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.26; Fri, 30 Aug 2024 18:33:23 +0000 X-Received: from LV3PR01MB8464.prod.exchangelabs.com ([fe80::74dd:8ddd:b9c2:8d2d]) by LV3PR01MB8464.prod.exchangelabs.com ([fe80::74dd:8ddd:b9c2:8d2d%3]) with mapi id 15.20.7897.027; Fri, 30 Aug 2024 18:33:23 +0000 Message-ID: Date: Fri, 30 Aug 2024 12:33:18 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [RFC PATCH 1/1] MdePkg/IndustryStandard: add definitions for ACPI 6.4 CEDT To: devel@edk2.groups.io, michael.d.kinney@intel.com, "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" References: <20240830021117.538954-1-wangyuquan1236@phytium.com.cn> <20240830021117.538954-2-wangyuquan1236@phytium.com.cn> <20240830121646.0000729a@Huawei.com> From: "Rebecca Cran via groups.io" In-Reply-To: X-ClientProxiedBy: BY3PR04CA0017.namprd04.prod.outlook.com (2603:10b6:a03:217::22) To LV3PR01MB8464.prod.exchangelabs.com (2603:10b6:408:1a3::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV3PR01MB8464:EE_|CYYPR01MB8611:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e2b0a98-576a-458d-8ff8-08dcc9223a93 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: =?utf-8?B?VFowMlNaOTd2UnRKa0QraFhPQ05vL2w5cTkvcmJ0WXdlYlNiMWw0ZEV5OFps?= =?utf-8?B?OE90WElFeG9BRWRsbkNKcFNKWDFzb2s3YmtlZXNMbjZjc2c4bXFJaE0zSWo1?= =?utf-8?B?QzdMd1dmQm5XM2U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vQVltTk12a1MyMWFqVUFQTFl2aTlxN3M1SGdXcjcy?= =?utf-8?B?ZS9ua3pUdzRzNVRFQWVGbjdrSVZxb0hzYTVBdjZJVldVL3lGRXZFU2lKNk5O?= =?utf-8?B?U2Nlc1pCNHJoT1Izd0tsdHVjNFp2SnlCTGFySmNxNXBaOVg0K2M1emk3ZDVn?= =?utf-8?B?Ni9ianFEZ3d4dWsrTElxVVVCcE9PbTdaZXB3a3g2SVo0MDJJZ0liOHNHcFhD?= =?utf-8?B?MEltZjhGKzVrUjFaVU1aU2lhZWl4MXJ5bG1HTHVUdjVlZTRrTU5qeVBUcjhI?= =?utf-8?Q?M0VpZzulrwPp/NXq5QjL3QU=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e2b0a98-576a-458d-8ff8-08dcc9223a93 X-MS-Exchange-CrossTenant-AuthSource: LV3PR01MB8464.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 18:33:22.9789 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Q+rUaar6VWvxVDa/ECfvOTJkZVh+XKKmtrKKJf5WLQ9mNRCgwAwiVAF3HsTIsJ9D+OCS3Napp6ppVSM1TFqao+ElF9Xeq7hCdPrla5suAvXEqDQxyS8nQHF7wPm8J35g X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR01MB8611 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: Tue, 03 Sep 2024 11:03:57 -0700 Resent-From: rebecca@os.amperecomputing.com Reply-To: devel@edk2.groups.io,rebecca@os.amperecomputing.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: lJgcy4X822ja79Q7vRb1CJN7x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=Z6yxJahB; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Also, leading underscores are supposed to be reserved for compiler=20 implementations (and there only needs to be a single trailing=20 underscore) so it should really be: __CXL_Early_Discovery_TABLE_H__ -> CXL_EARLY_DISCOVERY_TABLE_H_ --=20 Rebecca On 8/30/2024 12:06 PM, Michael D Kinney via groups.io wrote: > For this MdePkg change to add an ACPI table type, do you mind opening a P= R? > > 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 >> >> 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. >> >> [RFC EDK2 PATCH 1/1] >> >> It might irritate the EDK2 folk but it is useful for everyone else >> to figure out what they are looking at. >> >>> This adds #defines and struct typedefs for the various structure >>> types in the ACPI 6.4 CXL Early Discovery Table (CEDT). >> 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. >> >> 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. >> >> >>> 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 >>> 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 >> 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) >> >> >>> +} EFI_ACPI_6_4_CEDT_Structure; >>> + >>> +/// >>> +/// 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 >> >>> + >>> +/// >>> +/// 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; >> 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 ;) >> >>> +} EFI_ACPI_6_4_CXL_Fixed_Memory_Window_Structure; >>> + >>> +#pragma pack() >>> + >>> +#endif >> >> >> >> > > >=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 (#120482): https://edk2.groups.io/g/devel/message/120482 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-