summaryrefslogtreecommitdiff
path: root/source/components/namespace/nsrepair2.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/namespace/nsrepair2.c')
-rw-r--r--source/components/namespace/nsrepair2.c38
1 files changed, 23 insertions, 15 deletions
diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c
index f2f72d6fb5c95..cb6ce06c690ed 100644
--- a/source/components/namespace/nsrepair2.c
+++ b/source/components/namespace/nsrepair2.c
@@ -478,8 +478,8 @@ AcpiNsRepair_CID (
* DESCRIPTION: Repair for the _CST object:
* 1. Sort the list ascending by C state type
* 2. Ensure type cannot be zero
- * 3. A sub-package count of zero means _CST is meaningless
- * 4. Count must match the number of C state sub-packages
+ * 3. A subpackage count of zero means _CST is meaningless
+ * 4. Count must match the number of C state subpackages
*
*****************************************************************************/
@@ -672,6 +672,7 @@ AcpiNsRepair_PRT (
ACPI_OPERAND_OBJECT **TopObjectList;
ACPI_OPERAND_OBJECT **SubObjectList;
ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_OPERAND_OBJECT *SubPackage;
UINT32 ElementCount;
UINT32 Index;
@@ -681,9 +682,19 @@ AcpiNsRepair_PRT (
TopObjectList = PackageObject->Package.Elements;
ElementCount = PackageObject->Package.Count;
- for (Index = 0; Index < ElementCount; Index++)
+ /* Examine each subpackage */
+
+ for (Index = 0; Index < ElementCount; Index++, TopObjectList++)
{
- SubObjectList = (*TopObjectList)->Package.Elements;
+ SubPackage = *TopObjectList;
+ SubObjectList = SubPackage->Package.Elements;
+
+ /* Check for minimum required element count */
+
+ if (SubPackage->Package.Count < 4)
+ {
+ continue;
+ }
/*
* If the BIOS has erroneously reversed the _PRT SourceName (index 2)
@@ -698,14 +709,11 @@ AcpiNsRepair_PRT (
SubObjectList[2] = ObjDesc;
Info->ReturnFlags |= ACPI_OBJECT_REPAIRED;
- ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
+ ACPI_WARN_PREDEFINED ((AE_INFO,
+ Info->FullPathname, Info->NodeFlags,
"PRT[%X]: Fixed reversed SourceName and SourceIndex",
Index));
}
-
- /* Point to the next ACPI_OPERAND_OBJECT in the top level package */
-
- TopObjectList++;
}
return (AE_OK);
@@ -745,7 +753,7 @@ AcpiNsRepair_PSS (
/*
- * Entries (sub-packages) in the _PSS Package must be sorted by power
+ * Entries (subpackages) in the _PSS Package must be sorted by power
* dissipation, in descending order. If it appears that the list is
* incorrectly sorted, sort it. We sort by CpuFrequency, since this
* should be proportional to the power.
@@ -838,9 +846,9 @@ AcpiNsRepair_TSS (
*
* PARAMETERS: Info - Method execution information block
* ReturnObject - Pointer to the top-level returned object
- * StartIndex - Index of the first sub-package
- * ExpectedCount - Minimum length of each sub-package
- * SortIndex - Sub-package entry to sort on
+ * StartIndex - Index of the first subpackage
+ * ExpectedCount - Minimum length of each subpackage
+ * SortIndex - Subpackage entry to sort on
* SortDirection - Ascending or descending
* SortKeyName - Name of the SortIndex field
*
@@ -881,7 +889,7 @@ AcpiNsCheckSortedList (
}
/*
- * NOTE: assumes list of sub-packages contains no NULL elements.
+ * NOTE: assumes list of subpackages contains no NULL elements.
* Any NULL elements should have been removed by earlier call
* to AcpiNsRemoveNullElements.
*/
@@ -911,7 +919,7 @@ AcpiNsCheckSortedList (
return (AE_AML_OPERAND_TYPE);
}
- /* Each sub-package must have the minimum length */
+ /* Each subpackage must have the minimum length */
if ((*OuterElements)->Package.Count < ExpectedCount)
{