1 /******************************************************************************
3 * Module Name: adwalk - Application-level disassembler parse tree walk routines
6 *****************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
13 * All rights reserved.
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code. No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
38 * The above copyright and patent license is granted only if the following
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision. In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change. Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee. Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution. In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
73 * 3.4. Intel retains all right, title, and interest in and to the Original
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
81 * 4. Disclaimer and Export Compliance
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government. In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
115 *****************************************************************************/
118 #include <contrib/dev/acpica/acpi.h>
119 #include <contrib/dev/acpica/acparser.h>
120 #include <contrib/dev/acpica/amlcode.h>
121 #include <contrib/dev/acpica/acdebug.h>
122 #include <contrib/dev/acpica/acdisasm.h>
123 #include <contrib/dev/acpica/acdispat.h>
124 #include <contrib/dev/acpica/acnamesp.h>
125 #include <contrib/dev/acpica/acapps.h>
128 #define _COMPONENT ACPI_TOOLS
129 ACPI_MODULE_NAME ("adwalk")
132 * aslmap - opcode mappings and reserved method names
135 AslMapNamedOpcodeToDataType (
138 /* Local prototypes */
141 AcpiDmFindOrphanDescending (
142 ACPI_PARSE_OBJECT *Op,
147 AcpiDmDumpDescending (
148 ACPI_PARSE_OBJECT *Op,
153 AcpiDmXrefDescendingOp (
154 ACPI_PARSE_OBJECT *Op,
159 AcpiDmCommonAscendingOp (
160 ACPI_PARSE_OBJECT *Op,
165 AcpiDmLoadDescendingOp (
166 ACPI_PARSE_OBJECT *Op,
171 AcpiDmInspectPossibleArgs (
172 UINT32 CurrentOpArgCount,
174 ACPI_PARSE_OBJECT *Op);
177 AcpiDmResourceDescendingOp (
178 ACPI_PARSE_OBJECT *Op,
183 /*******************************************************************************
185 * FUNCTION: AcpiDmDumpTree
187 * PARAMETERS: Origin - Starting object
191 * DESCRIPTION: Parse tree walk to format and output the nodes
193 ******************************************************************************/
197 ACPI_PARSE_OBJECT *Origin)
199 ACPI_OP_WALK_INFO Info;
207 AcpiOsPrintf ("/*\nAML Parse Tree\n\n");
211 Info.WalkState = NULL;
212 AcpiDmWalkParseTree (Origin, AcpiDmDumpDescending, NULL, &Info);
213 AcpiOsPrintf ("*/\n\n");
217 /*******************************************************************************
219 * FUNCTION: AcpiDmFindOrphanMethods
221 * PARAMETERS: Origin - Starting object
225 * DESCRIPTION: Parse tree walk to find "orphaned" method invocations -- methods
226 * that are not resolved in the namespace
228 ******************************************************************************/
231 AcpiDmFindOrphanMethods (
232 ACPI_PARSE_OBJECT *Origin)
234 ACPI_OP_WALK_INFO Info;
244 Info.WalkState = NULL;
245 AcpiDmWalkParseTree (Origin, AcpiDmFindOrphanDescending, NULL, &Info);
249 /*******************************************************************************
251 * FUNCTION: AcpiDmFinishNamespaceLoad
253 * PARAMETERS: ParseTreeRoot - Root of the parse tree
254 * NamespaceRoot - Root of the internal namespace
258 * DESCRIPTION: Load all namespace items that are created within control
259 * methods. Used before namespace cross reference
261 ******************************************************************************/
264 AcpiDmFinishNamespaceLoad (
265 ACPI_PARSE_OBJECT *ParseTreeRoot,
266 ACPI_NAMESPACE_NODE *NamespaceRoot)
269 ACPI_OP_WALK_INFO Info;
270 ACPI_WALK_STATE *WalkState;
278 /* Create and initialize a new walk state */
280 WalkState = AcpiDsCreateWalkState (0, ParseTreeRoot, NULL, NULL);
286 Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
287 if (ACPI_FAILURE (Status))
294 Info.WalkState = WalkState;
295 AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmLoadDescendingOp,
296 AcpiDmCommonAscendingOp, &Info);
297 ACPI_FREE (WalkState);
301 /*******************************************************************************
303 * FUNCTION: AcpiDmCrossReferenceNamespace
305 * PARAMETERS: ParseTreeRoot - Root of the parse tree
306 * NamespaceRoot - Root of the internal namespace
310 * DESCRIPTION: Cross reference the namespace to create externals
312 ******************************************************************************/
315 AcpiDmCrossReferenceNamespace (
316 ACPI_PARSE_OBJECT *ParseTreeRoot,
317 ACPI_NAMESPACE_NODE *NamespaceRoot)
320 ACPI_OP_WALK_INFO Info;
321 ACPI_WALK_STATE *WalkState;
329 /* Create and initialize a new walk state */
331 WalkState = AcpiDsCreateWalkState (0, ParseTreeRoot, NULL, NULL);
337 Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
338 if (ACPI_FAILURE (Status))
345 Info.WalkState = WalkState;
346 AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmXrefDescendingOp,
347 AcpiDmCommonAscendingOp, &Info);
348 ACPI_FREE (WalkState);
352 /*******************************************************************************
354 * FUNCTION: AcpiDmConvertResourceIndexes
356 * PARAMETERS: ParseTreeRoot - Root of the parse tree
357 * NamespaceRoot - Root of the internal namespace
361 * DESCRIPTION: Convert fixed-offset references to resource descriptors to
362 * symbolic references. Should only be called after namespace has
363 * been cross referenced.
365 ******************************************************************************/
368 AcpiDmConvertResourceIndexes (
369 ACPI_PARSE_OBJECT *ParseTreeRoot,
370 ACPI_NAMESPACE_NODE *NamespaceRoot)
373 ACPI_OP_WALK_INFO Info;
374 ACPI_WALK_STATE *WalkState;
382 /* Create and initialize a new walk state */
384 WalkState = AcpiDsCreateWalkState (0, ParseTreeRoot, NULL, NULL);
390 Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
391 if (ACPI_FAILURE (Status))
398 Info.WalkState = WalkState;
399 AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmResourceDescendingOp,
400 AcpiDmCommonAscendingOp, &Info);
401 ACPI_FREE (WalkState);
406 /*******************************************************************************
408 * FUNCTION: AcpiDmDumpDescending
410 * PARAMETERS: ASL_WALK_CALLBACK
414 * DESCRIPTION: Format and print contents of one parse Op.
416 ******************************************************************************/
419 AcpiDmDumpDescending (
420 ACPI_PARSE_OBJECT *Op,
424 ACPI_OP_WALK_INFO *Info = Context;
425 const ACPI_OPCODE_INFO *OpInfo;
434 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
437 /* Most of the information (count, level, name) here */
439 AcpiOsPrintf ("% 5d [%2.2d] ", Info->Count, Level);
440 AcpiDmIndent (Level);
441 AcpiOsPrintf ("%-28s", AcpiPsGetOpcodeName (Op->Common.AmlOpcode));
443 /* Extra info is helpful */
445 switch (Op->Common.AmlOpcode)
450 AcpiOsPrintf ("%X", (UINT32) Op->Common.Value.Integer);
453 case AML_INT_NAMEPATH_OP:
454 if (Op->Common.Value.String)
456 AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String,
458 AcpiOsPrintf ("%s %p", Path, Op->Common.Node);
463 AcpiOsPrintf ("[NULL]");
470 case AML_INT_NAMEDFIELD_OP:
471 AcpiOsPrintf ("%4.4s", &Op->Named.Name);
480 /*******************************************************************************
482 * FUNCTION: AcpiDmFindOrphanDescending
484 * PARAMETERS: ASL_WALK_CALLBACK
488 * DESCRIPTION: Check namepath Ops for orphaned method invocations
490 * Note: Experimental.
492 ******************************************************************************/
495 AcpiDmFindOrphanDescending (
496 ACPI_PARSE_OBJECT *Op,
500 const ACPI_OPCODE_INFO *OpInfo;
501 ACPI_PARSE_OBJECT *ChildOp;
502 ACPI_PARSE_OBJECT *NextOp;
503 ACPI_PARSE_OBJECT *ParentOp;
512 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
514 switch (Op->Common.AmlOpcode)
516 #ifdef ACPI_UNDER_DEVELOPMENT
518 ChildOp = Op->Common.Value.Arg;
519 if ((ChildOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
520 !ChildOp->Common.Node)
522 AcpiNsExternalizeName (ACPI_UINT32_MAX, ChildOp->Common.Value.String,
524 AcpiOsPrintf ("/* %-16s A-NAMEPATH: %s */\n", Op->Common.AmlOpName, Path);
527 NextOp = Op->Common.Next;
530 /* This NamePath has no args, assume it is an integer */
532 AcpiDmAddToExternalList (ChildOp->Common.Value.String, ACPI_TYPE_INTEGER, 0);
536 ArgCount = AcpiDmInspectPossibleArgs (3, 1, NextOp);
537 AcpiOsPrintf ("/* A-CHILDREN: %d Actual %d */\n", ArgCount, AcpiDmCountChildren (Op));
541 /* One Arg means this is just a Store(Name,Target) */
543 AcpiDmAddToExternalList (ChildOp->Common.Value.String, ACPI_TYPE_INTEGER, 0);
547 AcpiDmAddToExternalList (ChildOp->Common.Value.String, ACPI_TYPE_METHOD, ArgCount);
554 ChildOp = Op->Common.Value.Arg;
555 if ((ChildOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
556 !ChildOp->Common.Node)
558 NextOp = Op->Common.Next;
561 /* This NamePath has no args, assume it is an integer */
563 AcpiDmAddToExternalList (ChildOp->Common.Value.String, ACPI_TYPE_INTEGER, 0);
567 ArgCount = AcpiDmInspectPossibleArgs (2, 1, NextOp);
570 /* One Arg means this is just a Store(Name,Target) */
572 AcpiDmAddToExternalList (ChildOp->Common.Value.String, ACPI_TYPE_INTEGER, 0);
576 AcpiDmAddToExternalList (ChildOp->Common.Value.String, ACPI_TYPE_METHOD, ArgCount);
580 case AML_INT_NAMEPATH_OP:
582 /* Must examine parent to see if this namepath is an argument */
584 ParentOp = Op->Common.Parent;
585 OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Common.AmlOpcode);
587 if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
588 (OpInfo->Class != AML_CLASS_CREATE) &&
589 (ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
592 ArgCount = AcpiDmInspectPossibleArgs (0, 0, Op->Common.Next);
595 * Check if namepath is a predicate for if/while or lone parameter to
600 if (((ParentOp->Common.AmlOpcode == AML_IF_OP) ||
601 (ParentOp->Common.AmlOpcode == AML_WHILE_OP) ||
602 (ParentOp->Common.AmlOpcode == AML_RETURN_OP)) &&
604 /* And namepath is the first argument */
605 (ParentOp->Common.Value.Arg == Op))
607 AcpiDmAddToExternalList (Op->Common.Value.String, ACPI_TYPE_INTEGER, 0);
613 * This is a standalone namestring (not a parameter to another
614 * operator) - it *must* be a method invocation, nothing else is
615 * grammatically possible.
617 AcpiDmAddToExternalList (Op->Common.Value.String, ACPI_TYPE_METHOD, ArgCount);
627 /*******************************************************************************
629 * FUNCTION: AcpiDmLoadDescendingOp
631 * PARAMETERS: ASL_WALK_CALLBACK
635 * DESCRIPTION: Descending handler for namespace control method object load
637 ******************************************************************************/
640 AcpiDmLoadDescendingOp (
641 ACPI_PARSE_OBJECT *Op,
645 ACPI_OP_WALK_INFO *Info = Context;
646 const ACPI_OPCODE_INFO *OpInfo;
647 ACPI_WALK_STATE *WalkState;
648 ACPI_OBJECT_TYPE ObjectType;
651 ACPI_PARSE_OBJECT *NextOp;
652 ACPI_NAMESPACE_NODE *Node;
655 WalkState = Info->WalkState;
656 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
657 ObjectType = OpInfo->ObjectType;
658 ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);
660 /* Only interested in operators that create new names */
662 if (!(OpInfo->Flags & AML_NAMED) &&
663 !(OpInfo->Flags & AML_CREATE))
668 /* Get the NamePath from the appropriate place */
670 if (OpInfo->Flags & AML_NAMED)
672 /* For all named operators, get the new name */
674 Path = (char *) Op->Named.Path;
676 else if (OpInfo->Flags & AML_CREATE)
678 /* New name is the last child */
680 NextOp = Op->Common.Value.Arg;
682 while (NextOp->Common.Next)
684 NextOp = NextOp->Common.Next;
686 Path = NextOp->Common.Value.String;
694 /* Insert the name into the namespace */
696 Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
697 ACPI_IMODE_LOAD_PASS2, ACPI_NS_DONT_OPEN_SCOPE,
700 Op->Common.Node = Node;
705 if (AcpiNsOpensScope (ObjectType))
709 Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
710 if (ACPI_FAILURE (Status))
721 /*******************************************************************************
723 * FUNCTION: AcpiDmXrefDescendingOp
725 * PARAMETERS: ASL_WALK_CALLBACK
729 * DESCRIPTION: Descending handler for namespace cross reference
731 ******************************************************************************/
734 AcpiDmXrefDescendingOp (
735 ACPI_PARSE_OBJECT *Op,
739 ACPI_OP_WALK_INFO *Info = Context;
740 const ACPI_OPCODE_INFO *OpInfo;
741 ACPI_WALK_STATE *WalkState;
742 ACPI_OBJECT_TYPE ObjectType;
745 ACPI_PARSE_OBJECT *NextOp;
746 ACPI_NAMESPACE_NODE *Node;
749 WalkState = Info->WalkState;
750 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
751 ObjectType = OpInfo->ObjectType;
752 ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);
754 if ((!(OpInfo->Flags & AML_NAMED)) &&
755 (!(OpInfo->Flags & AML_CREATE)) &&
756 (Op->Common.AmlOpcode != AML_INT_NAMEPATH_OP))
761 /* Get the NamePath from the appropriate place */
763 if (OpInfo->Flags & AML_NAMED)
765 if ((Op->Common.AmlOpcode == AML_ALIAS_OP) ||
766 (Op->Common.AmlOpcode == AML_SCOPE_OP))
769 * Only these two operators refer to an existing name,
772 Path = (char *) Op->Named.Path;
775 else if (OpInfo->Flags & AML_CREATE)
777 /* Referenced Buffer Name is the first child */
779 NextOp = Op->Common.Value.Arg;
780 if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
782 Path = NextOp->Common.Value.String;
787 Path = Op->Common.Value.String;
796 * Lookup the name in the namespace. Name must exist at this point, or it
797 * is an invalid reference.
799 * The namespace is also used as a lookup table for references to resource
800 * descriptors and the fields within them.
802 Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
803 ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
805 if (ACPI_FAILURE (Status))
807 if (Status == AE_NOT_FOUND)
809 AcpiDmAddToExternalList (Path, (UINT8) ObjectType, 0);
812 * We could install this into the namespace, but we catch duplicate
813 * externals when they are added to the list.
816 Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
817 ACPI_IMODE_LOAD_PASS1, ACPI_NS_DONT_OPEN_SCOPE,
824 Op->Common.Node = Node;
829 /* Open new scope if necessary */
831 if (AcpiNsOpensScope (ObjectType))
835 Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
836 if (ACPI_FAILURE (Status))
847 /*******************************************************************************
849 * FUNCTION: AcpiDmResourceDescendingOp
851 * PARAMETERS: ASL_WALK_CALLBACK
855 * DESCRIPTION: Process one parse op during symbolic resource index conversion.
857 ******************************************************************************/
860 AcpiDmResourceDescendingOp (
861 ACPI_PARSE_OBJECT *Op,
865 ACPI_OP_WALK_INFO *Info = Context;
866 const ACPI_OPCODE_INFO *OpInfo;
867 ACPI_WALK_STATE *WalkState;
868 ACPI_OBJECT_TYPE ObjectType;
872 WalkState = Info->WalkState;
873 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
875 /* Open new scope if necessary */
877 ObjectType = OpInfo->ObjectType;
878 if (AcpiNsOpensScope (ObjectType))
883 Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
884 if (ACPI_FAILURE (Status))
892 * Check if this operator contains a reference to a resource descriptor.
893 * If so, convert the reference into a symbolic reference.
895 AcpiDmCheckResourceReference (Op, WalkState);
900 /*******************************************************************************
902 * FUNCTION: AcpiDmCommonAscendingOp
904 * PARAMETERS: ASL_WALK_CALLBACK
908 * DESCRIPTION: Ascending handler for combined parse/namespace walks. Closes
909 * scope if necessary.
911 ******************************************************************************/
914 AcpiDmCommonAscendingOp (
915 ACPI_PARSE_OBJECT *Op,
919 ACPI_OP_WALK_INFO *Info = Context;
920 const ACPI_OPCODE_INFO *OpInfo;
921 ACPI_OBJECT_TYPE ObjectType;
924 /* Close scope if necessary */
926 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
927 ObjectType = OpInfo->ObjectType;
928 ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);
930 if (AcpiNsOpensScope (ObjectType))
932 (void) AcpiDsScopeStackPop (Info->WalkState);
939 /*******************************************************************************
941 * FUNCTION: AcpiDmInspectPossibleArgs
943 * PARAMETERS: CurrentOpArgCount - Which arg of the current op was the
944 * possible method invocation found
945 * TargetCount - Number of targets (0,1,2) for this op
950 * DESCRIPTION: Examine following args and next ops for possible arguments
951 * for an unrecognized method invocation.
953 ******************************************************************************/
956 AcpiDmInspectPossibleArgs (
957 UINT32 CurrentOpArgCount,
959 ACPI_PARSE_OBJECT *Op)
961 const ACPI_OPCODE_INFO *OpInfo;
967 Lookahead = (ACPI_METHOD_NUM_ARGS + TargetCount) - CurrentOpArgCount;
969 /* Lookahead for the maximum number of possible arguments */
971 for (i = 0; i < Lookahead; i++)
978 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
981 * Any one of these operators is "very probably" not a method arg
983 if ((Op->Common.AmlOpcode == AML_STORE_OP) ||
984 (Op->Common.AmlOpcode == AML_NOTIFY_OP))
989 if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
990 (OpInfo->Class != AML_CLASS_CONTROL))
995 Op = Op->Common.Next;