1/******************************************************************************
2 *
3 * Module Name: adwalk - Application-level disassembler parse tree walk routines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.
--- 507 unchanged lines hidden (view full) ---
516
517 /* Must examine parent to see if this namepath is an argument */
518
519 ParentOp = Op->Common.Parent;
520 OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Common.AmlOpcode);
521
522 if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
523 (OpInfo->Class != AML_CLASS_CREATE) &&
524 (OpInfo->ObjectType != ACPI_TYPE_LOCAL_ALIAS) &&
525 (ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
526 !Op->Common.Node)
527 {
528 ArgCount = AcpiDmInspectPossibleArgs (0, 0, Op->Common.Next);
529
530 /*
531 * Check if namepath is a predicate for if/while or lone parameter to
532 * a return.
--- 206 unchanged lines hidden (view full) ---
739 {
740 goto Exit;
741 }
742
743 /* Get the NamePath from the appropriate place */
744
745 if (OpInfo->Flags & AML_NAMED)
746 {
747 /*
748 * Only these two operators (Alias, Scope) refer to an existing
749 * name, it is the first argument
750 */
751 if (Op->Common.AmlOpcode == AML_ALIAS_OP)
752 {
753 ObjectType = ACPI_TYPE_ANY;
754
755 NextOp = Op->Common.Value.Arg;
756 NextOp = NextOp->Common.Value.Arg;
757 if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
758 {
759 Path = NextOp->Common.Value.String;
760 }
761 }
762 else if (Op->Common.AmlOpcode == AML_SCOPE_OP)
763 {
764 Path = (char *) Op->Named.Path;
765 }
766 }
767 else if (OpInfo->Flags & AML_CREATE)
768 {
769 /* Referenced Buffer Name is the first child */
770
771 ObjectType = ACPI_TYPE_BUFFER; /* Change from TYPE_BUFFER_FIELD */
772
773 NextOp = Op->Common.Value.Arg;
774 if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
775 {
776 Path = NextOp->Common.Value.String;
777 }
778 }
779 else
780 {
--- 10 unchanged lines hidden (view full) ---
791 * is an invalid reference.
792 *
793 * The namespace is also used as a lookup table for references to resource
794 * descriptors and the fields within them.
795 */
796 Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
797 ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
798 WalkState, &Node);
799 if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
800 {
801 Status = AE_NOT_FOUND;
802 }
803
804 if (ACPI_FAILURE (Status))
805 {
806 if (Status == AE_NOT_FOUND)
807 {
808 AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType, 0);
809
810 /*
811 * We could install this into the namespace, but we catch duplicate
--- 211 unchanged lines hidden ---
2 *
3 * Module Name: adwalk - Application-level disassembler parse tree walk routines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.
--- 507 unchanged lines hidden (view full) ---
516
517 /* Must examine parent to see if this namepath is an argument */
518
519 ParentOp = Op->Common.Parent;
520 OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Common.AmlOpcode);
521
522 if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
523 (OpInfo->Class != AML_CLASS_CREATE) &&
524 (OpInfo->ObjectType != ACPI_TYPE_LOCAL_ALIAS) &&
525 (ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
526 !Op->Common.Node)
527 {
528 ArgCount = AcpiDmInspectPossibleArgs (0, 0, Op->Common.Next);
529
530 /*
531 * Check if namepath is a predicate for if/while or lone parameter to
532 * a return.
--- 206 unchanged lines hidden (view full) ---
739 {
740 goto Exit;
741 }
742
743 /* Get the NamePath from the appropriate place */
744
745 if (OpInfo->Flags & AML_NAMED)
746 {
747 /*
748 * Only these two operators (Alias, Scope) refer to an existing
749 * name, it is the first argument
750 */
751 if (Op->Common.AmlOpcode == AML_ALIAS_OP)
752 {
753 ObjectType = ACPI_TYPE_ANY;
754
755 NextOp = Op->Common.Value.Arg;
756 NextOp = NextOp->Common.Value.Arg;
757 if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
758 {
759 Path = NextOp->Common.Value.String;
760 }
761 }
762 else if (Op->Common.AmlOpcode == AML_SCOPE_OP)
763 {
764 Path = (char *) Op->Named.Path;
765 }
766 }
767 else if (OpInfo->Flags & AML_CREATE)
768 {
769 /* Referenced Buffer Name is the first child */
770
771 ObjectType = ACPI_TYPE_BUFFER; /* Change from TYPE_BUFFER_FIELD */
772
773 NextOp = Op->Common.Value.Arg;
774 if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
775 {
776 Path = NextOp->Common.Value.String;
777 }
778 }
779 else
780 {
--- 10 unchanged lines hidden (view full) ---
791 * is an invalid reference.
792 *
793 * The namespace is also used as a lookup table for references to resource
794 * descriptors and the fields within them.
795 */
796 Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
797 ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
798 WalkState, &Node);
799 if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
800 {
801 Status = AE_NOT_FOUND;
802 }
803
804 if (ACPI_FAILURE (Status))
805 {
806 if (Status == AE_NOT_FOUND)
807 {
808 AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType, 0);
809
810 /*
811 * We could install this into the namespace, but we catch duplicate
--- 211 unchanged lines hidden ---