dswexec.c revision 85756
1/******************************************************************************
2 *
3 * Module Name: dswexec - Dispatcher method execution callbacks;
4 *                        dispatch to interpreter.
5 *              $Revision: 79 $
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
14 * All rights reserved.
15 *
16 * 2. License
17 *
18 * 2.1. This is your license from Intel Corp. under its intellectual property
19 * rights.  You may have additional license terms from the party that provided
20 * you this software, covering your right to use that party's intellectual
21 * property rights.
22 *
23 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
24 * copy of the source code appearing in this file ("Covered Code") an
25 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
26 * base code distributed originally by Intel ("Original Intel Code") to copy,
27 * make derivatives, distribute, use and display any portion of the Covered
28 * Code in any form, with the right to sublicense such rights; and
29 *
30 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
31 * license (with the right to sublicense), under only those claims of Intel
32 * patents that are infringed by the Original Intel Code, to make, use, sell,
33 * offer to sell, and import the Covered Code and derivative works thereof
34 * solely to the minimum extent necessary to exercise the above copyright
35 * license, and in no event shall the patent license extend to any additions
36 * to or modifications of the Original Intel Code.  No other license or right
37 * is granted directly or by implication, estoppel or otherwise;
38 *
39 * The above copyright and patent license is granted only if the following
40 * conditions are met:
41 *
42 * 3. Conditions
43 *
44 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
45 * Redistribution of source code of any substantial portion of the Covered
46 * Code or modification with rights to further distribute source must include
47 * the above Copyright Notice, the above License, this list of Conditions,
48 * and the following Disclaimer and Export Compliance provision.  In addition,
49 * Licensee must cause all Covered Code to which Licensee contributes to
50 * contain a file documenting the changes Licensee made to create that Covered
51 * Code and the date of any change.  Licensee must include in that file the
52 * documentation of any changes made by any predecessor Licensee.  Licensee
53 * must include a prominent statement that the modification is derived,
54 * directly or indirectly, from Original Intel Code.
55 *
56 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
57 * Redistribution of source code of any substantial portion of the Covered
58 * Code or modification without rights to further distribute source must
59 * include the following Disclaimer and Export Compliance provision in the
60 * documentation and/or other materials provided with distribution.  In
61 * addition, Licensee may not authorize further sublicense of source of any
62 * portion of the Covered Code, and must include terms to the effect that the
63 * license from Licensee to its licensee is limited to the intellectual
64 * property embodied in the software Licensee provides to its licensee, and
65 * not to intellectual property embodied in modifications its licensee may
66 * make.
67 *
68 * 3.3. Redistribution of Executable. Redistribution in executable form of any
69 * substantial portion of the Covered Code or modification must reproduce the
70 * above Copyright Notice, and the following Disclaimer and Export Compliance
71 * provision in the documentation and/or other materials provided with the
72 * distribution.
73 *
74 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * Intel Code.
76 *
77 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
78 * Intel shall be used in advertising or otherwise to promote the sale, use or
79 * other dealings in products derived from or relating to the Covered Code
80 * without prior written authorization from Intel.
81 *
82 * 4. Disclaimer and Export Compliance
83 *
84 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
85 * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
86 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
87 * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
88 * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
89 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * PARTICULAR PURPOSE.
91 *
92 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
93 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
94 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
95 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
96 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
97 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
98 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * LIMITED REMEDY.
100 *
101 * 4.3. Licensee shall not export, either directly or indirectly, any of this
102 * software or system incorporating such software without first obtaining any
103 * required license or other approval from the U. S. Department of Commerce or
104 * any other agency or department of the United States Government.  In the
105 * event Licensee exports any such software from the United States or
106 * re-exports any such software from a foreign destination, Licensee shall
107 * ensure that the distribution and export/re-export of the software is in
108 * compliance with all laws, regulations, orders, or other restrictions of the
109 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
110 * any of its subsidiaries will export/re-export any technical data, process,
111 * software, or service, directly or indirectly, to any country for which the
112 * United States government or any agency thereof requires an export license,
113 * other governmental approval, or letter of assurance, without first obtaining
114 * such license, approval or letter.
115 *
116 *****************************************************************************/
117
118#define __DSWEXEC_C__
119
120#include "acpi.h"
121#include "acparser.h"
122#include "amlcode.h"
123#include "acdispat.h"
124#include "acinterp.h"
125#include "acnamesp.h"
126#include "acdebug.h"
127
128
129#define _COMPONENT          ACPI_DISPATCHER
130        MODULE_NAME         ("dswexec")
131
132/*
133 * Dispatch tables for opcode classes
134 */
135ACPI_EXECUTE_OP         AcpiGbl_OpTypeDispatch [] = {
136                            AcpiExOpcode_1A_0T_0R,
137                            AcpiExOpcode_1A_0T_1R,
138                            AcpiExOpcode_1A_1T_0R,
139                            AcpiExOpcode_1A_1T_1R,
140                            AcpiExOpcode_2A_0T_0R,
141                            AcpiExOpcode_2A_0T_1R,
142                            AcpiExOpcode_2A_1T_1R,
143                            AcpiExOpcode_2A_2T_1R,
144                            AcpiExOpcode_3A_0T_0R,
145                            AcpiExOpcode_3A_1T_1R,
146                            AcpiExOpcode_6A_0T_1R};
147
148/*****************************************************************************
149 *
150 * FUNCTION:    AcpiDsGetPredicateValue
151 *
152 * PARAMETERS:  WalkState       - Current state of the parse tree walk
153 *
154 * RETURN:      Status
155 *
156 * DESCRIPTION: Get the result of a predicate evaluation
157 *
158 ****************************************************************************/
159
160ACPI_STATUS
161AcpiDsGetPredicateValue (
162    ACPI_WALK_STATE         *WalkState,
163    UINT32                  HasResultObj)
164{
165    ACPI_STATUS             Status = AE_OK;
166    ACPI_OPERAND_OBJECT     *ObjDesc;
167
168
169    FUNCTION_TRACE_PTR ("DsGetPredicateValue", WalkState);
170
171
172    WalkState->ControlState->Common.State = 0;
173
174    if (HasResultObj)
175    {
176        Status = AcpiDsResultPop (&ObjDesc, WalkState);
177        if (ACPI_FAILURE (Status))
178        {
179            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
180                "Could not get result from predicate evaluation, %s\n",
181                AcpiFormatException (Status)));
182
183            return_ACPI_STATUS (Status);
184        }
185    }
186
187    else
188    {
189        Status = AcpiDsCreateOperand (WalkState, WalkState->Op, 0);
190        if (ACPI_FAILURE (Status))
191        {
192            return_ACPI_STATUS (Status);
193        }
194
195        Status = AcpiExResolveToValue (&WalkState->Operands [0], WalkState);
196        if (ACPI_FAILURE (Status))
197        {
198            return_ACPI_STATUS (Status);
199        }
200
201        ObjDesc = WalkState->Operands [0];
202    }
203
204    if (!ObjDesc)
205    {
206        ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No predicate ObjDesc=%p State=%p\n",
207            ObjDesc, WalkState));
208
209        return_ACPI_STATUS (AE_AML_NO_OPERAND);
210    }
211
212
213    /*
214     * Result of predicate evaluation currently must
215     * be a number
216     */
217    if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
218    {
219        ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
220            "Bad predicate (not a number) ObjDesc=%p State=%p Type=%X\n",
221            ObjDesc, WalkState, ObjDesc->Common.Type));
222
223        Status = AE_AML_OPERAND_TYPE;
224        goto Cleanup;
225    }
226
227
228    /* Truncate the predicate to 32-bits if necessary */
229
230    AcpiExTruncateFor32bitTable (ObjDesc, WalkState);
231
232    /*
233     * Save the result of the predicate evaluation on
234     * the control stack
235     */
236    if (ObjDesc->Integer.Value)
237    {
238        WalkState->ControlState->Common.Value = TRUE;
239    }
240
241    else
242    {
243        /*
244         * Predicate is FALSE, we will just toss the
245         * rest of the package
246         */
247        WalkState->ControlState->Common.Value = FALSE;
248        Status = AE_CTRL_FALSE;
249    }
250
251
252Cleanup:
253
254    ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Completed a predicate eval=%X Op=%pn",
255        WalkState->ControlState->Common.Value, WalkState->Op));
256
257     /* Break to debugger to display result */
258
259    DEBUGGER_EXEC (AcpiDbDisplayResultObject (ObjDesc, WalkState));
260
261    /*
262     * Delete the predicate result object (we know that
263     * we don't need it anymore)
264     */
265    AcpiUtRemoveReference (ObjDesc);
266
267    WalkState->ControlState->Common.State = CONTROL_NORMAL;
268    return_ACPI_STATUS (Status);
269}
270
271
272/*****************************************************************************
273 *
274 * FUNCTION:    AcpiDsExecBeginOp
275 *
276 * PARAMETERS:  WalkState       - Current state of the parse tree walk
277 *              OutOp           - Return op if a new one is created
278 *
279 * RETURN:      Status
280 *
281 * DESCRIPTION: Descending callback used during the execution of control
282 *              methods.  This is where most operators and operands are
283 *              dispatched to the interpreter.
284 *
285 ****************************************************************************/
286
287ACPI_STATUS
288AcpiDsExecBeginOp (
289    ACPI_WALK_STATE         *WalkState,
290    ACPI_PARSE_OBJECT       **OutOp)
291{
292    ACPI_PARSE_OBJECT       *Op;
293    ACPI_STATUS             Status = AE_OK;
294    UINT32                  OpcodeClass;
295
296
297    FUNCTION_TRACE_PTR ("DsExecBeginOp", WalkState);
298
299
300    Op = WalkState->Op;
301    if (!Op)
302    {
303        Status = AcpiDsLoad2BeginOp (WalkState, OutOp);
304        if (ACPI_FAILURE (Status))
305        {
306            return_ACPI_STATUS (Status);
307        }
308
309        Op = *OutOp;
310        WalkState->Op = Op;
311        WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
312        WalkState->Opcode = Op->Opcode;
313    }
314
315    if (Op == WalkState->Origin)
316    {
317        if (OutOp)
318        {
319            *OutOp = Op;
320        }
321
322        return_ACPI_STATUS (AE_OK);
323    }
324
325    /*
326     * If the previous opcode was a conditional, this opcode
327     * must be the beginning of the associated predicate.
328     * Save this knowledge in the current scope descriptor
329     */
330    if ((WalkState->ControlState) &&
331        (WalkState->ControlState->Common.State ==
332            CONTROL_CONDITIONAL_EXECUTING))
333    {
334        ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Exec predicate Op=%p State=%p\n",
335                        Op, WalkState));
336
337        WalkState->ControlState->Common.State = CONTROL_PREDICATE_EXECUTING;
338
339        /* Save start of predicate */
340
341        WalkState->ControlState->Control.PredicateOp = Op;
342    }
343
344
345    OpcodeClass = WalkState->OpInfo->Class;
346
347    /* We want to send namepaths to the load code */
348
349    if (Op->Opcode == AML_INT_NAMEPATH_OP)
350    {
351        OpcodeClass = AML_CLASS_NAMED_OBJECT;
352    }
353
354    /*
355     * Handle the opcode based upon the opcode type
356     */
357    switch (OpcodeClass)
358    {
359    case AML_CLASS_CONTROL:
360
361        Status = AcpiDsResultStackPush (WalkState);
362        if (ACPI_FAILURE (Status))
363        {
364            return_ACPI_STATUS (Status);
365        }
366
367        Status = AcpiDsExecBeginControlOp (WalkState, Op);
368        break;
369
370
371    case AML_CLASS_NAMED_OBJECT:
372
373        if (WalkState->WalkType == WALK_METHOD)
374        {
375            /*
376             * Found a named object declaration during method
377             * execution;  we must enter this object into the
378             * namespace.  The created object is temporary and
379             * will be deleted upon completion of the execution
380             * of this method.
381             */
382            Status = AcpiDsLoad2BeginOp (WalkState, NULL);
383        }
384
385
386        if (Op->Opcode == AML_REGION_OP)
387        {
388            Status = AcpiDsResultStackPush (WalkState);
389        }
390
391        break;
392
393
394    /* most operators with arguments */
395
396    case AML_CLASS_EXECUTE:
397    case AML_CLASS_CREATE:
398
399        /* Start a new result/operand state */
400
401        Status = AcpiDsResultStackPush (WalkState);
402        break;
403
404
405    default:
406        break;
407    }
408
409    /* Nothing to do here during method execution */
410
411    return_ACPI_STATUS (Status);
412}
413
414
415/*****************************************************************************
416 *
417 * FUNCTION:    AcpiDsExecEndOp
418 *
419 * PARAMETERS:  WalkState       - Current state of the parse tree walk
420 *              Op              - Op that has been just been completed in the
421 *                                walk;  Arguments have now been evaluated.
422 *
423 * RETURN:      Status
424 *
425 * DESCRIPTION: Ascending callback used during the execution of control
426 *              methods.  The only thing we really need to do here is to
427 *              notice the beginning of IF, ELSE, and WHILE blocks.
428 *
429 ****************************************************************************/
430
431ACPI_STATUS
432AcpiDsExecEndOp (
433    ACPI_WALK_STATE         *WalkState)
434{
435    ACPI_PARSE_OBJECT       *Op;
436    ACPI_STATUS             Status = AE_OK;
437    UINT32                  OpType;
438    UINT32                  OpClass;
439    ACPI_PARSE_OBJECT       *NextOp;
440    ACPI_PARSE_OBJECT       *FirstArg;
441    UINT32                  i;
442
443
444    FUNCTION_TRACE_PTR ("DsExecEndOp", WalkState);
445
446
447    Op      = WalkState->Op;
448    OpType  = WalkState->OpInfo->Type;
449    OpClass = WalkState->OpInfo->Class;
450
451    if (OpClass == AML_CLASS_UNKNOWN)
452    {
453        ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown opcode %X\n", Op->Opcode));
454        return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
455    }
456
457    FirstArg = Op->Value.Arg;
458
459    /* Init the walk state */
460
461    WalkState->NumOperands = 0;
462    WalkState->ReturnDesc = NULL;
463    WalkState->ResultObj = NULL;
464
465
466    /* Call debugger for single step support (DEBUG build only) */
467
468    DEBUGGER_EXEC (Status = AcpiDbSingleStep (WalkState, Op, OpClass));
469    DEBUGGER_EXEC (if (ACPI_FAILURE (Status)) {return_ACPI_STATUS (Status);});
470
471
472    switch (OpClass)
473    {
474    /* Decode the Opcode Class */
475
476    case AML_CLASS_ARGUMENT: /* constants, literals, etc.  do nothing */
477        break;
478
479    /* most operators with arguments */
480
481    case AML_CLASS_EXECUTE:
482
483        /* Build resolved operand stack */
484
485        Status = AcpiDsCreateOperands (WalkState, FirstArg);
486        if (ACPI_FAILURE (Status))
487        {
488            goto Cleanup;
489        }
490
491        /* Done with this result state (Now that operand stack is built) */
492
493        Status = AcpiDsResultStackPop (WalkState);
494        if (ACPI_FAILURE (Status))
495        {
496            goto Cleanup;
497        }
498
499        /* Resolve all operands */
500
501        Status = AcpiExResolveOperands (WalkState->Opcode,
502                        &(WalkState->Operands [WalkState->NumOperands -1]),
503                        WalkState);
504        if (ACPI_FAILURE (Status))
505        {
506            /* TBD: must pop and delete operands */
507
508            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: Could not resolve operands, %s\n",
509                AcpiPsGetOpcodeName (WalkState->Opcode), AcpiFormatException (Status)));
510
511            /*
512             * On error, we must delete all the operands and clear the
513             * operand stack
514             */
515            for (i = 0; i < WalkState->NumOperands; i++)
516            {
517                AcpiUtRemoveReference (WalkState->Operands[i]);
518                WalkState->Operands[i] = NULL;
519            }
520
521            WalkState->NumOperands = 0;
522            goto Cleanup;
523        }
524
525        DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE, AcpiPsGetOpcodeName (WalkState->Opcode),
526                        WalkState->NumOperands, "after ExResolveOperands");
527
528        /*
529         * Dispatch the request to the appropriate interpreter handler
530         * routine.  There is one routine per opcode "type" based upon the
531         * number of opcode arguments and return type.
532         */
533        Status = AcpiGbl_OpTypeDispatch [OpType] (WalkState);
534
535
536        /* Delete argument objects and clear the operand stack */
537
538        for (i = 0; i < WalkState->NumOperands; i++)
539        {
540            /*
541             * Remove a reference to all operands, including both
542             * "Arguments" and "Targets".
543             */
544            AcpiUtRemoveReference (WalkState->Operands[i]);
545            WalkState->Operands[i] = NULL;
546        }
547
548        WalkState->NumOperands = 0;
549
550        /*
551         * If a result object was returned from above, push it on the
552         * current result stack
553         */
554        if (ACPI_SUCCESS (Status) &&
555            WalkState->ResultObj)
556        {
557            Status = AcpiDsResultPush (WalkState->ResultObj, WalkState);
558        }
559
560        break;
561
562
563    default:
564
565        switch (OpType)
566        {
567        case AML_TYPE_CONTROL:    /* Type 1 opcode, IF/ELSE/WHILE/NOOP */
568
569            /* 1 Operand, 0 ExternalResult, 0 InternalResult */
570
571            Status = AcpiDsExecEndControlOp (WalkState, Op);
572
573            AcpiDsResultStackPop (WalkState);
574            break;
575
576
577        case AML_TYPE_METHOD_CALL:
578
579            ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Method invocation, Op=%p\n", Op));
580
581            /*
582             * (AML_METHODCALL) Op->Value->Arg->Node contains
583             * the method Node pointer
584             */
585            /* NextOp points to the op that holds the method name */
586
587            NextOp = FirstArg;
588
589            /* NextOp points to first argument op */
590
591            NextOp = NextOp->Next;
592
593            /*
594             * Get the method's arguments and put them on the operand stack
595             */
596            Status = AcpiDsCreateOperands (WalkState, NextOp);
597            if (ACPI_FAILURE (Status))
598            {
599                break;
600            }
601
602            /*
603             * Since the operands will be passed to another
604             * control method, we must resolve all local
605             * references here (Local variables, arguments
606             * to *this* method, etc.)
607             */
608            Status = AcpiDsResolveOperands (WalkState);
609            if (ACPI_FAILURE (Status))
610            {
611                break;
612            }
613
614            /*
615             * Tell the walk loop to preempt this running method and
616             * execute the new method
617             */
618            Status = AE_CTRL_TRANSFER;
619
620            /*
621             * Return now; we don't want to disturb anything,
622             * especially the operand count!
623             */
624            return_ACPI_STATUS (Status);
625            break;
626
627
628        case AML_TYPE_CREATE_FIELD:
629
630            ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
631                "Executing CreateField Buffer/Index Op=%p\n", Op));
632
633            Status = AcpiDsLoad2EndOp (WalkState);
634            if (ACPI_FAILURE (Status))
635            {
636                break;
637            }
638
639            Status = AcpiDsEvalBufferFieldOperands (WalkState, Op);
640            break;
641
642
643        case AML_TYPE_NAMED_FIELD:
644        case AML_TYPE_NAMED_COMPLEX:
645        case AML_TYPE_NAMED_SIMPLE:
646
647            Status = AcpiDsLoad2EndOp (WalkState);
648            if (ACPI_FAILURE (Status))
649            {
650                break;
651            }
652
653            if (Op->Opcode == AML_REGION_OP)
654            {
655                ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
656                    "Executing OpRegion Address/Length Op=%p\n", Op));
657
658                Status = AcpiDsEvalRegionOperands (WalkState, Op);
659                if (ACPI_FAILURE (Status))
660                {
661                    break;
662                }
663
664                Status = AcpiDsResultStackPop (WalkState);
665            }
666
667            break;
668
669        case AML_TYPE_UNDEFINED:
670
671            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Undefined opcode type Op=%p\n", Op));
672            return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
673            break;
674
675
676        case AML_TYPE_BOGUS:
677            ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Internal opcode=%X type Op=%p\n",
678                WalkState->Opcode, Op));
679            break;
680
681        default:
682
683            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
684                "Unimplemented opcode, class=%X type=%X Opcode=%X Op=%p\n",
685                OpClass, OpType, Op->Opcode, Op));
686
687            Status = AE_NOT_IMPLEMENTED;
688            break;
689        }
690    }
691
692    /*
693     * ACPI 2.0 support for 64-bit integers:
694     * Truncate numeric result value if we are executing from a 32-bit ACPI table
695     */
696    AcpiExTruncateFor32bitTable (WalkState->ResultObj, WalkState);
697
698    /*
699     * Check if we just completed the evaluation of a
700     * conditional predicate
701     */
702
703    if ((WalkState->ControlState) &&
704        (WalkState->ControlState->Common.State ==
705            CONTROL_PREDICATE_EXECUTING) &&
706        (WalkState->ControlState->Control.PredicateOp == Op))
707    {
708        Status = AcpiDsGetPredicateValue (WalkState, (UINT32) WalkState->ResultObj);
709        WalkState->ResultObj = NULL;
710    }
711
712
713Cleanup:
714    if (WalkState->ResultObj)
715    {
716        /* Break to debugger to display result */
717
718        DEBUGGER_EXEC (AcpiDbDisplayResultObject (WalkState->ResultObj, WalkState));
719
720        /*
721         * Delete the result op if and only if:
722         * Parent will not use the result -- such as any
723         * non-nested type2 op in a method (parent will be method)
724         */
725        AcpiDsDeleteResultIfNotUsed (Op, WalkState->ResultObj, WalkState);
726    }
727
728    /* Always clear the object stack */
729
730    /* TBD: [Investigate] Clear stack of return value,
731    but don't delete it */
732    WalkState->NumOperands = 0;
733
734    return_ACPI_STATUS (Status);
735}
736
737
738