diff options
author | jkim <jkim@FreeBSD.org> | 2013-06-27 00:16:54 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-06-27 00:16:54 +0000 |
commit | faabc5353932108c96a32e7422578294fe30ab63 (patch) | |
tree | e9a0e51088d3c1e15addea9cd33b6f472b9a6b53 /sys/contrib/dev/acpica/compiler/dttable.c | |
parent | c15f698fb461ff5e7a9135b74eede196265fc6ca (diff) | |
download | FreeBSD-src-faabc5353932108c96a32e7422578294fe30ab63.zip FreeBSD-src-faabc5353932108c96a32e7422578294fe30ab63.tar.gz |
Merge ACPICA 20130626.
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/dttable.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/dttable.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/sys/contrib/dev/acpica/compiler/dttable.c b/sys/contrib/dev/acpica/compiler/dttable.c index fe15822..bb6c7cb 100644 --- a/sys/contrib/dev/acpica/compiler/dttable.c +++ b/sys/contrib/dev/acpica/compiler/dttable.c @@ -541,8 +541,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); @@ -553,17 +554,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) { @@ -621,10 +612,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); @@ -637,9 +631,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); @@ -651,10 +648,15 @@ DtCompileDmar ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); + PciPathLength -= Subtable->Length; } + + DtPopSubtable (); + DeviceScopeLength -= DmarDeviceScope->Length; } DtPopSubtable (); + DtPopSubtable (); } return (AE_OK); |