summaryrefslogtreecommitdiff
path: root/compiler/dtcompile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/dtcompile.c')
-rw-r--r--compiler/dtcompile.c55
1 files changed, 16 insertions, 39 deletions
diff --git a/compiler/dtcompile.c b/compiler/dtcompile.c
index c1a7b08d5a34..7f4a824b18cf 100644
--- a/compiler/dtcompile.c
+++ b/compiler/dtcompile.c
@@ -277,7 +277,7 @@ DtCompileDataTable (
/* Verify that we at least have a table signature and save it */
- Signature = DtGetFieldValue (*FieldList, "Signature");
+ Signature = DtGetFieldValue (*FieldList);
if (!Signature)
{
sprintf (MsgBuffer, "Expected \"%s\"", "Signature");
@@ -310,20 +310,6 @@ DtCompileDataTable (
Status = DtCompileRsdp (FieldList);
return (Status);
}
- else if (!ACPI_STRNCMP (Signature, "OEM", 3))
- {
- DtFatal (ASL_MSG_OEM_TABLE, *FieldList, Signature);
- return (AE_ERROR);
- }
-
- /* Validate the signature via the ACPI table list */
-
- TableData = AcpiDmGetTableData (Signature);
- if (!TableData)
- {
- DtFatal (ASL_MSG_UNKNOWN_TABLE, *FieldList, Signature);
- return (AE_ERROR);
- }
/*
* All other tables must use the common ACPI table header. Insert the
@@ -340,6 +326,15 @@ DtCompileDataTable (
DtPushSubtable (Gbl_RootTable);
+ /* Validate the signature via the ACPI table list */
+
+ TableData = AcpiDmGetTableData (Signature);
+ if (!TableData)
+ {
+ DtCompileGeneric ((void **) FieldList);
+ goto Out;
+ }
+
/* Dispatch to per-table compile */
if (TableData->CmTableHandler)
@@ -374,6 +369,7 @@ DtCompileDataTable (
return (AE_ERROR);
}
+Out:
/* Set the final table length and then the checksum */
DtSetTableLength ();
@@ -424,6 +420,11 @@ DtCompileTable (
}
Length = DtGetSubtableLength (*Field, Info);
+ if (Length == ASL_EOF)
+ {
+ return (AE_ERROR);
+ }
+
Subtable = UtLocalCalloc (sizeof (DT_SUBTABLE));
if (Length > 0)
@@ -450,29 +451,6 @@ DtCompileTable (
goto Error;
}
- /* Does input field name match what is expected? */
-
- if (ACPI_STRCMP (LocalField->Name, Info->Name))
- {
- /*
- * If Required = TRUE, the subtable must exist.
- * If Required = FALSE, the subtable is optional
- * (For example, AcpiDmTableInfoDmarScope in DMAR table is
- * optional)
- */
- if (Required)
- {
- sprintf (MsgBuffer, "Expected \"%s\"", Info->Name);
- DtNameError (ASL_ERROR, ASL_MSG_INVALID_FIELD_NAME,
- LocalField, MsgBuffer);
- }
- else
- {
- Status = AE_NOT_FOUND;
- goto Error;
- }
- }
-
/* Maintain table offsets */
LocalField->TableOffset = Gbl_CurrentTableOffset;
@@ -518,7 +496,6 @@ DtCompileTable (
* Recursion (one level max): compile GAS (Generic Address)
* or Notify in-line subtable
*/
- LocalField = LocalField->Next;
*Field = LocalField;
if (Info->Opcode == ACPI_DMT_GAS)