diff options
Diffstat (limited to 'source/components/dispatcher/dswload2.c')
-rw-r--r-- | source/components/dispatcher/dswload2.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c index ff2135ce62c45..0ab715cd139b0 100644 --- a/source/components/dispatcher/dswload2.c +++ b/source/components/dispatcher/dswload2.c @@ -157,6 +157,9 @@ #include "acinterp.h" #include "acnamesp.h" #include "acevents.h" +#ifdef ACPI_EXEC_APP +#include "aecommon.h" +#endif #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME ("dswload2") @@ -531,6 +534,10 @@ AcpiDsLoad2EndOp ( ACPI_NAMESPACE_NODE *NewNode; UINT32 i; UINT8 RegionSpace; +#ifdef ACPI_EXEC_APP + ACPI_OPERAND_OBJECT *ObjDesc; + char *Namepath; +#endif ACPI_FUNCTION_TRACE (DsLoad2EndOp); @@ -627,6 +634,11 @@ AcpiDsLoad2EndOp ( * be evaluated later during the execution phase */ Status = AcpiDsCreateBufferField (Op, WalkState); + if ACPI_FAILURE (Status) + { + ACPI_EXCEPTION ((AE_INFO, Status, "CreateBufferField failure")); + goto Cleanup; + } break; case AML_TYPE_NAMED_FIELD: @@ -766,6 +778,31 @@ AcpiDsLoad2EndOp ( case AML_NAME_OP: Status = AcpiDsCreateNode (WalkState, Node, Op); + if (ACPI_FAILURE (Status)) + { + goto Cleanup; + } + +#ifdef ACPI_EXEC_APP + /* + * AcpiExec support for namespace initialization file (initialize + * Name opcodes in this code.) + */ + Namepath = AcpiNsGetExternalPathname (Node); + Status = AeLookupInitFileEntry (Namepath, &ObjDesc); + if (ACPI_SUCCESS (Status)) + { + /* Detach any existing object, attach new object */ + + if (Node->Object) + { + AcpiNsDetachObject (Node); + } + AcpiNsAttachObject (Node, ObjDesc, ObjDesc->Common.Type); + } + ACPI_FREE (Namepath); + Status = AE_OK; +#endif break; case AML_METHOD_OP: |