summaryrefslogtreecommitdiff
path: root/source/compiler/dtcompile.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/dtcompile.c')
-rw-r--r--source/compiler/dtcompile.c55
1 files changed, 53 insertions, 2 deletions
diff --git a/source/compiler/dtcompile.c b/source/compiler/dtcompile.c
index 58e749f5bc73..a3f5ea799a6e 100644
--- a/source/compiler/dtcompile.c
+++ b/source/compiler/dtcompile.c
@@ -345,7 +345,7 @@ DtCompileDataTable (
DtInsertCompilerIds (*FieldList);
Status = DtCompileTable (FieldList, AcpiDmTableInfoHeader,
- &Gbl_RootTable, TRUE);
+ &Gbl_RootTable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -382,7 +382,7 @@ DtCompileDataTable (
Subtable = NULL;
Status = DtCompileTable (FieldList, TableData->TableInfo,
- &Subtable, TRUE);
+ &Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -639,6 +639,57 @@ Error:
/******************************************************************************
*
+ * FUNCTION: DtCompileTwoSubtables
+ *
+ * PARAMETERS: List - Current field list pointer
+ * TableInfo1 - Info table 1
+ * TableInfo1 - Info table 2
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile tables with a header and one or more same subtables.
+ * Include CPEP, EINJ, ERST, MCFG, MSCT, WDAT
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileTwoSubtables (
+ void **List,
+ ACPI_DMTABLE_INFO *TableInfo1,
+ ACPI_DMTABLE_INFO *TableInfo2)
+{
+ ACPI_STATUS Status;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+
+
+ Status = DtCompileTable (PFieldList, TableInfo1, &Subtable, TRUE);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ while (*PFieldList)
+ {
+ Status = DtCompileTable (PFieldList, TableInfo2, &Subtable, FALSE);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ DtInsertSubtable (ParentTable, Subtable);
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtCompilePadding
*
* PARAMETERS: Length - Padding field size