diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2019-02-20 23:04:28 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2019-02-20 23:04:28 +0000 |
| commit | 933b0124ad04366156cb4793d2530ad791d88ead (patch) | |
| tree | 6d20df0ad987596d76c7b0f8e58ef8e8e25b4b69 /source/compiler/dttable1.c | |
| parent | ca9862327327526f102b9370cc74b2a9e4641b0d (diff) | |
Notes
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 23b36be4b18e..c43b9e6c0723 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); |
