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 6DF6BAC0A0F for ; Fri, 30 Aug 2024 02:11:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=f1TDFKjdVqem1W1qw2KbxQQ+YNud5SEnIeXUEn94sps=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: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-Transfer-Encoding; s=20240206; t=1724983898; v=1; b=B7tNtAmYnWGJmE2RZbTI5AhSV2mvLol71oechJYrDspn9pQX+FYXPjaNXCpT1SjZN6Eauu9o qBIvGtpm36pK/1bRjly1IMZp6TW/p/leutgYdUZj8D/cIq4uEyGtDOu7RNcgpj46cv7hpuvKcKJ Oxhu1vbdtTXOIKfKCFXbEBnUrmD0xlk7AqNE0exbj0Lg6RjYdO68ghLXpIVP38WEv1IQ3lqUXpz NmRMNUw3EZPxtn9IuEGV6se0hK1yQcZ1jdmmGzzA/l94APK+CV1QM6+5guqjenhLswxrSU6vT+G R5d1WmQG0pvj0oP25mZOhqcyNZaGcrkxe7fMte1ILQdHg== X-Received: by 127.0.0.2 with SMTP id qwaFYY7687511xHfNYBYAjMt; Thu, 29 Aug 2024 19:11:36 -0700 X-Received: from zg8tmja5ljk3lje4ms43mwaa.icoremail.net (zg8tmja5ljk3lje4ms43mwaa.icoremail.net [209.97.181.73]) by mx.groups.io with SMTP id smtpd.web10.3713.1724983895605173587 for ; Thu, 29 Aug 2024 19:11:36 -0700 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-6 (Coremail) with SMTP id AQAAfwBXWyNUKtFmplB+Ag--.18268S2; Fri, 30 Aug 2024 10:11:32 +0800 (CST) X-Received: from phytium.com.cn (unknown [218.76.62.144]) by mail (Coremail) with SMTP id AQAAfwD3IbJOKtFmc50pAA--.1107S4; Fri, 30 Aug 2024 10:11:30 +0800 (CST) From: "Yuquan Wang" 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 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 Message-Id: <20240830021117.538954-2-wangyuquan1236@phytium.com.cn> In-Reply-To: <20240830021117.538954-1-wangyuquan1236@phytium.com.cn> References: <20240830021117.538954-1-wangyuquan1236@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwD3IbJOKtFmc50pAA--.1107S4 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQANAWbQ2MkBnQAAs2 X-Coremail-Antispam: 1Uk129KBjvJXoWxXFW7Aw1kCrW7Gr1xtw13urg_yoW5Ary3pF s5Cay5KryDJa97Zr1aqF4Fvr4fKF4Igw1UGFs3ur9xZrWYgw1kuan8Cr18tFyFvr4FgwnF qFs2qry5GrsrCFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU 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: Thu, 29 Aug 2024 19:11:36 -0700 Resent-From: wangyuquan1236@phytium.com.cn Reply-To: devel@edk2.groups.io,wangyuquan1236@phytium.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: F3yvbKosXlJsQTzpjgafpxwsx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=B7tNtAmY; dmarc=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 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 --- 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 +#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 + +#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] -=-=-=-=-=-=-=-=-=-=-=-