public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yuquan Wang" <wangyuquan1236@phytium.com.cn>
To: Jonathan.Cameron@Huawei.com, marcin.juszkiewicz@linaro.org,
	gaoliming@byosoft.com.cn, michael.d.kinney@intel.com,
	ardb+tianocore@kernel.org
Cc: chenbaozi@phytium.com.cn, wangyinfeng@phytium.com.cn,
	shuyiqi@phytium.com.cn, qemu-devel@nongnu.org,
	devel@edk2.groups.io, Yuquan Wang <wangyuquan1236@phytium.com.cn>
Subject: [edk2-devel] [RFC PATCH 1/1] MdePkg/IndustryStandard: add definitions for ACPI 6.4 CEDT
Date: Fri, 30 Aug 2024 10:11:17 +0800	[thread overview]
Message-ID: <20240830021117.538954-2-wangyuquan1236@phytium.com.cn> (raw)
In-Reply-To: <20240830021117.538954-1-wangyuquan1236@phytium.com.cn>

This adds #defines and struct typedefs for the various structure
types in the ACPI 6.4 CXL Early Discovery Table (CEDT).

Signed-off-by: Yuquan Wang <wangyuquan1236@phytium.com.cn>
---
 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/Acpi64.h b/MdePkg/Include/IndustryStandard/Acpi64.h
index bbe6a3c9eb..c988de8ebf 100644
--- a/MdePkg/Include/IndustryStandard/Acpi64.h
+++ b/MdePkg/Include/IndustryStandard/Acpi64.h
@@ -3169,6 +3169,11 @@ typedef struct {
 ///
 #define EFI_ACPI_6_4_XEN_PROJECT_TABLE_SIGNATURE  SIGNATURE_32('X', 'E', 'N', 'V')
 
+///
+/// "CEDT" CXL Early Discovery Table
+///
+#define EFI_ACPI_6_4_CXL_EARLY_DISCOVERY_TABLE_SIGNATURE  SIGNATURE_32 ('C', 'E', 'D', 'T')
+
 #pragma pack()
 
 #endif
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 <IndustryStandard/Acpi.h>
+#include <IndustryStandard/Acpi64.h>
+
+#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
+
+#pragma pack(1)
+
+///
+/// Table header
+///
+typedef struct {
+  EFI_ACPI_DESCRIPTION_HEADER    Header;
+} EFI_ACPI_6_4_CXL_Early_Discovery_TABLE;
+
+///
+/// Node header definition shared by all structure types
+///
+typedef struct {
+  UINT8     Type;
+  UINT8     Reserved;
+  UINT16    Length;
+} 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;
+
+///
+/// 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;
+} EFI_ACPI_6_4_CXL_Fixed_Memory_Window_Structure;
+
+#pragma pack()
+
+#endif
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120437): https://edk2.groups.io/g/devel/message/120437
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-08-30  2:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30  2:11 [edk2-devel] [RFC PATCH 0/1] MdePkg/IndustryStandard: add definitions for ACPI 6.4 CEDT Yuquan Wang
2024-08-30  2:11 ` Yuquan Wang [this message]
2024-08-30 11:16   ` [edk2-devel] [RFC PATCH 1/1] " Jonathan Cameron via groups.io
2024-08-30 18:06     ` Michael D Kinney
2024-08-30 18:33       ` Rebecca Cran via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240830021117.538954-2-wangyuquan1236@phytium.com.cn \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox