7c403d
commit 187e2f286f503cce9f57748da639dfccaeaecf96
7c403d
Author: Ben Widawsky <ben@bwidawsk.net>
7c403d
Date:   Thu Feb 25 14:19:51 2021 -0800
7c403d
7c403d
    CXL 2.0: CEDT: Add template
7c403d
    
7c403d
    Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
7c403d
7c403d
diff --git a/source/common/dmtable.c b/source/common/dmtable.c
7c403d
index f483a78..5b204a8 100644
7c403d
--- a/source/common/dmtable.c
7c403d
+++ b/source/common/dmtable.c
7c403d
@@ -376,7 +376,7 @@ const ACPI_DMTABLE_DATA     AcpiDmTableData[] =
7c403d
     {ACPI_SIG_BERT, AcpiDmTableInfoBert,    NULL,           NULL,           TemplateBert},
7c403d
     {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt,    NULL,           NULL,           TemplateBgrt},
7c403d
     {ACPI_SIG_BOOT, AcpiDmTableInfoBoot,    NULL,           NULL,           TemplateBoot},
7c403d
-    {ACPI_SIG_CEDT, NULL,                   AcpiDmDumpCedt, NULL,           NULL},
7c403d
+    {ACPI_SIG_CEDT, NULL,                   AcpiDmDumpCedt, NULL,           TemplateCedt},
7c403d
     {ACPI_SIG_CPEP, NULL,                   AcpiDmDumpCpep, DtCompileCpep,  TemplateCpep},
7c403d
     {ACPI_SIG_CSRT, NULL,                   AcpiDmDumpCsrt, DtCompileCsrt,  TemplateCsrt},
7c403d
     {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2,    AcpiDmDumpDbg2, DtCompileDbg2,  TemplateDbg2},
7c403d
diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h
7c403d
index 5136f75..fd20109 100644
7c403d
--- a/source/compiler/dtcompiler.h
7c403d
+++ b/source/compiler/dtcompiler.h
7c403d
@@ -587,6 +587,7 @@ extern const unsigned char  TemplateAsf[];
7c403d
 extern const unsigned char  TemplateBoot[];
7c403d
 extern const unsigned char  TemplateBert[];
7c403d
 extern const unsigned char  TemplateBgrt[];
7c403d
+extern const unsigned char  TemplateCedt[];
7c403d
 extern const unsigned char  TemplateCpep[];
7c403d
 extern const unsigned char  TemplateCsrt[];
7c403d
 extern const unsigned char  TemplateDbg2[];
7c403d
diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h
7c403d
index e3fbd8b..275003c 100644
7c403d
--- a/source/compiler/dttemplate.h
7c403d
+++ b/source/compiler/dttemplate.h
7c403d
@@ -96,6 +96,20 @@ const unsigned char TemplateBoot[] =
7c403d
     0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00   /* 00000020    "(.. ...." */
7c403d
 };
7c403d
 
7c403d
+const unsigned char TemplateCedt[] =
7c403d
+{
7c403d
+    /* FIXME: This is from QEMU */
7c403d
+    0x43,0x45,0x44,0x54,0x44,0x00,0x00,0x00,  /* 00000000    "CEDTD..." */
7c403d
+    0x01,0x3E,0x42,0x4F,0x43,0x48,0x53,0x20,  /* 00000008    ".>BOCHS " */
7c403d
+    0x42,0x58,0x50,0x43,0x20,0x20,0x20,0x20,  /* 00000010    "BXPC    " */
7c403d
+    0x01,0x00,0x00,0x00,0x42,0x58,0x50,0x43,  /* 00000018    "....BXPC" */
7c403d
+    0x01,0x00,0x00,0x00,0x00,0x00,0x20,0x00,  /* 00000020    "...... ." */
7c403d
+    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000028    "........" */
7c403d
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD0,  /* 00000030    "........" */
7c403d
+    0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,  /* 00000038    "........" */
7c403d
+    0x00,0x00,0x00,0x00                       /* 00000040    "...."     */
7c403d
+};
7c403d
+
7c403d
 const unsigned char TemplateCpep[] =
7c403d
 {
7c403d
     0x43,0x50,0x45,0x50,0x34,0x00,0x00,0x00,  /* 00000000    "CPEP4..." */