diff options
Diffstat (limited to 'compiler/dttable.c')
-rw-r--r-- | compiler/dttable.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/compiler/dttable.c b/compiler/dttable.c index f818d3e..0ad4dd4 100644 --- a/compiler/dttable.c +++ b/compiler/dttable.c @@ -1134,6 +1134,75 @@ DtCompileRsdt ( /****************************************************************************** * + * FUNCTION: DtCompileSlic + * + * PARAMETERS: List - Current field list pointer + * + * RETURN: Status + * + * DESCRIPTION: Compile SLIC. + * + *****************************************************************************/ + +ACPI_STATUS +DtCompileSlic ( + void **List) +{ + ACPI_STATUS Status; + DT_SUBTABLE *Subtable; + DT_SUBTABLE *ParentTable; + DT_FIELD **PFieldList = (DT_FIELD **) List; + DT_FIELD *SubtableStart; + ACPI_SLIC_HEADER *SlicHeader; + ACPI_DMTABLE_INFO *InfoTable; + + + while (*PFieldList) + { + SubtableStart = *PFieldList; + Status = DtCompileTable (PFieldList, AcpiDmTableInfoSlicHdr, + &Subtable, TRUE); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + DtPushSubtable (Subtable); + + SlicHeader = ACPI_CAST_PTR (ACPI_SLIC_HEADER, Subtable->Buffer); + + switch (SlicHeader->Type) + { + case ACPI_SLIC_TYPE_PUBLIC_KEY: + InfoTable = AcpiDmTableInfoSlic0; + break; + case ACPI_SLIC_TYPE_WINDOWS_MARKER: + InfoTable = AcpiDmTableInfoSlic1; + break; + default: + DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SLIC"); + return (AE_ERROR); + } + + Status = DtCompileTable (PFieldList, InfoTable, &Subtable, TRUE); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + DtPopSubtable (); + } + + return (AE_OK); +} + + +/****************************************************************************** + * * FUNCTION: DtCompileSlit * * PARAMETERS: List - Current field list pointer |