From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.6339.1688105290855019028 for ; Thu, 29 Jun 2023 23:08:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=FoltXIM3; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688105290; x=1719641290; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=uwbVG2uWgFllVrw5/1mRgg/4ixhzZR2jnVAR5uBvQqQ=; b=FoltXIM3GgaLz4wylnVAD/mC3k3mFV4+g+GYIFC6mmZvaGjtZ/tYP24L XYWTVnGSX1PmlK/ZoXDmjW8rxlVqolBd29SfJsQXvIpBFSkl7yZSqmpdK maN5gLmbK3vkQ/v8JDkmQue102W8H6zb3MGV7Cdm03bvq1ULLaUX3ru1T 6sQCSHt4hVTRsy+vayuKuZ/tfOKvxCnNChH504mR8IKWfoPfGaZ9Z7tV3 shNJUcLr9Y6garELCQmfDzzJRgl5bIPFooHMUR6uCfYYwrV8thVbsJbeb 8j7LmfI+MYf8xzMip/CjnBpcQg3K3fA+5QmP3OtHkL/qJlUlmwSzrw2rY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="448703127" X-IronPort-AV: E=Sophos;i="6.01,169,1684825200"; d="scan'208";a="448703127" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 23:08:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="830819598" X-IronPort-AV: E=Sophos;i="6.01,169,1684825200"; d="scan'208";a="830819598" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga002.fm.intel.com with ESMTP; 29 Jun 2023 23:08:10 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 29 Jun 2023 23:08:09 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.27 via Frontend Transport; Thu, 29 Jun 2023 23:08:09 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.177) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 29 Jun 2023 23:08:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lgzPNGJyG4EmCbCoCtUBigmNUv3+bFaJEyG/as56hNDpefdMyZboxqtOUEx3Whvr3fcu51esdbpQEjIxAz/pzoYbMEAKuDgy1BKW//x1Zd6yv7DMk7zRH2p26LzUX76PltOh0UPIXzzWjo9jywlI8HKEpZyZm8OG7k2j5sQoogVYnYaVu6nVBexyIab/BsCjJg07FG6xwXt+MRUqwclJfGBwlfH2XGG6s+OuivyH8Vg4YQ8vebSVHg7FJPL1yWPg191RpEiwDRieyOdkzQSPADftYWHhyU2Ts0L4QF3k1INZlntcylb3+8wjOqQhpuQgwWcgFmwA/IGHkBJ0nqcfGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yqcP0fc/wYbItd+hj+UKzaG+5eduoz5savilASPitbs=; b=jIeRKQlSIqRWh92Vur1kC5ztwup+Q+xpIdZf9DZnspCFWu+cp68Fu9gj0N4Xfniz4+ykh9pJKEEt6oWi/qxt8bUHow1nQZQPUKmUn+o50TVldA3adaBPg3xFFle0npGduFZCU+YBmxQVO7OP8Glo3tV2OVN6Rg3una0P6zaKTPeR4/VerK6Q4nKM+wBXkj69QSxwpZ2LLc0NrfIO2CNAiICxNhJee15iOyj2/LtuGnk2zlUZWwXZUQOHTlvNZzRKjGy/uNvMCSfi5wHMgqJB1pD/mB+VPHtVZDDc8ia8crP2FS9OludgRqQzeMtO5LNQJjHknkio9LEqwTz7K1TQDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DS0PR11MB6541.namprd11.prod.outlook.com (2603:10b6:8:d3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Fri, 30 Jun 2023 06:08:06 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d%2]) with mapi id 15.20.6521.023; Fri, 30 Jun 2023 06:08:05 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "chrisli@os.amperecomputing.com" , "Yao, Jiewen" , "Nong, Foster" Subject: Re: [edk2-devel] [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard Thread-Topic: [edk2-devel] [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard Thread-Index: AQHZqYEldzIsQb3uyUmUZ9Ix3q8qaa+heGDwgAFmbtqAAACO4A== Date: Fri, 30 Jun 2023 06:08:04 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-Mentions: foster.nong@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Enabled=True;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SiteId=3bc2b170-fd94-476d-b0ce-4229bdc904a7;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SetDate=2023-06-30T06:06:58.043Z;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Name=Confidential;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_ContentBits=0;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Method=Standard; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DS0PR11MB6541:EE_ x-ms-office365-filtering-correlation-id: c976bb28-9cc6-47b1-ddc5-08db79305e26 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: q39j52JInEUdlzyohwNPnNErIY3WQaiu94pIpz8Wyk76FK/VEUhhKzye5rD9vNx070GFGcGu5q8rcr4xtyCXvAeUB8CSK8QxNilJZeXaT6uNiUkHRz87qOU1cUrxAuAcLUHzusTAvIX6oBc/4EQazkAAn92EVV0M39Ng1gKfuZzeSCCNJb4xsDfReVWnlXSZmL86No4CSz6tQCxXdSpP7EL0LkBPrWiFuRujYtYQDFSSZpz34KTv6xpup6V4dyU1/6UNqeV517pCVVFQLJ1iMNZwNVixmgSJyqLQQ+J2eGmwfZQkloLsrasn2wMK6iVOSy/9uOtGBPhu071dnVQCE8ZCdjo4ZjH/qGta5z9q61wdYgzlEJVhsEfVhjS/PUFD8ofuqOk7gF1izlrZ3WXjIeXV5VlQfiOpslgXY4U4znDjPvwOIV2xa0OoAcVFAGcgZOGOAMWuE+ih3zGuedRuAfo78DZ4QSGLZJnGrjJtemSET6vWdChLDHwBKYJxO7kapIKK6pZ956ahh7HKSVKmo6DgVkPeFNho5dEQSQ8x8yobv6F6hhe5eUdzt/qbvEpWQKBGExOZM81I8Z9jHGEuvXBrlbzXaBvD7aKpTbpT7lrQlyXLrxFQcvKfrAYJAbFLO7tqYioURdAiKNRJQBWl1Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(366004)(376002)(39860400002)(396003)(136003)(346002)(451199021)(2906002)(30864003)(966005)(7696005)(53546011)(9686003)(122000001)(71200400001)(83380400001)(38100700002)(82960400001)(26005)(186003)(6506007)(55016003)(19627235002)(110136005)(41300700001)(86362001)(478600001)(76116006)(66946007)(64756008)(316002)(66446008)(6636002)(33656002)(66476007)(66556008)(8936002)(5660300002)(8676002)(38070700005)(66899021)(52536014)(579004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wr+gbiNJa3Ua4smqW4XLnhnQMN6RjRiYlPz64lhVcUb/7oMDCosvPDWcgAol?= =?us-ascii?Q?Dg81EaA+1iqE9GqE2YbFEDFTjuthoZHc7oqdbn8Q3zJU1oZi9c5riyyr3tjJ?= =?us-ascii?Q?5hftvVBQP5pCq3SEGPHsGnQKJNjEEd51rglyUZjjH1FRXe59Cuvt/cRzDu3S?= =?us-ascii?Q?ROBhApmQM84V45LPzTgF+rjLkict8Nwoebi8SeNz3LBFha6FKvbFs/BBIAiY?= =?us-ascii?Q?7KxhJBC4zPxnjJgL1JCQbs3zps4yL6M5CDvHmkJv5Cb5FLe9sRCK+LmnRh/S?= =?us-ascii?Q?NVt0lqgQNiiDQNu5823B7qio30t7yG2AvaCR2TXTtF+T807DiuRzllaOUG6v?= =?us-ascii?Q?QT3KOGwWRWYqq8hWr+bKQL504Ajln8USiDCGcNMHlzK5ttFE+2f+6jpYmtXs?= =?us-ascii?Q?e3w7+c/eQo0c2EI0DTL+x9pk275GZyirTDmhZ2+t3viqxv4Q+57mDwynSRvn?= =?us-ascii?Q?KUwMw+5LWV2pngWLHGjFmHJpKeZe01pZ0pudgpoFOUAOxtGfrsdDGokgSdP6?= =?us-ascii?Q?nEAvBamLnw3vV/pTQa3oiv/UEW3E7oQY9ka/R0SPQGnh+/CHA70bezqIzq0q?= =?us-ascii?Q?5x8Z4VIm1Rj1TvrdT14/kHru+Q0cWv0GD3WfCs+mWiUKcOaM2hG9AiWl08hb?= =?us-ascii?Q?ogqi1n9QSaKaTdLb/HzTuIcRyunSln40TYvOm6/nJNcYuPXMOuPHOaktcg+L?= =?us-ascii?Q?B6MtMX42iTtSOvGMQkFzU3VG9cT3p5FDpdlEoocvjKNao4iHj0Nfg+gyFZab?= =?us-ascii?Q?v7qZkHPql+/7cNZDscmP7Vr/5o3x1Y+47AJcKSaBEIP/9/NeHqTq+w+nJWzz?= =?us-ascii?Q?iz3sahmwy09dUXIS7YA7cu6c0xLFk7TuctNzftvKVefPnkVeZatrAUd7krGQ?= =?us-ascii?Q?Ky7ASlc02xtf59B2KRMJLFiCLwJM6iDYqgPwFY7phjFQkLSntlhGOJANT9BA?= =?us-ascii?Q?VH9o3keZf+W3NFPAgMNjITF2zq4LaqXHqA+KcNIAasNXAnPF3tusK1+elINX?= =?us-ascii?Q?J8oBynP0Z8RMdiYsnnfmqRnHaCe0QttoBdF+kiJ/sOm8gMSWQ4kacCyvmrkY?= =?us-ascii?Q?jG5sBMxtIrW2UkQ/PIoAlMTMQom5HwyYlAtxn8dr4eiHP4Ijk4rDnkpAxlye?= =?us-ascii?Q?B71P5Y2+31tm7A5FDfk3NEk1Jybgzq7MHV2x3K6FTxPSg8LvZwFIEoSM2wuK?= =?us-ascii?Q?Jl4z5cufEa0ArGv1/BVjdpk6k0p1E1cK8Mads4Zz4qe0q28MqCSXNEcCrcMP?= =?us-ascii?Q?vogatLZkzp//9+hkv6xwz++/mKeGrt+IsDEkjrMUdq9MxzkViR6+KjR+ZBx8?= =?us-ascii?Q?MfNXTkmpTbEggpy8H4TyAVL6vqI894hGTxlDswvxdE9TQAc5AxasUib2EnTb?= =?us-ascii?Q?MEj5tG3b6CG6nlNpTotHysp2laQDsfZKSwHjnROJrjjB2wk6R45E90wmruaH?= =?us-ascii?Q?tex+FzHycZXVdibNNtcU+TUrOnvzkwPywpe80+z/x9gCXSic1kAO9YyBVRxt?= =?us-ascii?Q?2daq096HnDFolt+HyaOweQGEUZf9rFpUClAG7PC9vqMmKNugmEssP7ynfg5V?= =?us-ascii?Q?HxcY23AEi2ZAU60pIJI=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c976bb28-9cc6-47b1-ddc5-08db79305e26 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2023 06:08:04.7991 (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: TiP/Nh9K3KKDsJ90WUqwcCuhDlcqYMSxLXYXeUqO7pDz9a/IaRkoSKdJXJDRaB8YSs5NKvqacngH9AHWZZLZBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB6541 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable +@Nong, Foster=20 > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Chris Li O= S > via groups.io > Sent: Friday, June 30, 2023 2:07 PM > To: Yao, Jiewen ; devel@edk2.groups.io > Subject: Re: [edk2-devel] [PATCH 1/1] MdePkg: Add Cxl20.h into > IndustryStandard >=20 > Thanks Jiewen, will soon send an v2 for it. >=20 > ________________________________________ > From: Yao, Jiewen > Sent: Thursday, June 29, 2023 4:43 PM > To: Chris Li OS; devel@edk2.groups.io > Cc: Yao, Jiewen > Subject: RE: [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard >=20 > Thanks for the update. >=20 > +} HDM_DECODER_N_INFO; >=20 > I think this need add CXL_ prefix. >=20 > Other looks good to me. >=20 > Thank you > Yao, Jiewen >=20 >=20 >=20 > > -----Original Message----- > > From: Chris Li OS > > Sent: Wednesday, June 28, 2023 1:28 PM > > To: devel@edk2.groups.io; Yao, Jiewen > > Subject: [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard > > > > 1) Add CXL 2.0 header file to comply with CXL 2.0 specification > > 2) CXL 2.0 header will embed Cxl11.h > > 3) Updated Cxl.h to point to 2.0 header file > > > > Signed-off-by: Chris Li > > --- > > MdePkg/Include/IndustryStandard/Cxl.h | 2 +- > > MdePkg/Include/IndustryStandard/Cxl20.h | 477 > ++++++++++++++++++++++++ > > 2 files changed, 478 insertions(+), 1 deletion(-) > > create mode 100644 MdePkg/Include/IndustryStandard/Cxl20.h > > > > diff --git a/MdePkg/Include/IndustryStandard/Cxl.h > > b/MdePkg/Include/IndustryStandard/Cxl.h > > index 06c1230e3e..9ad3242e25 100644 > > --- a/MdePkg/Include/IndustryStandard/Cxl.h > > +++ b/MdePkg/Include/IndustryStandard/Cxl.h > > @@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > > #ifndef _CXL_MAIN_H_ > > #define _CXL_MAIN_H_ > > > > -#include > > +#include > > // > > // CXL assigned new Vendor ID > > // > > diff --git a/MdePkg/Include/IndustryStandard/Cxl20.h > > b/MdePkg/Include/IndustryStandard/Cxl20.h > > new file mode 100644 > > index 0000000000..a08251f4e9 > > --- /dev/null > > +++ b/MdePkg/Include/IndustryStandard/Cxl20.h > > @@ -0,0 +1,477 @@ > > +/** @file > > + CXL 2.0 Register definitions > > + > > + This file contains the register definitions based on the Compute Exp= ress Link > > + (CXL) Specification Revision 2.0. > > + > > + Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
> > + > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#ifndef CXL20_H_ > > +#define CXL20_H_ > > + > > +#include > > + > > +// > > +// Ensure proper structure formats > > +// > > +#pragma pack(1) > > + > > + > > +// > > +// CXL DVSEC IDs and Revisions > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.1 > > +// > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_CXL_DEVICE 0x0 > > +#define CXL_DVSEC_ID_NON_CXL_FUNCTION_MAP 0x2 > > +#define CXL_DVSEC_ID_CXL20_EXTENSIONS_DVSEC_FOR_PORTS 0x3 > > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_PORTS 0x4 > > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_DEVICES 0x5 > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_FLEX_BUS_PORT 0x7 > > +#define CXL_DVSEC_ID_REGISTER_LOCATOR 0x8 > > +#define CXL_DVSEC_ID_MLD 0x9 > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_TEST_CAPABILITY 0xA > > + > > +#define CXL20_DVSEC_REVISON_REGISTOR_LOCATOR 0x0 > > + > > +// > > +// Register Block ID > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.9.1 > > +// > > +#define CXL_REGISTER_BLOCK_ID_EMPTY 0x0 > > +#define CXL_REGISTER_BLOCK_ID_COMPONENT 0x01 > > +#define CXL_REGISTER_BLOCK_ID_BAR_VIRTUALIZATION_ACL 0x02 > > +#define CXL_REGISTER_BLOCK_ID_DEVICE 0x03 > > + > > +// > > +// Component Register Block Register Ranges Offset > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.4 > > +// > > +#define CXL_COMPONENT_REGISTERS_RANGE_OFFSET_IO 0x0 > > +#define CXL_COMPONENT_REGISTERS_RANGE_OFFSET_CACHE_MEM > > 0x1000 > > +#define CXL_COMPONENT_REGISTERS_RANGE_OFFSET_ARB_MUX > 0xE000 > > + > > +// > > +// CXL Cache Memory Capability IDs > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.5 > > +// > > +#define CXL_CACHE_MEM_CAPABILITY_ID_CXL 0x1 > > +#define CXL_CACHE_MEM_CAPABILITY_ID_RAS 0x2 > > +#define CXL_CACHE_MEM_CAPABILITY_ID_SECURITY 0x3 > > +#define CXL_CACHE_MEM_CAPABILITY_ID_LINK 0x4 > > +#define CXL_CACHE_MEM_CAPABILITY_ID_HDM_DECODER 0x5 > > +#define CXL_CACHE_MEM_CAPABILITY_ID_EXTENDED_SECURITY 0x6 > > +#define CXL_CACHE_MEM_CAPABILITY_ID_IDE 0x7 > > +#define CXL_CACHE_MEM_CAPABILITY_ID_SNOOP_FILTER 0x8 > > +#define CXL_CACHE_MEM_CAPABILITY_ID_MASK 0xFFFF > > + > > +// > > +// Generic CXL Device Capability IDs 0x0000 ~ 0x3FFF > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.8.2.1 > > +// > > +#define CXL_DEVICE_CAPABILITY_ID_CAPABILITIES_ARRAY_REGISTER > > 0x0000 > > +#define CXL_DEVICE_CAPABILITY_ID_DEVICE_STATUS 0x00= 01 > > +#define CXL_DEVICE_CAPABILITY_ID_PRIMARY_MAILBOX 0x00= 02 > > +#define CXL_DEVICE_CAPABILITY_ID_SECONDARY_MAILBOX 0x00= 03 > > + > > +// > > +// Specific CXL Device Capability IDs 0x4000 ~ 0x7FFF > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.8.2.1 > > +// > > +// (ref: CXL 2.0 spec $8.2.8.5) > > +#define CXL_DEVICE_CAPABILITY_ID_MEMORY_DEVICE_STATUS > > 0x4000 > > +#define CXL_DEVICE_CAPABILITY_ID_MASK 0xFF= FF > > + > > +// > > +// Memory Device Status > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.8.5.1= .1 > > +// > > +#define CXL_MEM_DEVICE_MEDIA_STATUS_NOT_READY 0b00 > > +#define CXL_MEM_DEVICE_MEDIA_STATUS_READY 0b01 > > +#define CXL_MEM_DEVICE_MEDIA_STATUS_ERROR 0b10 > > +#define CXL_MEM_DEVICE_MEDIA_STATUS_DISABLED 0b11 > > + > > +// > > +// PCIe DVSEC for CXL Device > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.3 > > +// > > +typedef union { > > + struct { > > + UINT16 CacheCapable : 1; // bit 0 > > + UINT16 IoCapable : 1; // bit 1 > > + UINT16 MemCapable : 1; // bit 2 > > + UINT16 MemHwInitMode : 1; // bit 3 > > + UINT16 HdmCount : 2; // bit 4..= 5 > > + UINT16 CacheWriteBackAndInvalidateCapable : 1; // bit 6 > > + UINT16 CxlResetCapable : 1; // bit 7 > > + UINT16 CxlResetTimeout : 3; // bit 8..= 10 > > + UINT16 CxlResetMemClrCapable : 1; // bit 11 > > + UINT16 Reserved : 1; // bit 12 > > + UINT16 MultipleLogicalDevice : 1; // bit 13 > > + UINT16 ViralCapable : 1; // bit 14 > > + UINT16 PmInitCompletionReportingCapable : 1; // bit 15 > > + } Bits; > > + UINT16 Uint16; > > +} CXL_DVSEC_CXL_DEVICE_CAPABILITY; > > + > > +typedef union { > > + struct { > > + UINT16 CacheEnable : 1; // bit 0 > > + UINT16 IoEnable : 1; // bit 1 > > + UINT16 MemEnable : 1; // bit 2 > > + UINT16 CacheSfCoverage : 5; // bit 3..7 > > + UINT16 CacheSfGranularity : 3; // bit 8..10 > > + UINT16 CacheCleanEviction : 1; // bit 11 > > + UINT16 Reserved1 : 2; // bit 12..13 > > + UINT16 ViralEnable : 1; // bit 14 > > + UINT16 Reserved2 : 1; // bit 15 > > + } Bits; > > + UINT16 Uint16; > > +} CXL_DVSEC_CXL_DEVICE_CONTROL; > > + > > +typedef union { > > + struct { > > + UINT16 Reserved1 : 14; // bit 0..13 > > + UINT16 ViralStatus : 1; // bit 14 > > + UINT16 Reserved2 : 1; // bit 15 > > + } Bits; > > + UINT16 Uint16; > > +} CXL_DVSEC_CXL_DEVICE_STATUS; > > + > > +typedef union { > > + struct { > > + UINT16 DisableCaching : 1; // bit 0 > > + UINT16 InitiateCacheWriteBackAndInvalidate : 1; // bit 1 > > + UINT16 InitiateCxlReset : 1; // bit 2 > > + UINT16 CxlResetMemClrEnable : 1; // bit 3 > > + UINT16 Reserved : 12; // bit 4..= 15 > > + } Bits; > > + UINT16 Uint16; > > +} CXL_2_0_DVSEC_CXL_DEVICE_CONTROL2; > > + > > +typedef union { > > + struct { > > + UINT16 CacheInvalid : 1; // bit= 0 > > + UINT16 CxlResetComplete : 1; // bit= 1 > > + UINT16 Reserved : 13; // bit= 2..14 > > + UINT16 PowerManagementInitialzationComplete : 1; // bit= 15 > > + } Bits; > > + UINT16 Uint16; > > +} CXL_2_0_DVSEC_CXL_DEVICE_STATUS2; > > + > > +typedef union { > > + struct { > > + UINT16 ConfigLock : 1; // bit 0 > > + UINT16 Reserved : 15; // bit 1..15 > > + } Bits; > > + UINT16 Uint16; > > +} CXL_DVSEC_CXL_DEVICE_LOCK; > > + > > +typedef union { > > + struct { > > + UINT16 CacheSizeUnit : 4; // bit 0..3 > > + UINT16 Reserved : 4; // bit 4..7 > > + UINT16 CacheSize : 8; // bit 8..15 > > + } Bits; > > + UINT16 Uint16; > > +} CXL_2_0_DVSEC_CXL_DEVICE_CAPABILITY2; > > + > > +typedef union { > > + struct { > > + UINT32 MemorySizeHigh : 32; // bit 0..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_DVSEC_CXL_DEVICE_RANGE1_SIZE_HIGH; > > + > > +typedef union { > > + struct { > > + UINT32 MemoryInfoValid : 1; // bit 0 > > + UINT32 MemoryActive : 1; // bit 1 > > + UINT32 MediaType : 3; // bit 2..4 > > + UINT32 MemoryClass : 3; // bit 5..7 > > + UINT32 DesiredInterleave : 5; // bit 8..12 > > + UINT32 MemoryActiveTimeout : 3; // bit 13..15 > > + UINT32 Reserved : 12; // bit 16..27 > > + UINT32 MemorySizeLow : 4; // bit 28..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_DVSEC_CXL_DEVICE_RANGE1_SIZE_LOW; > > + > > +typedef union { > > + struct { > > + UINT32 MemoryBaseHigh : 32; // bit 0..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_DVSEC_CXL_DEVICE_RANGE1_BASE_HIGH; > > + > > +typedef union { > > + struct { > > + UINT32 Reserved : 28; // bit 0..27 > > + UINT32 MemoryBaseLow : 4; // bit 28..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_DVSEC_CXL_DEVICE_RANGE1_BASE_LOW; > > + > > +typedef union { > > + struct { > > + UINT32 MemorySizeHigh : 32; // bit 0..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_DVSEC_CXL_DEVICE_RANGE2_SIZE_HIGH; > > + > > +typedef union { > > + struct { > > + UINT32 MemoryInfoValid : 1; // bit 0 > > + UINT32 MemoryActive : 1; // bit 1 > > + UINT32 MediaType : 3; // bit 2..4 > > + UINT32 MemoryClass : 3; // bit 5..7 > > + UINT32 DesiredInterleave : 5; // bit 8..12 > > + UINT32 MemoryActiveTimeout : 3; // bit 13..15 > > + UINT32 Reserved : 12; // bit 16..27 > > + UINT32 MemorySizeLow : 4; // bit 28..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_DVSEC_CXL_DEVICE_RANGE2_SIZE_LOW; > > + > > +typedef union { > > + struct { > > + UINT32 MemoryBaseHigh : 32; // bit 0..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_DVSEC_CXL_DEVICE_RANGE2_BASE_HIGH; > > + > > +typedef union { > > + struct { > > + UINT32 Reserved : 28; // bit 0..27 > > + UINT32 MemoryBaseLow : 4; // bit 28..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_DVSEC_CXL_DEVICE_RANGE2_BASE_LOW; > > + > > +typedef struct { > > + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; > > // offset 0x00 > > + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 > > DesignatedVendorSpecificHeader1; // offset 0x04 > > + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 > > DesignatedVendorSpecificHeader2; // offset 0x08 > > + CXL_DVSEC_CXL_DEVICE_CAPABILITY DeviceCapability; > > // offset 0x0A > > + CXL_DVSEC_CXL_DEVICE_CONTROL DeviceControl; > > // offset 0x0C > > + CXL_DVSEC_CXL_DEVICE_STATUS DeviceStatus; = // > > offset 0x0E > > + CXL_2_0_DVSEC_CXL_DEVICE_CONTROL2 DeviceControl2; > > // offset 0x10 > > + CXL_2_0_DVSEC_CXL_DEVICE_STATUS2 DeviceStatus2; > > // offset 0x12 > > + CXL_DVSEC_CXL_DEVICE_LOCK DeviceLock; = // > > offset 0x14 > > + CXL_2_0_DVSEC_CXL_DEVICE_CAPABILITY2 DeviceCapability2= ; > > // offset 0x16 > > + CXL_DVSEC_CXL_DEVICE_RANGE1_SIZE_HIGH > DeviceRange1SizeHigh; > > // offset 0x18 > > + CXL_DVSEC_CXL_DEVICE_RANGE1_SIZE_LOW > DeviceRange1SizeLow; > > // offset 0x1C > > + CXL_DVSEC_CXL_DEVICE_RANGE1_BASE_HIGH > > DeviceRange1BaseHigh; // offset 0x20 > > + CXL_DVSEC_CXL_DEVICE_RANGE1_BASE_LOW > > DeviceRange1BaseLow; // offset 0x24 > > + CXL_DVSEC_CXL_DEVICE_RANGE2_SIZE_HIGH > DeviceRange2SizeHigh; > > // offset 0x28 > > + CXL_DVSEC_CXL_DEVICE_RANGE2_SIZE_LOW > DeviceRange2SizeLow; > > // offset 0x2C > > + CXL_DVSEC_CXL_DEVICE_RANGE2_BASE_HIGH > > DeviceRange2BaseHigh; // offset 0x30 > > + CXL_DVSEC_CXL_DEVICE_RANGE2_BASE_LOW > > DeviceRange2BaseLow; // offset 0x34 > > +} CXL_2_0_DVSEC_CXL_DEVICE; > > + > > +// > > +// Register Locator DVSEC > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.9 > > +// > > +typedef union { > > + struct { > > + UINT32 RegisterBir : 3; // bit 0..2 > > + UINT32 Reserved : 5; // bit 3..7 > > + UINT32 RegisterBlockIdentifier : 8; // bit 8..15 > > + UINT32 RegisterBlockOffsetLow : 16; // bit 16..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_REGISTER_LOCATOR_DVSEC_REGISTER_OFFSET_LOW; > > + > > +typedef union { > > + struct { > > + UINT32 RegisterBlockOffsetHigh : 32; // bit 0..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_REGISTER_LOCATOR_DVSEC_REGISTER_OFFSET_HIGH; > > + > > +typedef struct { > > + CXL_REGISTER_LOCATOR_DVSEC_REGISTER_OFFSET_LOW OffsetLow; > > + CXL_REGISTER_LOCATOR_DVSEC_REGISTER_OFFSET_HIGH OffsetHigh; > > +} CXL_REGISTER_LOCATOR_DVSEC_REGISTER_BLOCK; > > + > > + > > +typedef struct { > > + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; > > // offset 0x00 > > + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 > > DesignatedVendorSpecificHeader1; // offset 0x04 > > + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 > > DesignatedVendorSpecificHeader2; // offset 0x08 > > + UINT16 Reserved; = // offset 0x0A > > + CXL_REGISTER_LOCATOR_DVSEC_REGISTER_BLOCK RegisterBlock[1]; > > // offset 0x0C > > +} CXL_REGISTER_LOCATOR_DVSEC; > > + > > +// > > +// CXL HDM Decoder Capability Header Register > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.5.5 > > +// > > +typedef union { > > + struct { > > + UINT32 CxlCapabilityId : 16; // bit 0..15 > > + UINT32 CxlCapabilityVersion : 4; // bit 16..19 > > + UINT32 CxlHdmDecoderCapabilityPointer : 12; // bit 20..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_CAPABILITY_HEADER_REGISTER; > > + > > +// > > +// CXL HDM Decoder Capability Register > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.5.12 > > +// > > +typedef union { > > + struct { > > + UINT32 DecoderCount : 4; // bit 0..3 > > + UINT32 TargetCount : 4; // bit 4..7 > > + UINT32 A11to8InterleaveCapable : 1; // bit 8 > > + UINT32 A14to12InterleaveCapable : 1; // bit 9 > > + UINT32 PoisonOnDecodeErrorCapability : 1; // bit 10 > > + UINT32 Reserved : 21; // bit 11..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_2_0_HDM_DECODER_CAPABILITY_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 PoisonOnDecodeErrorEnable : 1; // bit 0 > > + UINT32 HdmDecoderEnable : 1; // bit 1 > > + UINT32 Reserved : 30; // bit 2..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_GLOBAL_CONTROL_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 Reserved : 28; // bit 0..27 > > + UINT32 MemoryBaseLow : 4; // bit 28..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_N_BASE_LOW_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 MemoryBaseHigh : 32; // bit 0..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_N_BASE_HIGH_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 Reserved : 28; // bit 0..27 > > + UINT32 MemorySizeLow : 4; // bit 28..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_N_SIZE_LOW_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 MemorySizeHigh : 32; // bit 0..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_N_SIZE_HIGH_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 InterleaveGranularity : 4; // bit 0..3 > > + UINT32 InterleaveWays : 4; // bit 4..7 > > + UINT32 LockOnCommit : 1; // bit 8 > > + UINT32 Commit : 1; // bit 9 > > + UINT32 Committed : 1; // bit 10 > > + UINT32 ErrorNotCommitted : 1; // bit 11 > > + UINT32 TargetDeviceType : 1; // bit 12 > > + UINT32 Reserved : 19; // bit 13..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_2_0_HDM_DECODER_N_CONTROL_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 TargetPortIdentiferWay0 : 8; // bit 0..7 > > + UINT32 TargetPortIdentiferWay1 : 8; // bit 8..15 > > + UINT32 TargetPortIdentiferWay2 : 8; // bit 16..23 > > + UINT32 TargetPortIdentiferWay3 : 8; // bit 24..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_N_TARGET_LIST_LOW_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 Reserved : 28; // bit 0..27 > > + UINT32 DpaSkipLow : 4; // bit 28..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_N_DPA_SKIP_LOW_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 TargetPortIdentiferWay4 : 8; // bit 0..7 > > + UINT32 TargetPortIdentiferWay5 : 8; // bit 8..15 > > + UINT32 TargetPortIdentiferWay6 : 8; // bit 16..23 > > + UINT32 TargetPortIdentiferWay7 : 8; // bit 24..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_N_TARGET_LIST_HIGH_REGISTER; > > + > > +typedef union { > > + struct { > > + UINT32 DpaSkipHigh : 32; // bit 0..31 > > + } Bits; > > + UINT32 Uint32; > > +} CXL_HDM_DECODER_N_DPA_SKIP_HIGH_REGISTER; > > + > > +typedef union { > > + CXL_HDM_DECODER_N_TARGET_LIST_LOW_REGISTER TargetListLow; > > + CXL_HDM_DECODER_N_DPA_SKIP_LOW_REGISTER DpaSkipLow; > > +} CXL_HDM_DECODER_N_TARGET_LIST_OR_DPA_SKIP_LOW; > > + > > +typedef union { > > + CXL_HDM_DECODER_N_TARGET_LIST_HIGH_REGISTER TargetListHigh; > > + CXL_HDM_DECODER_N_DPA_SKIP_HIGH_REGISTER DpaSkipHigh; > > +} CXL_HDM_DECODER_N_TARGET_LIST_OR_DPA_SKIP_HIGH; > > + > > +typedef struct { > > + CXL_HDM_DECODER_N_BASE_LOW_REGISTER DecoderBaseLow; > > // 0x10 > > + CXL_HDM_DECODER_N_BASE_HIGH_REGISTER DecoderBaseHigh; > > // 0x14 > > + CXL_HDM_DECODER_N_SIZE_LOW_REGISTER DecoderSizeLow; > > // 0x18 > > + CXL_HDM_DECODER_N_SIZE_HIGH_REGISTER DecoderSizeHigh; > > // 0x1c > > + CXL_2_0_HDM_DECODER_N_CONTROL_REGISTER DecoderControl; > > // 0x20 > > + CXL_HDM_DECODER_N_TARGET_LIST_OR_DPA_SKIP_LOW > > DecoderTargetListDpaSkipLow; // 0x24 > > + CXL_HDM_DECODER_N_TARGET_LIST_OR_DPA_SKIP_HIGH > > DecoderTargetListDpaSkipHigh; // 0x28 > > + UINT32 Reserved; = // 0x2C > > +} HDM_DECODER_N_INFO; > > + > > +typedef union { > > + struct { > > + UINT64 CxlDeviceCapabilityId : 16; // bit 0..15 > > + UINT64 CxlDeviceCapabilityVersion : 8; // bit 16..23 > > + UINT64 Reserved1 : 8; // bit 24..31 > > + UINT64 CxlDeviceCapabilitiesCount : 16; // bit 32..47 > > + UINT64 Reserved2 : 16; // bit 48..63 > > + } Bits; > > + UINT64 Uint64; > > +} CXL_DEVICE_CAPABILITIES_ARRAY_REGISTER; > > + > > +// > > +// CXL Memory Status Register > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.8.5 > > +// > > +typedef union { > > + struct { > > + UINT64 DeviceFatal : 1; // bit 0 > > + UINT64 FwHalt : 1; // bit 1 > > + UINT64 MediaStatus : 2; // bit 2..3 > > + UINT64 MailboxInterfacesReady : 1; // bit 4 > > + UINT64 ResetNeeded : 3; // bit 5..7 > > + UINT64 Reserved : 56; // bit 8..63 > > + } Bits; > > + UINT64 Uint64; > > +} CXL_MEMORY_DEVICE_STATUS_REGISTER; > > + > > +#pragma pack() > > + > > +#endif > > -- > > 2.34.1 >=20 >=20 >=20 >=20