static void OpnAttachNameToNode ( ACPI_PARSE_OBJECT *Op) { ACPI_PARSE_OBJECT *Child = NULL; switch (Op->Asl.AmlOpcode) { case AML_DATA_REGION_OP: case AML_DEVICE_OP: case AML_EVENT_OP: case AML_EXTERNAL_OP: case AML_METHOD_OP: case AML_MUTEX_OP: case AML_REGION_OP: case AML_POWER_RESOURCE_OP: case AML_PROCESSOR_OP: case AML_THERMAL_ZONE_OP: case AML_NAME_OP: case AML_SCOPE_OP: Child = UtGetArg (Op, 0); break; case AML_ALIAS_OP: Child = UtGetArg (Op, 1); break; case AML_CREATE_BIT_FIELD_OP: case AML_CREATE_BYTE_FIELD_OP: case AML_CREATE_WORD_FIELD_OP: case AML_CREATE_DWORD_FIELD_OP: case AML_CREATE_QWORD_FIELD_OP: Child = UtGetArg (Op, 2); break; case AML_CREATE_FIELD_OP: Child = UtGetArg (Op, 3); break; case AML_BANK_FIELD_OP: case AML_INDEX_FIELD_OP: case AML_FIELD_OP: return; default: return; } if (Child) { UtAttachNamepathToOwner (Op, Child); } }
static ACPI_STATUS LdLoadFieldElements ( ACPI_PARSE_OBJECT *Op, ACPI_WALK_STATE *WalkState) { ACPI_PARSE_OBJECT *Child = NULL; ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; /* Get the first named field element */ switch (Op->Asl.AmlOpcode) { case AML_BANK_FIELD_OP: Child = UtGetArg (Op, 6); break; case AML_INDEX_FIELD_OP: Child = UtGetArg (Op, 5); break; case AML_FIELD_OP: Child = UtGetArg (Op, 4); break; default: /* No other opcodes should arrive here */ return (AE_BAD_PARAMETER); } /* Enter all elements into the namespace */ while (Child) { switch (Child->Asl.AmlOpcode) { case AML_INT_RESERVEDFIELD_OP: case AML_INT_ACCESSFIELD_OP: case AML_INT_CONNECTION_OP: break; default: Status = AcpiNsLookup (WalkState->ScopeInfo, Child->Asl.Value.String, ACPI_TYPE_LOCAL_REGION_FIELD, ACPI_IMODE_LOAD_PASS1, ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, NULL, &Node); if (ACPI_FAILURE (Status)) { if (Status != AE_ALREADY_EXISTS) { AslError (ASL_ERROR, ASL_MSG_CORE_EXCEPTION, Child, Child->Asl.Value.String); return (Status); } /* * The name already exists in this scope * But continue processing the elements */ AslError (ASL_ERROR, ASL_MSG_NAME_EXISTS, Child, Child->Asl.Value.String); } else { Child->Asl.Node = Node; Node->Op = Child; } break; } Child = Child->Asl.Next; } return (AE_OK); }