1 /******************************************************************************
3 * Module Name: dswexec - Dispatcher method execution callbacks;
4 * dispatch to interpreter.
6 *****************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999 - 2011, 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 *****************************************************************************/
117 #define __DSWEXEC_C__
120 #include "accommon.h"
121 #include "acparser.h"
123 #include "acdispat.h"
124 #include "acinterp.h"
125 #include "acnamesp.h"
129 #define _COMPONENT ACPI_DISPATCHER
130 ACPI_MODULE_NAME ("dswexec")
133 * Dispatch table for opcode classes
135 static ACPI_EXECUTE_OP AcpiGbl_OpTypeDispatch
[] =
137 AcpiExOpcode_0A_0T_1R
,
138 AcpiExOpcode_1A_0T_0R
,
139 AcpiExOpcode_1A_0T_1R
,
140 AcpiExOpcode_1A_1T_0R
,
141 AcpiExOpcode_1A_1T_1R
,
142 AcpiExOpcode_2A_0T_0R
,
143 AcpiExOpcode_2A_0T_1R
,
144 AcpiExOpcode_2A_1T_1R
,
145 AcpiExOpcode_2A_2T_1R
,
146 AcpiExOpcode_3A_0T_0R
,
147 AcpiExOpcode_3A_1T_1R
,
148 AcpiExOpcode_6A_0T_1R
152 /*****************************************************************************
154 * FUNCTION: AcpiDsGetPredicateValue
156 * PARAMETERS: WalkState - Current state of the parse tree walk
157 * ResultObj - if non-zero, pop result from result stack
161 * DESCRIPTION: Get the result of a predicate evaluation
163 ****************************************************************************/
166 AcpiDsGetPredicateValue (
167 ACPI_WALK_STATE
*WalkState
,
168 ACPI_OPERAND_OBJECT
*ResultObj
)
170 ACPI_STATUS Status
= AE_OK
;
171 ACPI_OPERAND_OBJECT
*ObjDesc
;
172 ACPI_OPERAND_OBJECT
*LocalObjDesc
= NULL
;
175 ACPI_FUNCTION_TRACE_PTR (DsGetPredicateValue
, WalkState
);
178 WalkState
->ControlState
->Common
.State
= 0;
182 Status
= AcpiDsResultPop (&ObjDesc
, WalkState
);
183 if (ACPI_FAILURE (Status
))
185 ACPI_EXCEPTION ((AE_INFO
, Status
,
186 "Could not get result from predicate evaluation"));
188 return_ACPI_STATUS (Status
);
193 Status
= AcpiDsCreateOperand (WalkState
, WalkState
->Op
, 0);
194 if (ACPI_FAILURE (Status
))
196 return_ACPI_STATUS (Status
);
199 Status
= AcpiExResolveToValue (&WalkState
->Operands
[0], WalkState
);
200 if (ACPI_FAILURE (Status
))
202 return_ACPI_STATUS (Status
);
205 ObjDesc
= WalkState
->Operands
[0];
210 ACPI_ERROR ((AE_INFO
,
211 "No predicate ObjDesc=%p State=%p",
212 ObjDesc
, WalkState
));
214 return_ACPI_STATUS (AE_AML_NO_OPERAND
);
218 * Result of predicate evaluation must be an Integer
219 * object. Implicitly convert the argument if necessary.
221 Status
= AcpiExConvertToInteger (ObjDesc
, &LocalObjDesc
, 16);
222 if (ACPI_FAILURE (Status
))
227 if (LocalObjDesc
->Common
.Type
!= ACPI_TYPE_INTEGER
)
229 ACPI_ERROR ((AE_INFO
,
230 "Bad predicate (not an integer) ObjDesc=%p State=%p Type=0x%X",
231 ObjDesc
, WalkState
, ObjDesc
->Common
.Type
));
233 Status
= AE_AML_OPERAND_TYPE
;
237 /* Truncate the predicate to 32-bits if necessary */
239 AcpiExTruncateFor32bitTable (LocalObjDesc
);
242 * Save the result of the predicate evaluation on
245 if (LocalObjDesc
->Integer
.Value
)
247 WalkState
->ControlState
->Common
.Value
= TRUE
;
252 * Predicate is FALSE, we will just toss the
253 * rest of the package
255 WalkState
->ControlState
->Common
.Value
= FALSE
;
256 Status
= AE_CTRL_FALSE
;
259 /* Predicate can be used for an implicit return value */
261 (void) AcpiDsDoImplicitReturn (LocalObjDesc
, WalkState
, TRUE
);
266 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC
, "Completed a predicate eval=%X Op=%p\n",
267 WalkState
->ControlState
->Common
.Value
, WalkState
->Op
));
269 /* Break to debugger to display result */
271 ACPI_DEBUGGER_EXEC (AcpiDbDisplayResultObject (LocalObjDesc
, WalkState
));
274 * Delete the predicate result object (we know that
275 * we don't need it anymore)
277 if (LocalObjDesc
!= ObjDesc
)
279 AcpiUtRemoveReference (LocalObjDesc
);
281 AcpiUtRemoveReference (ObjDesc
);
283 WalkState
->ControlState
->Common
.State
= ACPI_CONTROL_NORMAL
;
284 return_ACPI_STATUS (Status
);
288 /*****************************************************************************
290 * FUNCTION: AcpiDsExecBeginOp
292 * PARAMETERS: WalkState - Current state of the parse tree walk
293 * OutOp - Where to return op if a new one is created
297 * DESCRIPTION: Descending callback used during the execution of control
298 * methods. This is where most operators and operands are
299 * dispatched to the interpreter.
301 ****************************************************************************/
305 ACPI_WALK_STATE
*WalkState
,
306 ACPI_PARSE_OBJECT
**OutOp
)
308 ACPI_PARSE_OBJECT
*Op
;
309 ACPI_STATUS Status
= AE_OK
;
313 ACPI_FUNCTION_TRACE_PTR (DsExecBeginOp
, WalkState
);
319 Status
= AcpiDsLoad2BeginOp (WalkState
, OutOp
);
320 if (ACPI_FAILURE (Status
))
327 WalkState
->Opcode
= Op
->Common
.AmlOpcode
;
328 WalkState
->OpInfo
= AcpiPsGetOpcodeInfo (Op
->Common
.AmlOpcode
);
330 if (AcpiNsOpensScope (WalkState
->OpInfo
->ObjectType
))
332 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH
,
333 "(%s) Popping scope for Op %p\n",
334 AcpiUtGetTypeName (WalkState
->OpInfo
->ObjectType
), Op
));
336 Status
= AcpiDsScopeStackPop (WalkState
);
337 if (ACPI_FAILURE (Status
))
344 if (Op
== WalkState
->Origin
)
351 return_ACPI_STATUS (AE_OK
);
355 * If the previous opcode was a conditional, this opcode
356 * must be the beginning of the associated predicate.
357 * Save this knowledge in the current scope descriptor
359 if ((WalkState
->ControlState
) &&
360 (WalkState
->ControlState
->Common
.State
==
361 ACPI_CONTROL_CONDITIONAL_EXECUTING
))
363 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC
, "Exec predicate Op=%p State=%p\n",
366 WalkState
->ControlState
->Common
.State
= ACPI_CONTROL_PREDICATE_EXECUTING
;
368 /* Save start of predicate */
370 WalkState
->ControlState
->Control
.PredicateOp
= Op
;
374 OpcodeClass
= WalkState
->OpInfo
->Class
;
376 /* We want to send namepaths to the load code */
378 if (Op
->Common
.AmlOpcode
== AML_INT_NAMEPATH_OP
)
380 OpcodeClass
= AML_CLASS_NAMED_OBJECT
;
384 * Handle the opcode based upon the opcode type
388 case AML_CLASS_CONTROL
:
390 Status
= AcpiDsExecBeginControlOp (WalkState
, Op
);
394 case AML_CLASS_NAMED_OBJECT
:
396 if (WalkState
->WalkType
& ACPI_WALK_METHOD
)
399 * Found a named object declaration during method execution;
400 * we must enter this object into the namespace. The created
401 * object is temporary and will be deleted upon completion of
402 * the execution of this method.
404 * Note 10/2010: Except for the Scope() op. This opcode does
405 * not actually create a new object, it refers to an existing
406 * object. However, for Scope(), we want to indeed open a
409 if (Op
->Common
.AmlOpcode
!= AML_SCOPE_OP
)
411 Status
= AcpiDsLoad2BeginOp (WalkState
, NULL
);
415 Status
= AcpiDsScopeStackPush (Op
->Named
.Node
,
416 Op
->Named
.Node
->Type
, WalkState
);
417 if (ACPI_FAILURE (Status
))
419 return_ACPI_STATUS (Status
);
426 case AML_CLASS_EXECUTE
:
427 case AML_CLASS_CREATE
:
436 /* Nothing to do here during method execution */
438 return_ACPI_STATUS (Status
);
442 Status
= AcpiDsMethodError (Status
, WalkState
);
443 return_ACPI_STATUS (Status
);
447 /*****************************************************************************
449 * FUNCTION: AcpiDsExecEndOp
451 * PARAMETERS: WalkState - Current state of the parse tree walk
455 * DESCRIPTION: Ascending callback used during the execution of control
456 * methods. The only thing we really need to do here is to
457 * notice the beginning of IF, ELSE, and WHILE blocks.
459 ****************************************************************************/
463 ACPI_WALK_STATE
*WalkState
)
465 ACPI_PARSE_OBJECT
*Op
;
466 ACPI_STATUS Status
= AE_OK
;
469 ACPI_PARSE_OBJECT
*NextOp
;
470 ACPI_PARSE_OBJECT
*FirstArg
;
473 ACPI_FUNCTION_TRACE_PTR (DsExecEndOp
, WalkState
);
477 OpType
= WalkState
->OpInfo
->Type
;
478 OpClass
= WalkState
->OpInfo
->Class
;
480 if (OpClass
== AML_CLASS_UNKNOWN
)
482 ACPI_ERROR ((AE_INFO
, "Unknown opcode 0x%X", Op
->Common
.AmlOpcode
));
483 return_ACPI_STATUS (AE_NOT_IMPLEMENTED
);
486 FirstArg
= Op
->Common
.Value
.Arg
;
488 /* Init the walk state */
490 WalkState
->NumOperands
= 0;
491 WalkState
->OperandIndex
= 0;
492 WalkState
->ReturnDesc
= NULL
;
493 WalkState
->ResultObj
= NULL
;
495 /* Call debugger for single step support (DEBUG build only) */
497 ACPI_DEBUGGER_EXEC (Status
= AcpiDbSingleStep (WalkState
, Op
, OpClass
));
498 ACPI_DEBUGGER_EXEC (if (ACPI_FAILURE (Status
)) {return_ACPI_STATUS (Status
);});
500 /* Decode the Opcode Class */
504 case AML_CLASS_ARGUMENT
: /* Constants, literals, etc. */
506 if (WalkState
->Opcode
== AML_INT_NAMEPATH_OP
)
508 Status
= AcpiDsEvaluateNamePath (WalkState
);
509 if (ACPI_FAILURE (Status
))
517 case AML_CLASS_EXECUTE
: /* Most operators with arguments */
519 /* Build resolved operand stack */
521 Status
= AcpiDsCreateOperands (WalkState
, FirstArg
);
522 if (ACPI_FAILURE (Status
))
528 * All opcodes require operand resolution, with the only exceptions
529 * being the ObjectType and SizeOf operators.
531 if (!(WalkState
->OpInfo
->Flags
& AML_NO_OPERAND_RESOLVE
))
533 /* Resolve all operands */
535 Status
= AcpiExResolveOperands (WalkState
->Opcode
,
536 &(WalkState
->Operands
[WalkState
->NumOperands
-1]),
540 if (ACPI_SUCCESS (Status
))
543 * Dispatch the request to the appropriate interpreter handler
544 * routine. There is one routine per opcode "type" based upon the
545 * number of opcode arguments and return type.
547 Status
= AcpiGbl_OpTypeDispatch
[OpType
] (WalkState
);
552 * Treat constructs of the form "Store(LocalX,LocalX)" as noops when the
553 * Local is uninitialized.
555 if ((Status
== AE_AML_UNINITIALIZED_LOCAL
) &&
556 (WalkState
->Opcode
== AML_STORE_OP
) &&
557 (WalkState
->Operands
[0]->Common
.Type
== ACPI_TYPE_LOCAL_REFERENCE
) &&
558 (WalkState
->Operands
[1]->Common
.Type
== ACPI_TYPE_LOCAL_REFERENCE
) &&
559 (WalkState
->Operands
[0]->Reference
.Class
==
560 WalkState
->Operands
[1]->Reference
.Class
) &&
561 (WalkState
->Operands
[0]->Reference
.Value
==
562 WalkState
->Operands
[1]->Reference
.Value
))
568 ACPI_EXCEPTION ((AE_INFO
, Status
,
569 "While resolving operands for [%s]",
570 AcpiPsGetOpcodeName (WalkState
->Opcode
)));
574 /* Always delete the argument objects and clear the operand stack */
576 AcpiDsClearOperands (WalkState
);
579 * If a result object was returned from above, push it on the
580 * current result stack
582 if (ACPI_SUCCESS (Status
) &&
583 WalkState
->ResultObj
)
585 Status
= AcpiDsResultPush (WalkState
->ResultObj
, WalkState
);
594 case AML_TYPE_CONTROL
: /* Type 1 opcode, IF/ELSE/WHILE/NOOP */
596 /* 1 Operand, 0 ExternalResult, 0 InternalResult */
598 Status
= AcpiDsExecEndControlOp (WalkState
, Op
);
603 case AML_TYPE_METHOD_CALL
:
606 * If the method is referenced from within a package
607 * declaration, it is not a invocation of the method, just
610 if ((Op
->Asl
.Parent
) &&
611 ((Op
->Asl
.Parent
->Asl
.AmlOpcode
== AML_PACKAGE_OP
) ||
612 (Op
->Asl
.Parent
->Asl
.AmlOpcode
== AML_VAR_PACKAGE_OP
)))
614 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH
,
615 "Method Reference in a Package, Op=%p\n", Op
));
617 Op
->Common
.Node
= (ACPI_NAMESPACE_NODE
*) Op
->Asl
.Value
.Arg
->Asl
.Node
;
618 AcpiUtAddReference (Op
->Asl
.Value
.Arg
->Asl
.Node
->Object
);
619 return_ACPI_STATUS (AE_OK
);
622 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH
, "Method invocation, Op=%p\n", Op
));
625 * (AML_METHODCALL) Op->Asl.Value.Arg->Asl.Node contains
626 * the method Node pointer
628 /* NextOp points to the op that holds the method name */
632 /* NextOp points to first argument op */
634 NextOp
= NextOp
->Common
.Next
;
637 * Get the method's arguments and put them on the operand stack
639 Status
= AcpiDsCreateOperands (WalkState
, NextOp
);
640 if (ACPI_FAILURE (Status
))
646 * Since the operands will be passed to another control method,
647 * we must resolve all local references here (Local variables,
648 * arguments to *this* method, etc.)
650 Status
= AcpiDsResolveOperands (WalkState
);
651 if (ACPI_FAILURE (Status
))
653 /* On error, clear all resolved operands */
655 AcpiDsClearOperands (WalkState
);
660 * Tell the walk loop to preempt this running method and
661 * execute the new method
663 Status
= AE_CTRL_TRANSFER
;
666 * Return now; we don't want to disturb anything,
667 * especially the operand count!
669 return_ACPI_STATUS (Status
);
672 case AML_TYPE_CREATE_FIELD
:
674 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC
,
675 "Executing CreateField Buffer/Index Op=%p\n", Op
));
677 Status
= AcpiDsLoad2EndOp (WalkState
);
678 if (ACPI_FAILURE (Status
))
683 Status
= AcpiDsEvalBufferFieldOperands (WalkState
, Op
);
687 case AML_TYPE_CREATE_OBJECT
:
689 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC
,
690 "Executing CreateObject (Buffer/Package) Op=%p\n", Op
));
692 switch (Op
->Common
.Parent
->Common
.AmlOpcode
)
697 * Put the Node on the object stack (Contains the ACPI Name
700 WalkState
->Operands
[0] = (void *) Op
->Common
.Parent
->Common
.Node
;
701 WalkState
->NumOperands
= 1;
703 Status
= AcpiDsCreateNode (WalkState
,
704 Op
->Common
.Parent
->Common
.Node
,
706 if (ACPI_FAILURE (Status
))
712 /*lint -fallthrough */
714 case AML_INT_EVAL_SUBTREE_OP
:
716 Status
= AcpiDsEvalDataObjectOperands (WalkState
, Op
,
717 AcpiNsGetAttachedObject (Op
->Common
.Parent
->Common
.Node
));
722 Status
= AcpiDsEvalDataObjectOperands (WalkState
, Op
, NULL
);
727 * If a result object was returned from above, push it on the
728 * current result stack
730 if (WalkState
->ResultObj
)
732 Status
= AcpiDsResultPush (WalkState
->ResultObj
, WalkState
);
737 case AML_TYPE_NAMED_FIELD
:
738 case AML_TYPE_NAMED_COMPLEX
:
739 case AML_TYPE_NAMED_SIMPLE
:
740 case AML_TYPE_NAMED_NO_OBJ
:
742 Status
= AcpiDsLoad2EndOp (WalkState
);
743 if (ACPI_FAILURE (Status
))
748 if (Op
->Common
.AmlOpcode
== AML_REGION_OP
)
750 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC
,
751 "Executing OpRegion Address/Length Op=%p\n", Op
));
753 Status
= AcpiDsEvalRegionOperands (WalkState
, Op
);
754 if (ACPI_FAILURE (Status
))
759 else if (Op
->Common
.AmlOpcode
== AML_DATA_REGION_OP
)
761 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC
,
762 "Executing DataTableRegion Strings Op=%p\n", Op
));
764 Status
= AcpiDsEvalTableRegionOperands (WalkState
, Op
);
765 if (ACPI_FAILURE (Status
))
770 else if (Op
->Common
.AmlOpcode
== AML_BANK_FIELD_OP
)
772 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC
,
773 "Executing BankField Op=%p\n", Op
));
775 Status
= AcpiDsEvalBankFieldOperands (WalkState
, Op
);
776 if (ACPI_FAILURE (Status
))
784 case AML_TYPE_UNDEFINED
:
786 ACPI_ERROR ((AE_INFO
,
787 "Undefined opcode type Op=%p", Op
));
788 return_ACPI_STATUS (AE_NOT_IMPLEMENTED
);
793 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH
,
794 "Internal opcode=%X type Op=%p\n",
795 WalkState
->Opcode
, Op
));
801 ACPI_ERROR ((AE_INFO
,
802 "Unimplemented opcode, class=0x%X type=0x%X Opcode=-0x%X Op=%p",
803 OpClass
, OpType
, Op
->Common
.AmlOpcode
, Op
));
805 Status
= AE_NOT_IMPLEMENTED
;
811 * ACPI 2.0 support for 64-bit integers: Truncate numeric
812 * result value if we are executing from a 32-bit ACPI table
814 AcpiExTruncateFor32bitTable (WalkState
->ResultObj
);
817 * Check if we just completed the evaluation of a
818 * conditional predicate
820 if ((ACPI_SUCCESS (Status
)) &&
821 (WalkState
->ControlState
) &&
822 (WalkState
->ControlState
->Common
.State
==
823 ACPI_CONTROL_PREDICATE_EXECUTING
) &&
824 (WalkState
->ControlState
->Control
.PredicateOp
== Op
))
826 Status
= AcpiDsGetPredicateValue (WalkState
, WalkState
->ResultObj
);
827 WalkState
->ResultObj
= NULL
;
833 if (WalkState
->ResultObj
)
835 /* Break to debugger to display result */
837 ACPI_DEBUGGER_EXEC (AcpiDbDisplayResultObject (WalkState
->ResultObj
,
841 * Delete the result op if and only if:
842 * Parent will not use the result -- such as any
843 * non-nested type2 op in a method (parent will be method)
845 AcpiDsDeleteResultIfNotUsed (Op
, WalkState
->ResultObj
, WalkState
);
848 #ifdef _UNDER_DEVELOPMENT
850 if (WalkState
->ParserState
.Aml
== WalkState
->ParserState
.AmlEnd
)
852 AcpiDbMethodEnd (WalkState
);
856 /* Invoke exception handler on error */
858 if (ACPI_FAILURE (Status
))
860 Status
= AcpiDsMethodError (Status
, WalkState
);
863 /* Always clear the object stack */
865 WalkState
->NumOperands
= 0;
866 return_ACPI_STATUS (Status
);