Skip to content

Commit

Permalink
iASL: Add TDEL table to both compiler/disassembler
Browse files Browse the repository at this point in the history
Added ACPI_PCC_INFO to AcpiSrc.
  • Loading branch information
acpibob committed Dec 9, 2021
1 parent 86c919d commit 403f996
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 2 deletions.
1 change: 1 addition & 0 deletions source/common/ahtable.c
Expand Up @@ -257,6 +257,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] =
{ACPI_SIG_STAO, "Status Override Table"},
{ACPI_SIG_SVKL, "Storage Volume Key Location Table"},
{ACPI_SIG_TCPA, "Trusted Computing Platform Alliance Table"},
{ACPI_SIG_TDEL, "TD-Event Log Table"},
{ACPI_SIG_TPM2, "Trusted Platform Module hardware interface Table"},
{ACPI_SIG_UEFI, "UEFI Boot Optimization Table"},
{ACPI_SIG_VIOT, "Virtual I/O Translation Table"},
Expand Down
1 change: 1 addition & 0 deletions source/common/dmtable.c
Expand Up @@ -702,6 +702,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao},
{ACPI_SIG_SVKL, AcpiDmTableInfoSvkl, AcpiDmDumpSvkl, DtCompileSvkl, TemplateSvkl},
{ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa},
{ACPI_SIG_TDEL, AcpiDmTableInfoTdel, NULL, NULL, TemplateTdel},
{ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2},
{ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi},
{ACPI_SIG_VIOT, AcpiDmTableInfoViot, AcpiDmDumpViot, DtCompileViot, TemplateViot},
Expand Down
14 changes: 14 additions & 0 deletions source/common/dmtbinfo3.c
Expand Up @@ -491,6 +491,20 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaServer[] =
};


/*******************************************************************************
*
* TDEL - TD-Event Log Table
*
******************************************************************************/

ACPI_DMTABLE_INFO AcpiDmTableInfoTdel[] =
{
{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
};

/*******************************************************************************
*
* TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
Expand Down
1 change: 0 additions & 1 deletion source/compiler/asluuid.c
Expand Up @@ -211,4 +211,3 @@ AuValidateUuid (

return (AE_OK);
}

1 change: 1 addition & 0 deletions source/compiler/dtcompiler.h
Expand Up @@ -815,6 +815,7 @@ extern const unsigned char TemplateSrat[];
extern const unsigned char TemplateStao[];
extern const unsigned char TemplateSvkl[];
extern const unsigned char TemplateTcpa[];
extern const unsigned char TemplateTdel[];
extern const unsigned char TemplateTpm2[];
extern const unsigned char TemplateUefi[];
extern const unsigned char TemplateViot[];
Expand Down
1 change: 0 additions & 1 deletion source/compiler/dttable2.c
Expand Up @@ -2496,7 +2496,6 @@ DtCompileStao (
}



/******************************************************************************
*
* FUNCTION: DtCompileSvkl
Expand Down
11 changes: 11 additions & 0 deletions source/compiler/dttemplate.h
Expand Up @@ -1828,6 +1828,17 @@ const unsigned char TemplateTcpa[] =
0x01,0x01,0x01,0x01 /* 00000060 "...." */
};

const unsigned char TemplateTdel[] =
{
0x54,0x44,0x45,0x4C,0x38,0x00,0x00,0x00, /* 00000000 "TDEL8..." */
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 TemplateTpm2[] =
{
0x54,0x50,0x4D,0x32,0x4C,0x00,0x00,0x00, /* 00000000 "TPM2L..." */
Expand Down
5 changes: 5 additions & 0 deletions source/include/acdisasm.h
Expand Up @@ -643,6 +643,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaClient[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaServer[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTdel[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm211[];
Expand Down Expand Up @@ -890,6 +891,10 @@ void
AcpiDmDumpTcpa (
ACPI_TABLE_HEADER *Table);

void
AcpiDmDumpTdel (
ACPI_TABLE_HEADER *Table);

void
AcpiDmDumpTpm2 (
ACPI_TABLE_HEADER *Table);
Expand Down
1 change: 1 addition & 0 deletions source/include/actbinfo.h
Expand Up @@ -197,6 +197,7 @@
#define ACPI_STAO_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_STAO,f)
#define ACPI_SVKL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SVKL,f)
#define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_HDR,f)
#define ACPI_TDEL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TDEL,f)
#define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f)
#define ACPI_TPM23_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM23,f)
#define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
Expand Down
19 changes: 19 additions & 0 deletions source/include/actbl2.h
Expand Up @@ -192,6 +192,7 @@
#define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
#define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
#define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
#define ACPI_SIG_TDEL "TDEL" /* TD Event Log Table */


/*
Expand Down Expand Up @@ -3047,6 +3048,24 @@ enum acpi_svkl_format
};


/*******************************************************************************
*
* TDEL - TD-Event Log
* From: "Guest-Host-Communication Interface (GHCI) for Intel
* Trust Domain Extensions (Intel TDX)".
* September 2020
*
******************************************************************************/

typedef struct acpi_table_tdel
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT32 Reserved;
UINT64 LogAreaMinimumLength;
UINT64 LogAreaStartAddress;

} ACPI_TABLE_TDEL;

/* Reset to default packing */

#pragma pack()
Expand Down
2 changes: 2 additions & 0 deletions source/tools/acpisrc/astable.c
Expand Up @@ -443,6 +443,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
{"ACPI_PARSE_STATE", SRC_TYPE_STRUCT},
{"ACPI_PARSE_UPWARDS", SRC_TYPE_SIMPLE},
{"ACPI_PARSE_VALUE", SRC_TYPE_UNION},
{"ACPI_PCC_INFO", SRC_TYPE_STRUCT},
{"ACPI_PCI_DEVICE", SRC_TYPE_STRUCT},
{"ACPI_PCI_ID", SRC_TYPE_STRUCT},
{"ACPI_PCI_ROUTING_TABLE", SRC_TYPE_STRUCT},
Expand Down Expand Up @@ -696,6 +697,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
{"ACPI_TABLE_SRAT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_STAO", SRC_TYPE_STRUCT},
{"ACPI_TABLE_TCPA", SRC_TYPE_STRUCT},
{"ACPI_TABLE_TDEL", SRC_TYPE_STRUCT},
{"ACPI_TABLE_TPM2", SRC_TYPE_STRUCT},
{"ACPI_TABLE_TPM23", SRC_TYPE_STRUCT},
{"ACPI_TABLE_UEFI", SRC_TYPE_STRUCT},
Expand Down

0 comments on commit 403f996

Please sign in to comment.