summaryrefslogtreecommitdiff
path: root/source/components
diff options
context:
space:
mode:
Diffstat (limited to 'source/components')
-rw-r--r--source/components/executer/exconfig.c10
-rw-r--r--source/components/namespace/nsinit.c82
-rw-r--r--source/components/utilities/utbuffer.c4
3 files changed, 74 insertions, 22 deletions
diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c
index 2ae60f554e08..590d83661a2d 100644
--- a/source/components/executer/exconfig.c
+++ b/source/components/executer/exconfig.c
@@ -342,6 +342,11 @@ AcpiExLoadTableOp (
return_ACPI_STATUS (Status);
}
+ /* Complete the initialization/resolution of package objects */
+
+ Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL);
+
/* Parameter Data (optional) */
if (ParameterNode)
@@ -615,6 +620,11 @@ AcpiExLoadOp (
return_ACPI_STATUS (Status);
}
+ /* Complete the initialization/resolution of package objects */
+
+ Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL);
+
/* Store the DdbHandle into the Target operand */
Status = AcpiExStore (DdbHandle, Target, WalkState);
diff --git a/source/components/namespace/nsinit.c b/source/components/namespace/nsinit.c
index dc76db9f6a70..dcfb41ed7d5d 100644
--- a/source/components/namespace/nsinit.c
+++ b/source/components/namespace/nsinit.c
@@ -408,6 +408,65 @@ ErrorExit:
/*******************************************************************************
*
+ * FUNCTION: AcpiNsInitOnePackage
+ *
+ * PARAMETERS: ObjHandle - Node
+ * Level - Current nesting level
+ * Context - Not used
+ * ReturnValue - Not used
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Callback from AcpiWalkNamespace. Invoked for every package
+ * within the namespace. Used during dynamic load of an SSDT.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiNsInitOnePackage (
+ ACPI_HANDLE ObjHandle,
+ UINT32 Level,
+ void *Context,
+ void **ReturnValue)
+{
+ ACPI_STATUS Status;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
+
+
+ ObjDesc = AcpiNsGetAttachedObject (Node);
+ if (!ObjDesc)
+ {
+ return (AE_OK);
+ }
+
+ /* Exit if package is already initialized */
+
+ if (ObjDesc->Package.Flags & AOPOBJ_DATA_VALID)
+ {
+ return (AE_OK);
+ }
+
+ Status = AcpiDsGetPackageArguments (ObjDesc);
+ if (ACPI_FAILURE (Status))
+ {
+ return (AE_OK);
+ }
+
+ Status = AcpiUtWalkPackageTree (ObjDesc, NULL, AcpiDsInitPackageElement,
+ NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ return (AE_OK);
+ }
+
+ ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiNsInitOneObject
*
* PARAMETERS: ObjHandle - Node
@@ -533,27 +592,10 @@ AcpiNsInitOneObject (
case ACPI_TYPE_PACKAGE:
- Info->PackageInit++;
- Status = AcpiDsGetPackageArguments (ObjDesc);
- if (ACPI_FAILURE (Status))
- {
- break;
- }
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE,
- "%s: Completing resolution of Package elements\n",
- ACPI_GET_FUNCTION_NAME));
+ /* Complete the initialization/resolution of the package object */
- /*
- * Resolve all named references in package objects (and all
- * sub-packages). This action has been deferred until the entire
- * namespace has been loaded, in order to support external and
- * forward references from individual package elements (05/2017).
- */
- Status = AcpiUtWalkPackageTree (ObjDesc, NULL,
- AcpiDsInitPackageElement, NULL);
-
- ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
+ Info->PackageInit++;
+ Status = AcpiNsInitOnePackage (ObjHandle, Level, NULL, NULL);
break;
default:
diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c
index 741742c4668f..83a5b3c5fa12 100644
--- a/source/components/utilities/utbuffer.c
+++ b/source/components/utilities/utbuffer.c
@@ -205,7 +205,7 @@ AcpiUtDumpBuffer (
{
/* Print current offset */
- AcpiOsPrintf ("%6.4X: ", (BaseOffset + i));
+ AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
/* Print 16 hex chars */
@@ -387,7 +387,7 @@ AcpiUtDumpBufferToFile (
{
/* Print current offset */
- fprintf (File, "%6.4X: ", (BaseOffset + i));
+ fprintf (File, "%8.4X: ", (BaseOffset + i));
/* Print 16 hex chars */