exresop.c revision 91116
1
2/******************************************************************************
3 *
4 * Module Name: exresop - AML Interpreter operand/object resolution
5 *              $Revision: 47 $
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999 - 2002, 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 __EXRESOP_C__
119
120#include "acpi.h"
121#include "amlcode.h"
122#include "acparser.h"
123#include "acdispat.h"
124#include "acinterp.h"
125#include "acnamesp.h"
126#include "actables.h"
127#include "acevents.h"
128
129
130#define _COMPONENT          ACPI_EXECUTER
131        ACPI_MODULE_NAME    ("exresop")
132
133
134/*******************************************************************************
135 *
136 * FUNCTION:    AcpiExCheckObjectType
137 *
138 * PARAMETERS:  TypeNeeded          Object type needed
139 *              ThisType            Actual object type
140 *              Object              Object pointer
141 *
142 * RETURN:      Status
143 *
144 * DESCRIPTION: Check required type against actual type
145 *
146 ******************************************************************************/
147
148ACPI_STATUS
149AcpiExCheckObjectType (
150    ACPI_OBJECT_TYPE        TypeNeeded,
151    ACPI_OBJECT_TYPE        ThisType,
152    void                    *Object)
153{
154    ACPI_FUNCTION_NAME ("ExCheckObjectType");
155
156
157    if (TypeNeeded == ACPI_TYPE_ANY)
158    {
159        /* All types OK, so we don't perform any typechecks */
160
161        return (AE_OK);
162    }
163
164    if (TypeNeeded != ThisType)
165    {
166        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
167            "Needed [%s], found [%s] %p\n",
168            AcpiUtGetTypeName (TypeNeeded),
169            AcpiUtGetTypeName (ThisType), Object));
170
171        return (AE_AML_OPERAND_TYPE);
172    }
173
174    return (AE_OK);
175}
176
177
178/*******************************************************************************
179 *
180 * FUNCTION:    AcpiExResolveOperands
181 *
182 * PARAMETERS:  Opcode              - Opcode being interpreted
183 *              StackPtr            - Pointer to the operand stack to be
184 *                                    resolved
185 *              WalkState           - Current stateu
186 *
187 * RETURN:      Status
188 *
189 * DESCRIPTION: Convert multiple input operands to the types required by the
190 *              target operator.
191 *
192 *      Each nibble (actually 5 bits)  in ArgTypes represents one required
193 *      operand and indicates the required Type:
194 *
195 *      The corresponding operand will be converted to the required type if
196 *      possible, otherwise we abort with an exception.
197 *
198 ******************************************************************************/
199
200ACPI_STATUS
201AcpiExResolveOperands (
202    UINT16                  Opcode,
203    ACPI_OPERAND_OBJECT     **StackPtr,
204    ACPI_WALK_STATE         *WalkState)
205{
206    ACPI_OPERAND_OBJECT     *ObjDesc;
207    ACPI_STATUS             Status = AE_OK;
208    UINT8                   ObjectType;
209    void                    *TempNode;
210    UINT32                  ArgTypes;
211    const ACPI_OPCODE_INFO  *OpInfo;
212    UINT32                  ThisArgType;
213    ACPI_OBJECT_TYPE        TypeNeeded;
214
215
216    ACPI_FUNCTION_TRACE_U32 ("ExResolveOperands", Opcode);
217
218
219    OpInfo = AcpiPsGetOpcodeInfo (Opcode);
220    if (OpInfo->Class == AML_CLASS_UNKNOWN)
221    {
222        return_ACPI_STATUS (AE_AML_BAD_OPCODE);
223    }
224
225    ArgTypes = OpInfo->RuntimeArgs;
226    if (ArgTypes == ARGI_INVALID_OPCODE)
227    {
228        ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Internal - %X is not a valid AML opcode\n",
229            Opcode));
230
231        return_ACPI_STATUS (AE_AML_INTERNAL);
232    }
233
234    ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode %X OperandTypes=%X \n",
235        Opcode, ArgTypes));
236
237    /*
238     * Normal exit is with (ArgTypes == 0) at end of argument list.
239     * Function will return an exception from within the loop upon
240     * finding an entry which is not (or cannot be converted
241     * to) the required type; if stack underflows; or upon
242     * finding a NULL stack entry (which should not happen).
243     */
244    while (GET_CURRENT_ARG_TYPE (ArgTypes))
245    {
246        if (!StackPtr || !*StackPtr)
247        {
248            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Internal - null stack entry at %p\n",
249                StackPtr));
250
251            return_ACPI_STATUS (AE_AML_INTERNAL);
252        }
253
254        /* Extract useful items */
255
256        ObjDesc = *StackPtr;
257
258        /* Decode the descriptor type */
259
260        switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc))
261        {
262        case ACPI_DESC_TYPE_NAMED:
263
264            /* Node */
265
266            ObjectType = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
267            break;
268
269
270        case ACPI_DESC_TYPE_INTERNAL:
271
272            /* ACPI internal object */
273
274            ObjectType = ObjDesc->Common.Type;
275
276            /* Check for bad ACPI_OBJECT_TYPE */
277
278            if (!AcpiExValidateObjectType (ObjectType))
279            {
280                ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Bad operand object type [%X]\n",
281                    ObjectType));
282
283                return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
284            }
285
286            if (ObjectType == (UINT8) INTERNAL_TYPE_REFERENCE)
287            {
288                /*
289                 * Decode the Reference
290                 */
291                OpInfo = AcpiPsGetOpcodeInfo (Opcode);
292                if (OpInfo->Class == AML_CLASS_UNKNOWN)
293                {
294                    return_ACPI_STATUS (AE_AML_BAD_OPCODE);
295                }
296
297                switch (ObjDesc->Reference.Opcode)
298                {
299                case AML_ZERO_OP:
300                case AML_ONE_OP:
301                case AML_ONES_OP:
302                case AML_DEBUG_OP:
303                case AML_NAME_OP:
304                case AML_INDEX_OP:
305                case AML_ARG_OP:
306                case AML_LOCAL_OP:
307                case AML_REVISION_OP:
308
309                    ACPI_DEBUG_ONLY_MEMBERS (ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
310                        "Reference Opcode: %s\n", OpInfo->Name)));
311                    break;
312
313                default:
314                    ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
315                        "Reference Opcode: Unknown [%02x]\n",
316                        ObjDesc->Reference.Opcode));
317
318                    return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
319                }
320            }
321            break;
322
323
324        default:
325
326            /* Invalid descriptor */
327
328            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
329                "Bad descriptor type %X in Obj %p\n",
330                ACPI_GET_DESCRIPTOR_TYPE (ObjDesc), ObjDesc));
331
332            return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
333        }
334
335
336        /*
337         * Get one argument type, point to the next
338         */
339        ThisArgType = GET_CURRENT_ARG_TYPE (ArgTypes);
340        INCREMENT_ARG_LIST (ArgTypes);
341
342        /*
343         * Handle cases where the object does not need to be
344         * resolved to a value
345         */
346        switch (ThisArgType)
347        {
348        case ARGI_REF_OR_STRING:        /* Can be a String or Reference */
349
350            if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_INTERNAL) &&
351                (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_STRING))
352            {
353                /*
354                 * String found - the string references a named object and must be
355                 * resolved to a node
356                 */
357                goto NextOperand;
358            }
359
360            /* Else not a string - fall through to the normal Reference case below */
361
362        case ARGI_REFERENCE:            /* References: */
363        case ARGI_INTEGER_REF:
364        case ARGI_OBJECT_REF:
365        case ARGI_DEVICE_REF:
366        case ARGI_TARGETREF:            /* Allows implicit conversion rules before store */
367        case ARGI_FIXED_TARGET:         /* No implicit conversion before store to target */
368        case ARGI_SIMPLE_TARGET:        /* Name, Local, or Arg - no implicit conversion  */
369
370            /* Need an operand of type INTERNAL_TYPE_REFERENCE */
371
372            if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED) /* Node (name) ptr OK as-is */
373            {
374                goto NextOperand;
375            }
376
377            Status = AcpiExCheckObjectType (INTERNAL_TYPE_REFERENCE,
378                            ObjectType, ObjDesc);
379            if (ACPI_FAILURE (Status))
380            {
381                return_ACPI_STATUS (Status);
382            }
383
384            if (AML_NAME_OP == ObjDesc->Reference.Opcode)
385            {
386                /*
387                 * Convert an indirect name ptr to direct name ptr and put
388                 * it on the stack
389                 */
390                TempNode = ObjDesc->Reference.Object;
391                AcpiUtRemoveReference (ObjDesc);
392                (*StackPtr) = TempNode;
393            }
394            goto NextOperand;
395
396
397        case ARGI_ANYTYPE:
398
399            /*
400             * We don't want to resolve IndexOp reference objects during
401             * a store because this would be an implicit DeRefOf operation.
402             * Instead, we just want to store the reference object.
403             * -- All others must be resolved below.
404             */
405            if ((Opcode == AML_STORE_OP) &&
406                ((*StackPtr)->Common.Type == INTERNAL_TYPE_REFERENCE) &&
407                ((*StackPtr)->Reference.Opcode == AML_INDEX_OP))
408            {
409                goto NextOperand;
410            }
411            break;
412        }
413
414
415        /*
416         * Resolve this object to a value
417         */
418        Status = AcpiExResolveToValue (StackPtr, WalkState);
419        if (ACPI_FAILURE (Status))
420        {
421            return_ACPI_STATUS (Status);
422        }
423
424        /*
425         * Check the resulting object (value) type
426         */
427        switch (ThisArgType)
428        {
429        /*
430         * For the simple cases, only one type of resolved object
431         * is allowed
432         */
433        case ARGI_MUTEX:
434
435            /* Need an operand of type ACPI_TYPE_MUTEX */
436
437            TypeNeeded = ACPI_TYPE_MUTEX;
438            break;
439
440        case ARGI_EVENT:
441
442            /* Need an operand of type ACPI_TYPE_EVENT */
443
444            TypeNeeded = ACPI_TYPE_EVENT;
445            break;
446
447        case ARGI_REGION:
448
449            /* Need an operand of type ACPI_TYPE_REGION */
450
451            TypeNeeded = ACPI_TYPE_REGION;
452            break;
453
454        case ARGI_IF:   /* If */
455
456            /* Need an operand of type INTERNAL_TYPE_IF */
457
458            TypeNeeded = INTERNAL_TYPE_IF;
459            break;
460
461        case ARGI_PACKAGE:   /* Package */
462
463            /* Need an operand of type ACPI_TYPE_PACKAGE */
464
465            TypeNeeded = ACPI_TYPE_PACKAGE;
466            break;
467
468        case ARGI_ANYTYPE:
469
470            /* Any operand type will do */
471
472            TypeNeeded = ACPI_TYPE_ANY;
473            break;
474
475
476        /*
477         * The more complex cases allow multiple resolved object types
478         */
479        case ARGI_INTEGER:   /* Number */
480
481            /*
482             * Need an operand of type ACPI_TYPE_INTEGER,
483             * But we can implicitly convert from a STRING or BUFFER
484             */
485            Status = AcpiExConvertToInteger (*StackPtr, StackPtr, WalkState);
486            if (ACPI_FAILURE (Status))
487            {
488                if (Status == AE_TYPE)
489                {
490                    ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
491                        "Needed [Integer/String/Buffer], found [%s] %p\n",
492                        AcpiUtGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
493
494                    return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
495                }
496
497                return_ACPI_STATUS (Status);
498            }
499            goto NextOperand;
500
501
502        case ARGI_BUFFER:
503
504            /*
505             * Need an operand of type ACPI_TYPE_BUFFER,
506             * But we can implicitly convert from a STRING or INTEGER
507             */
508            Status = AcpiExConvertToBuffer (*StackPtr, StackPtr, WalkState);
509            if (ACPI_FAILURE (Status))
510            {
511                if (Status == AE_TYPE)
512                {
513                    ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
514                        "Needed [Integer/String/Buffer], found [%s] %p\n",
515                        AcpiUtGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
516
517                    return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
518                }
519
520                return_ACPI_STATUS (Status);
521            }
522            goto NextOperand;
523
524
525        case ARGI_STRING:
526
527            /*
528             * Need an operand of type ACPI_TYPE_STRING,
529             * But we can implicitly convert from a BUFFER or INTEGER
530             */
531            Status = AcpiExConvertToString (*StackPtr, StackPtr, 16, ACPI_UINT32_MAX, WalkState);
532            if (ACPI_FAILURE (Status))
533            {
534                if (Status == AE_TYPE)
535                {
536                    ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
537                        "Needed [Integer/String/Buffer], found [%s] %p\n",
538                        AcpiUtGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
539
540                    return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
541                }
542
543                return_ACPI_STATUS (Status);
544            }
545            goto NextOperand;
546
547
548        case ARGI_COMPUTEDATA:
549
550            /* Need an operand of type INTEGER, STRING or BUFFER */
551
552            switch ((*StackPtr)->Common.Type)
553            {
554            case ACPI_TYPE_INTEGER:
555            case ACPI_TYPE_STRING:
556            case ACPI_TYPE_BUFFER:
557
558                /* Valid operand */
559               break;
560
561            default:
562                ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
563                    "Needed [Integer/String/Buffer], found [%s] %p\n",
564                    AcpiUtGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
565
566                return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
567            }
568            goto NextOperand;
569
570
571        case ARGI_DATAOBJECT:
572            /*
573             * ARGI_DATAOBJECT is only used by the SizeOf operator.
574             * Need a buffer, string, package, or Node reference.
575             *
576             * The only reference allowed here is a direct reference to
577             * a namespace node.
578             */
579            if ((*StackPtr)->Common.Type == INTERNAL_TYPE_REFERENCE)
580            {
581                if (!(*StackPtr)->Reference.Node)
582                {
583                    ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
584                        "Needed [Node Reference], found [%p]\n",
585                        *StackPtr));
586
587                    return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
588                }
589
590                /* Get the object attached to the node */
591
592                TempNode = AcpiNsGetAttachedObject ((*StackPtr)->Reference.Node);
593                if (!TempNode)
594                {
595                    ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
596                        "Node [%p] has no attached object\n",
597                        (*StackPtr)->Reference.Node));
598
599                    return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
600                }
601
602                /*
603                 * Swap the reference object with the node's object.  Must add
604                 * a reference to the node object, and remove a reference from
605                 * the original reference object.
606                 */
607                AcpiUtAddReference (TempNode);
608                AcpiUtRemoveReference (*StackPtr);
609                (*StackPtr) = TempNode;
610            }
611
612            /* Need a buffer, string, package */
613
614            switch ((*StackPtr)->Common.Type)
615            {
616            case ACPI_TYPE_PACKAGE:
617            case ACPI_TYPE_STRING:
618            case ACPI_TYPE_BUFFER:
619
620                /* Valid operand */
621                break;
622
623            default:
624                ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
625                    "Needed [Buf/Str/Pkg], found [%s] %p\n",
626                    AcpiUtGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
627
628                return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
629            }
630            goto NextOperand;
631
632
633        case ARGI_COMPLEXOBJ:
634
635            /* Need a buffer or package or (ACPI 2.0) String */
636
637            switch ((*StackPtr)->Common.Type)
638            {
639            case ACPI_TYPE_PACKAGE:
640            case ACPI_TYPE_STRING:
641            case ACPI_TYPE_BUFFER:
642
643                /* Valid operand */
644                break;
645
646            default:
647                ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
648                    "Needed [Buf/Str/Pkg], found [%s] %p\n",
649                    AcpiUtGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
650
651                return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
652            }
653            goto NextOperand;
654
655
656        default:
657
658            /* Unknown type */
659
660            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
661                "Internal - Unknown ARGI type %X\n",
662                ThisArgType));
663
664            return_ACPI_STATUS (AE_BAD_PARAMETER);
665        }
666
667        /*
668         * Make sure that the original object was resolved to the
669         * required object type (Simple cases only).
670         */
671        Status = AcpiExCheckObjectType (TypeNeeded,
672                        (*StackPtr)->Common.Type, *StackPtr);
673        if (ACPI_FAILURE (Status))
674        {
675            return_ACPI_STATUS (Status);
676        }
677
678NextOperand:
679        /*
680         * If more operands needed, decrement StackPtr to point
681         * to next operand on stack
682         */
683        if (GET_CURRENT_ARG_TYPE (ArgTypes))
684        {
685            StackPtr--;
686        }
687
688    }   /* while (*Types) */
689
690    return_ACPI_STATUS (Status);
691}
692
693
694