ed51cc
commit 699fc72e56936bebf3b9ba39b6e91bd957b44452
ed51cc
Author: Alison Schofield <alison.schofield@intel.com>
ed51cc
Date:   Thu May 20 13:48:40 2021 -0700
ed51cc
ed51cc
    Add the CFMWS structure definition to the CEDT table
ed51cc
    
ed51cc
    The CXL Fixed Memory Window Structure (CFMWS) is added to the
ed51cc
    CXL Early Discovery Table (CEDT). This new structure is defined
ed51cc
    in an ECN to the CXL 2.0 specification.
ed51cc
    
ed51cc
    https://www.computeexpresslink.org/spec-landing
ed51cc
    
ed51cc
    Signed-off-by: Alison Schofield <alison.schofield@intel.com>
ed51cc
ed51cc
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
ed51cc
index 51fee30..f274a85 100644
ed51cc
--- a/source/include/actbl1.h
ed51cc
+++ b/source/include/actbl1.h
ed51cc
@@ -415,7 +415,8 @@ typedef struct acpi_cedt_header
ed51cc
 enum AcpiCedtType
ed51cc
 {
ed51cc
     ACPI_CEDT_TYPE_CHBS                 = 0,
ed51cc
-    ACPI_CEDT_TYPE_RESERVED             = 1
ed51cc
+    ACPI_CEDT_TYPE_CFMWS                = 1,
ed51cc
+    ACPI_CEDT_TYPE_RESERVED             = 2,
ed51cc
 };
ed51cc
 
ed51cc
 /* Values for version field above */
ed51cc
@@ -446,6 +447,37 @@ typedef struct acpi_cedt_chbs
ed51cc
 } ACPI_CEDT_CHBS;
ed51cc
 
ed51cc
 
ed51cc
+/* 1: CXL Fixed Memory Window Structure */
ed51cc
+
ed51cc
+typedef struct acpi_cedt_cfmws
ed51cc
+{
ed51cc
+    ACPI_CEDT_HEADER        Header;
ed51cc
+    UINT32                  Reserved1;
ed51cc
+    UINT64                  BaseHpa;
ed51cc
+    UINT64                  WindowSize;
ed51cc
+    UINT8                   InterleaveWays;
ed51cc
+    UINT8                   InterleaveArithmetic;
ed51cc
+    UINT16                  Reserved2;
ed51cc
+    UINT32                  Granularity;
ed51cc
+    UINT16                  Restrictions;
ed51cc
+    UINT16                  QtgId;
ed51cc
+    UINT32                  InterleaveTargets[];
ed51cc
+
ed51cc
+} ACPI_CEDT_CFMWS;
ed51cc
+
ed51cc
+/* Values for Interleave Arithmetic field above */
ed51cc
+
ed51cc
+#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO	(0)
ed51cc
+
ed51cc
+/* Values for Restrictions field above */
ed51cc
+
ed51cc
+#define ACPI_CEDT_CFMWS_RESTRICT_TYPE2		(1)
ed51cc
+#define ACPI_CEDT_CFMWS_RESTRICT_TYPE3		(1<<1)
ed51cc
+#define ACPI_CEDT_CFMWS_RESTRICT_VOLATILE	(1<<2)
ed51cc
+#define ACPI_CEDT_CFMWS_RESTRICT_PMEM		(1<<3)
ed51cc
+#define ACPI_CEDT_CFMWS_RESTRICT_FIXED		(1<<4)
ed51cc
+
ed51cc
+
ed51cc
 /*******************************************************************************
ed51cc
  *
ed51cc
  * CPEP - Corrected Platform Error Polling table (ACPI 4.0)