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 F0ADC7803D1 for ; Fri, 30 Aug 2024 11:16:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BXWTAbGyXhzn8jJb2LVcBI9doD9iV70LKPFeIDyVGpg=; c=relaxed/simple; d=groups.io; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References:Organization: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-Type:Content-Transfer-Encoding; s=20240206; t=1725016612; v=1; b=gsnFdr+gz6cGaTa2WeNgPQ41IhnJlMcBN2pKCCQXhTrXWvFPBDFbeh4UZM0pj17e7aJS5cZh C3k3j+iwThYM/DdNXdLY8Q7bkysRrUSvAqKwHsG0mSpIEGhTFQDZHBm65j+0WHfQqp/0huKOus3 BJueDp4TgBrA1MKXPHtJmWYxa5ZYwyq7ZzUTKD+4ZOdR3pGdKLbQcotJXy/WZAe86AK1o/zj52/ VUT7llXZHXkb9r9RxqcMx1yVuIDuDiVuvUvg5LmFmrS3p4IFIalGrcs+uM2xWlM8aHB9Pz3vVsG SsG1XgLC31zPu/uOeoYqhT4NGK+boW/R2XyxRdH9Qj35A== X-Received: by 127.0.0.2 with SMTP id HPLkYY7687511x1CL0Qcsuvv; Fri, 30 Aug 2024 04:16:51 -0700 X-Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mx.groups.io with SMTP id smtpd.web10.10971.1725016610139529527 for ; Fri, 30 Aug 2024 04:16:50 -0700 X-Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4WwFrN0bfLz6HJlm; Fri, 30 Aug 2024 19:13:24 +0800 (CST) X-Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id DC5B91402C7; Fri, 30 Aug 2024 19:16:47 +0800 (CST) X-Received: from localhost (10.203.177.66) by lhrpeml500005.china.huawei.com (7.191.163.240) 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 12:16:47 +0100 Date: Fri, 30 Aug 2024 12:16:46 +0100 From: "Jonathan Cameron via groups.io" To: Yuquan Wang CC: , , , , , , , , Subject: Re: [edk2-devel] [RFC PATCH 1/1] MdePkg/IndustryStandard: add definitions for ACPI 6.4 CEDT Message-ID: <20240830121646.0000729a@Huawei.com> In-Reply-To: <20240830021117.538954-2-wangyuquan1236@phytium.com.cn> References: <20240830021117.538954-1-wangyuquan1236@phytium.com.cn> <20240830021117.538954-2-wangyuquan1236@phytium.com.cn> Organization: Huawei Technologies Research and Development (UK) Ltd. MIME-Version: 1.0 X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) 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 04:16:50 -0700 Resent-From: jonathan.cameron@huawei.com Reply-To: devel@edk2.groups.io,jonathan.cameron@huawei.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: zxl9QZ3YNIivuHsQBF6ZkS4Ix7686176AA= 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=gsnFdr+g; 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 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] =20 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. >=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/CXLEarlyDiscoveryTabl= e.h >=20 > diff --git a/MdePkg/Include/IndustryStandard/CXLEarlyDiscoveryTable.h b/M= dePkg/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 -=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 (#120447): https://edk2.groups.io/g/devel/message/120447 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-