Blob Blame History Raw
commit 187e2f286f503cce9f57748da639dfccaeaecf96
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Thu Feb 25 14:19:51 2021 -0800

    CXL 2.0: CEDT: Add template
    
    Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>

diff --git a/source/common/dmtable.c b/source/common/dmtable.c
index f483a78..5b204a8 100644
--- a/source/common/dmtable.c
+++ b/source/common/dmtable.c
@@ -376,7 +376,7 @@ const ACPI_DMTABLE_DATA     AcpiDmTableData[] =
     {ACPI_SIG_BERT, AcpiDmTableInfoBert,    NULL,           NULL,           TemplateBert},
     {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt,    NULL,           NULL,           TemplateBgrt},
     {ACPI_SIG_BOOT, AcpiDmTableInfoBoot,    NULL,           NULL,           TemplateBoot},
-    {ACPI_SIG_CEDT, NULL,                   AcpiDmDumpCedt, NULL,           NULL},
+    {ACPI_SIG_CEDT, NULL,                   AcpiDmDumpCedt, NULL,           TemplateCedt},
     {ACPI_SIG_CPEP, NULL,                   AcpiDmDumpCpep, DtCompileCpep,  TemplateCpep},
     {ACPI_SIG_CSRT, NULL,                   AcpiDmDumpCsrt, DtCompileCsrt,  TemplateCsrt},
     {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2,    AcpiDmDumpDbg2, DtCompileDbg2,  TemplateDbg2},
diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h
index 5136f75..fd20109 100644
--- a/source/compiler/dtcompiler.h
+++ b/source/compiler/dtcompiler.h
@@ -587,6 +587,7 @@ extern const unsigned char  TemplateAsf[];
 extern const unsigned char  TemplateBoot[];
 extern const unsigned char  TemplateBert[];
 extern const unsigned char  TemplateBgrt[];
+extern const unsigned char  TemplateCedt[];
 extern const unsigned char  TemplateCpep[];
 extern const unsigned char  TemplateCsrt[];
 extern const unsigned char  TemplateDbg2[];
diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h
index e3fbd8b..275003c 100644
--- a/source/compiler/dttemplate.h
+++ b/source/compiler/dttemplate.h
@@ -96,6 +96,20 @@ const unsigned char TemplateBoot[] =
     0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00   /* 00000020    "(.. ...." */
 };
 
+const unsigned char TemplateCedt[] =
+{
+    /* FIXME: This is from QEMU */
+    0x43,0x45,0x44,0x54,0x44,0x00,0x00,0x00,  /* 00000000    "CEDTD..." */
+    0x01,0x3E,0x42,0x4F,0x43,0x48,0x53,0x20,  /* 00000008    ".>BOCHS " */
+    0x42,0x58,0x50,0x43,0x20,0x20,0x20,0x20,  /* 00000010    "BXPC    " */
+    0x01,0x00,0x00,0x00,0x42,0x58,0x50,0x43,  /* 00000018    "....BXPC" */
+    0x01,0x00,0x00,0x00,0x00,0x00,0x20,0x00,  /* 00000020    "...... ." */
+    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000028    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD0,  /* 00000030    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,  /* 00000038    "........" */
+    0x00,0x00,0x00,0x00                       /* 00000040    "...."     */
+};
+
 const unsigned char TemplateCpep[] =
 {
     0x43,0x50,0x45,0x50,0x34,0x00,0x00,0x00,  /* 00000000    "CPEP4..." */