Skip to content

Commit

Permalink
iASL: Add CCEL table to both compiler/disassembler
Browse files Browse the repository at this point in the history
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
  • Loading branch information
Kuppuswamy Sathyanarayanan committed May 26, 2022
1 parent 2ebfd74 commit 10e4763
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/common/ahtable.c
Expand Up @@ -206,6 +206,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] =
{ACPI_SIG_BERT, "Boot Error Record Table"},
{ACPI_SIG_BGRT, "Boot Graphics Resource Table"},
{ACPI_SIG_BOOT, "Simple Boot Flag Table"},
{ACPI_SIG_CCEL, "CC-Event Log Table"},
{ACPI_SIG_CEDT, "CXL Early Discovery Table"},
{ACPI_SIG_CPEP, "Corrected Platform Error Polling Table"},
{ACPI_SIG_CSRT, "Core System Resource Table"},
Expand Down
1 change: 1 addition & 0 deletions source/common/dmtable.c
Expand Up @@ -665,6 +665,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_CCEL, AcpiDmTableInfoCcel, NULL, NULL, TemplateCcel},
{ACPI_SIG_CEDT, NULL, AcpiDmDumpCedt, DtCompileCedt, TemplateCedt},
{ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep},
{ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt},
Expand Down
17 changes: 17 additions & 0 deletions source/common/dmtbinfo3.c
Expand Up @@ -190,6 +190,23 @@
* Each entry is of the form: <Field Type, Field Offset, Field Name>
*/

/*******************************************************************************
*
* CCEL - CC-Event Log Table
*
******************************************************************************/

ACPI_DMTABLE_INFO AcpiDmTableInfoCcel[] =
{
{ACPI_DMT_UINT8, ACPI_TDEL_OFFSET (CCType), "CC Type", 0},
{ACPI_DMT_UINT8, ACPI_TDEL_OFFSET (CCSubType), "CC Sub Type", 0},
{ACPI_DMT_UINT32, ACPI_TDEL_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT64, ACPI_TDEL_OFFSET (LogAreaMinimumLength), "Log Area Minimum Length", 0},
{ACPI_DMT_UINT64, ACPI_TDEL_OFFSET (LogAreaStartAddress), "Log Area Start Address", 0},
ACPI_DMT_TERMINATOR
};


/*******************************************************************************
*
* SLIC - Software Licensing Description Table. This table contains the standard
Expand Down
1 change: 1 addition & 0 deletions source/compiler/dtcompiler.h
Expand Up @@ -773,6 +773,7 @@ extern const unsigned char TemplateBoot[];
extern const unsigned char TemplateBdat[];
extern const unsigned char TemplateBert[];
extern const unsigned char TemplateBgrt[];
extern const unsigned char TemplateCcel[];
extern const unsigned char TemplateCedt[];
extern const unsigned char TemplateCpep[];
extern const unsigned char TemplateCsrt[];
Expand Down
11 changes: 11 additions & 0 deletions source/compiler/dttemplate.h
Expand Up @@ -341,6 +341,17 @@ const unsigned char TemplateBoot[] =
0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00 /* 00000020 "(.. ...." */
};

const unsigned char TemplateCcel[] =
{
0x43,0x43,0x45,0x4C,0x38,0x00,0x00,0x00, /* 00000000 "CCEL8..." */
0x04,0x1C,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x30,0x09,0x21,0x20,0x00,0x00,0x00,0x00, /* 00000020 "0.! ...." */
0xEF,0xCD,0xAB,0x78,0x56,0x34,0x12,0x00, /* 00000028 "...xV4.." */
0x78,0x56,0x34,0x12,0xEF,0xCD,0xAB,0x00 /* 00000030 "xV4....." */
};

const unsigned char TemplateCedt[] =
{
0x43,0x45,0x44,0x54,0x9c,0x01,0x00,0x00, /* 00000000 "CEDT...." */
Expand Down
5 changes: 5 additions & 0 deletions source/include/acdisasm.h
Expand Up @@ -402,6 +402,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoBdat[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCcel[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedtHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1[];
Expand Down Expand Up @@ -747,6 +748,10 @@ void
AcpiDmDumpAsf (
ACPI_TABLE_HEADER *Table);

void
AcpiDmDumpCcel (
ACPI_TABLE_HEADER *Table);

void
AcpiDmDumpCedt (
ACPI_TABLE_HEADER *Table);
Expand Down
1 change: 1 addition & 0 deletions source/include/actbinfo.h
Expand Up @@ -161,6 +161,7 @@
#define ACPI_BERT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f)
#define ACPI_BGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f)
#define ACPI_BOOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
#define ACPI_CCEL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CCEL,f)
#define ACPI_CPEP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
#define ACPI_DBG2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBG2,f)
#define ACPI_DBGP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
Expand Down
19 changes: 19 additions & 0 deletions source/include/actbl2.h
Expand Up @@ -171,6 +171,7 @@
#define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */
#define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */
#define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */
#define ACPI_SIG_CCEL "CCEL" /* CC Event Log Table */
#define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
Expand Down Expand Up @@ -521,6 +522,24 @@ typedef struct acpi_table_bdat

} ACPI_TABLE_BDAT;

/*******************************************************************************
*
* CCEL - CC-Event Log
* From: "Guest-Host-Communication Interface (GHCI) for Intel
* Trust Domain Extensions (Intel TDX)". Feb 2022
*
******************************************************************************/

typedef struct acpi_table_ccel
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT8 CCType;
UINT8 CCSubType;
UINT16 Reserved;
UINT64 LogAreaMinimumLength;
UINT64 LogAreaStartAddress;

} ACPI_TABLE_CCEL;

/*******************************************************************************
*
Expand Down
1 change: 1 addition & 0 deletions source/tools/acpisrc/astable.c
Expand Up @@ -648,6 +648,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
{"ACPI_TABLE_BERT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_BGRT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_BOOT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_CCEL", SRC_TYPE_STRUCT},
{"ACPI_TABLE_CEDT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_CPEP", SRC_TYPE_STRUCT},
{"ACPI_TABLE_CSRT", SRC_TYPE_STRUCT},
Expand Down

0 comments on commit 10e4763

Please sign in to comment.