diff options
Diffstat (limited to 'source/compiler/dttable1.c')
-rw-r--r-- | source/compiler/dttable1.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source/compiler/dttable1.c b/source/compiler/dttable1.c index 23b36be4b18e2..c43b9e6c07232 100644 --- a/source/compiler/dttable1.c +++ b/source/compiler/dttable1.c @@ -831,7 +831,7 @@ DtCompileDrtm ( DtInsertSubtable (ParentTable, Subtable); /* - * Using ACPI_SUB_PTR, We needn't define a seperate structure. Care + * Using ACPI_SUB_PTR, We needn't define a separate structure. Care * should be taken to avoid accessing ACPI_TABLE_HADER fields. */ #if 0 @@ -1002,7 +1002,14 @@ DtCompileGtdt ( ACPI_SUBTABLE_HEADER *GtdtHeader; ACPI_DMTABLE_INFO *InfoTable; UINT32 GtCount; + ACPI_TABLE_HEADER *Header; + + + ParentTable = DtPeekSubtable (); + Header = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer); + + /* Compile the main table */ Status = DtCompileTable (PFieldList, AcpiDmTableInfoGtdt, &Subtable); @@ -1011,6 +1018,21 @@ DtCompileGtdt ( return (Status); } + /* GTDT revision 3 later contains 2 extra fields before subtables */ + + if (Header->Revision > 2) + { + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + + Status = DtCompileTable (PFieldList, + AcpiDmTableInfoGtdtEl2, &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + } + ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); |