mirror of
https://github.com/acpica/acpica/
synced 2025-01-13 21:09:18 +03:00
iASL/TableCompiler: Fix form DMAR compilation problems.
Fixes problems with the optional DMAR subtables. ACPICA BZ 999. Lv Zheng.
This commit is contained in:
parent
b6819e3036
commit
b569b601b7
@ -819,6 +819,11 @@ AcpiDmDumpTable (
|
||||
ByteLength = 8;
|
||||
break;
|
||||
|
||||
case ACPI_DMT_BUF10:
|
||||
|
||||
ByteLength = 10;
|
||||
break;
|
||||
|
||||
case ACPI_DMT_BUF16:
|
||||
case ACPI_DMT_UUID:
|
||||
|
||||
@ -937,6 +942,7 @@ AcpiDmDumpTable (
|
||||
break;
|
||||
|
||||
case ACPI_DMT_BUF7:
|
||||
case ACPI_DMT_BUF10:
|
||||
case ACPI_DMT_BUF16:
|
||||
case ACPI_DMT_BUF128:
|
||||
/*
|
||||
|
@ -944,6 +944,7 @@ AcpiDmDumpDmar (
|
||||
{
|
||||
return;
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
|
||||
switch (SubTable->Type)
|
||||
{
|
||||
@ -996,6 +997,7 @@ AcpiDmDumpDmar (
|
||||
{
|
||||
return;
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
|
||||
/* Dump the PCI Path entries for this device scope */
|
||||
|
||||
@ -1013,6 +1015,7 @@ AcpiDmDumpDmar (
|
||||
|
||||
PathOffset += 2;
|
||||
PciPath += 2;
|
||||
AcpiOsPrintf ("\n");
|
||||
}
|
||||
|
||||
/* Point to next device scope entry */
|
||||
|
@ -852,6 +852,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDmar[] =
|
||||
{
|
||||
{ACPI_DMT_UINT8, ACPI_DMAR_OFFSET (Width), "Host Address Width", 0},
|
||||
{ACPI_DMT_UINT8, ACPI_DMAR_OFFSET (Flags), "Flags", 0},
|
||||
{ACPI_DMT_BUF10, ACPI_DMAR_OFFSET (Reserved[0]), "Reserved", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
|
@ -613,8 +613,9 @@ DtCompileDmar (
|
||||
DT_FIELD *SubtableStart;
|
||||
ACPI_DMTABLE_INFO *InfoTable;
|
||||
ACPI_DMAR_HEADER *DmarHeader;
|
||||
UINT8 *ReservedBuffer;
|
||||
UINT32 ReservedSize;
|
||||
ACPI_DMAR_DEVICE_SCOPE *DmarDeviceScope;
|
||||
UINT32 DeviceScopeLength;
|
||||
UINT32 PciPathLength;
|
||||
|
||||
|
||||
Status = DtCompileTable (PFieldList, AcpiDmTableInfoDmar, &Subtable, TRUE);
|
||||
@ -625,17 +626,7 @@ DtCompileDmar (
|
||||
|
||||
ParentTable = DtPeekSubtable ();
|
||||
DtInsertSubtable (ParentTable, Subtable);
|
||||
|
||||
/* DMAR Reserved area */
|
||||
|
||||
ReservedSize = (UINT32) sizeof (((ACPI_TABLE_DMAR *) NULL)->Reserved);
|
||||
ReservedBuffer = UtLocalCalloc (ReservedSize);
|
||||
|
||||
DtCreateSubtable (ReservedBuffer, ReservedSize, &Subtable);
|
||||
|
||||
ACPI_FREE (ReservedBuffer);
|
||||
ParentTable = DtPeekSubtable ();
|
||||
DtInsertSubtable (ParentTable, Subtable);
|
||||
DtPushSubtable (Subtable);
|
||||
|
||||
while (*PFieldList)
|
||||
{
|
||||
@ -693,10 +684,13 @@ DtCompileDmar (
|
||||
|
||||
ParentTable = DtPeekSubtable ();
|
||||
DtInsertSubtable (ParentTable, Subtable);
|
||||
DtPushSubtable (Subtable);
|
||||
|
||||
/* Optional Device Scope subtables */
|
||||
|
||||
while (*PFieldList)
|
||||
DeviceScopeLength = DmarHeader->Length - Subtable->Length -
|
||||
ParentTable->Length;
|
||||
while (DeviceScopeLength)
|
||||
{
|
||||
Status = DtCompileTable (PFieldList, AcpiDmTableInfoDmarScope,
|
||||
&Subtable, FALSE);
|
||||
@ -709,9 +703,12 @@ DtCompileDmar (
|
||||
DtInsertSubtable (ParentTable, Subtable);
|
||||
DtPushSubtable (Subtable);
|
||||
|
||||
DmarDeviceScope = ACPI_CAST_PTR (ACPI_DMAR_DEVICE_SCOPE, Subtable->Buffer);
|
||||
|
||||
/* Optional PCI Paths */
|
||||
|
||||
while (*PFieldList)
|
||||
PciPathLength = DmarDeviceScope->Length - Subtable->Length;
|
||||
while (PciPathLength)
|
||||
{
|
||||
Status = DtCompileTable (PFieldList, TableInfoDmarPciPath,
|
||||
&Subtable, FALSE);
|
||||
@ -723,10 +720,15 @@ DtCompileDmar (
|
||||
|
||||
ParentTable = DtPeekSubtable ();
|
||||
DtInsertSubtable (ParentTable, Subtable);
|
||||
PciPathLength -= Subtable->Length;
|
||||
}
|
||||
|
||||
DtPopSubtable ();
|
||||
DeviceScopeLength -= DmarDeviceScope->Length;
|
||||
}
|
||||
|
||||
DtPopSubtable ();
|
||||
DtPopSubtable ();
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
|
@ -469,6 +469,7 @@ DtGetFieldType (
|
||||
|
||||
case ACPI_DMT_BUFFER:
|
||||
case ACPI_DMT_BUF7:
|
||||
case ACPI_DMT_BUF10:
|
||||
case ACPI_DMT_BUF16:
|
||||
case ACPI_DMT_BUF128:
|
||||
case ACPI_DMT_PCI_PATH:
|
||||
@ -702,6 +703,11 @@ DtGetFieldLength (
|
||||
}
|
||||
break;
|
||||
|
||||
case ACPI_DMT_BUF10:
|
||||
|
||||
ByteLength = 10;
|
||||
break;
|
||||
|
||||
case ACPI_DMT_BUF16:
|
||||
case ACPI_DMT_UUID:
|
||||
|
||||
|
@ -180,6 +180,7 @@ typedef enum
|
||||
ACPI_DMT_UINT56,
|
||||
ACPI_DMT_UINT64,
|
||||
ACPI_DMT_BUF7,
|
||||
ACPI_DMT_BUF10,
|
||||
ACPI_DMT_BUF16,
|
||||
ACPI_DMT_BUF128,
|
||||
ACPI_DMT_SIG,
|
||||
|
Loading…
Reference in New Issue
Block a user