diff options
author | Erik Schmauss <erik.schmauss@intel.com> | 2018-10-25 10:29:04 -0700 |
---|---|---|
committer | Erik Schmauss <erik.schmauss@intel.com> | 2018-10-25 10:29:04 -0700 |
commit | e8ffd86e1a1a7d5c2ab5b1fe0e899c91f609393f (patch) | |
tree | 7c1febd824b2310d505916e5a91745495f8b7494 | |
parent | 32ce0ade653fc7f8d10ad83079f644cf4c5e99fc (diff) | |
download | acpica-e8ffd86e1a1a7d5c2ab5b1fe0e899c91f609393f.tar.gz |
iASL: add support for TPM2 rev 3 compilation
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
-rw-r--r-- | source/compiler/dttable2.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/source/compiler/dttable2.c b/source/compiler/dttable2.c index 3f9703776..0b196a2fe 100644 --- a/source/compiler/dttable2.c +++ b/source/compiler/dttable2.c @@ -1878,6 +1878,62 @@ DtCompileTcpa ( /****************************************************************************** * + * FUNCTION: DtCompileTpm2Rev3 + * + * PARAMETERS: PFieldList - Current field list pointer + * + * RETURN: Status + * + * DESCRIPTION: Compile TPM2 revision 3 + * + *****************************************************************************/ +static ACPI_STATUS +DtCompileTpm2Rev3 ( + void **List) +{ + DT_FIELD **PFieldList = (DT_FIELD **) List; + DT_SUBTABLE *Subtable; + ACPI_TABLE_TPM23 *Tpm23Header; + DT_SUBTABLE *ParentTable; + ACPI_STATUS Status = AE_OK; + + + Status = DtCompileTable (PFieldList, AcpiDmTableInfoTpm23, + &Subtable); + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + Tpm23Header = ACPI_CAST_PTR (ACPI_TABLE_TPM23, ParentTable->Buffer); + + /* Subtable type depends on the StartMethod */ + + switch (Tpm23Header->StartMethod) + { + case ACPI_TPM23_ACPI_START_METHOD: + + /* Subtable specific to to ARM_SMC */ + + Status = DtCompileTable (PFieldList, AcpiDmTableInfoTpm23a, + &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + break; + + default: + break; + } + + return (Status); +} + + +/****************************************************************************** + * * FUNCTION: DtCompileTpm2 * * PARAMETERS: PFieldList - Current field list pointer @@ -1897,8 +1953,18 @@ DtCompileTpm2 ( ACPI_TABLE_TPM2 *Tpm2Header; DT_SUBTABLE *ParentTable; ACPI_STATUS Status = AE_OK; + ACPI_TABLE_HEADER *Header; + ParentTable = DtPeekSubtable (); + + Header = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer); + + if (Header->Revision == 3) + { + return (DtCompileTpm2Rev3 (List)); + } + /* Compile the main table */ Status = DtCompileTable (PFieldList, AcpiDmTableInfoTpm2, |