Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/drivers/acpica/exresolv.c need to be fixed.

0001 
0002 /******************************************************************************
0003  *
0004  * Module Name: exresolv - AML Interpreter object resolution
0005  *
0006  *****************************************************************************/
0007 
0008 /******************************************************************************
0009  *
0010  * 1. Copyright Notice
0011  *
0012  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
0013  * All rights reserved.
0014  *
0015  * 2. License
0016  *
0017  * 2.1. This is your license from Intel Corp. under its intellectual property
0018  * rights.  You may have additional license terms from the party that provided
0019  * you this software, covering your right to use that party's intellectual
0020  * property rights.
0021  *
0022  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0023  * copy of the source code appearing in this file ("Covered Code") an
0024  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0025  * base code distributed originally by Intel ("Original Intel Code") to copy,
0026  * make derivatives, distribute, use and display any portion of the Covered
0027  * Code in any form, with the right to sublicense such rights; and
0028  *
0029  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0030  * license (with the right to sublicense), under only those claims of Intel
0031  * patents that are infringed by the Original Intel Code, to make, use, sell,
0032  * offer to sell, and import the Covered Code and derivative works thereof
0033  * solely to the minimum extent necessary to exercise the above copyright
0034  * license, and in no event shall the patent license extend to any additions
0035  * to or modifications of the Original Intel Code.  No other license or right
0036  * is granted directly or by implication, estoppel or otherwise;
0037  *
0038  * The above copyright and patent license is granted only if the following
0039  * conditions are met:
0040  *
0041  * 3. Conditions
0042  *
0043  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0044  * Redistribution of source code of any substantial portion of the Covered
0045  * Code or modification with rights to further distribute source must include
0046  * the above Copyright Notice, the above License, this list of Conditions,
0047  * and the following Disclaimer and Export Compliance provision.  In addition,
0048  * Licensee must cause all Covered Code to which Licensee contributes to
0049  * contain a file documenting the changes Licensee made to create that Covered
0050  * Code and the date of any change.  Licensee must include in that file the
0051  * documentation of any changes made by any predecessor Licensee.  Licensee
0052  * must include a prominent statement that the modification is derived,
0053  * directly or indirectly, from Original Intel Code.
0054  *
0055  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0056  * Redistribution of source code of any substantial portion of the Covered
0057  * Code or modification without rights to further distribute source must
0058  * include the following Disclaimer and Export Compliance provision in the
0059  * documentation and/or other materials provided with distribution.  In
0060  * addition, Licensee may not authorize further sublicense of source of any
0061  * portion of the Covered Code, and must include terms to the effect that the
0062  * license from Licensee to its licensee is limited to the intellectual
0063  * property embodied in the software Licensee provides to its licensee, and
0064  * not to intellectual property embodied in modifications its licensee may
0065  * make.
0066  *
0067  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0068  * substantial portion of the Covered Code or modification must reproduce the
0069  * above Copyright Notice, and the following Disclaimer and Export Compliance
0070  * provision in the documentation and/or other materials provided with the
0071  * distribution.
0072  *
0073  * 3.4. Intel retains all right, title, and interest in and to the Original
0074  * Intel Code.
0075  *
0076  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0077  * Intel shall be used in advertising or otherwise to promote the sale, use or
0078  * other dealings in products derived from or relating to the Covered Code
0079  * without prior written authorization from Intel.
0080  *
0081  * 4. Disclaimer and Export Compliance
0082  *
0083  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0084  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0085  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
0086  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
0087  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
0088  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0089  * PARTICULAR PURPOSE.
0090  *
0091  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0092  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0093  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0094  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0095  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0096  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
0097  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0098  * LIMITED REMEDY.
0099  *
0100  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0101  * software or system incorporating such software without first obtaining any
0102  * required license or other approval from the U. S. Department of Commerce or
0103  * any other agency or department of the United States Government.  In the
0104  * event Licensee exports any such software from the United States or
0105  * re-exports any such software from a foreign destination, Licensee shall
0106  * ensure that the distribution and export/re-export of the software is in
0107  * compliance with all laws, regulations, orders, or other restrictions of the
0108  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0109  * any of its subsidiaries will export/re-export any technical data, process,
0110  * software, or service, directly or indirectly, to any country for which the
0111  * United States government or any agency thereof requires an export license,
0112  * other governmental approval, or letter of assurance, without first obtaining
0113  * such license, approval or letter.
0114  *
0115  *****************************************************************************/
0116 
0117 #define __EXRESOLV_C__
0118 
0119 #include "acpi.h"
0120 #include "accommon.h"
0121 #include "amlcode.h"
0122 #include "acdispat.h"
0123 #include "acinterp.h"
0124 #include "acnamesp.h"
0125 
0126 
0127 #define _COMPONENT          ACPI_EXECUTER
0128         ACPI_MODULE_NAME    ("exresolv")
0129 
0130 /* Local prototypes */
0131 
0132 static ACPI_STATUS
0133 AcpiExResolveObjectToValue (
0134     ACPI_OPERAND_OBJECT     **StackPtr,
0135     ACPI_WALK_STATE         *WalkState);
0136 
0137 
0138 /*******************************************************************************
0139  *
0140  * FUNCTION:    AcpiExResolveToValue
0141  *
0142  * PARAMETERS:  **StackPtr          - Points to entry on ObjStack, which can
0143  *                                    be either an (ACPI_OPERAND_OBJECT *)
0144  *                                    or an ACPI_HANDLE.
0145  *              WalkState           - Current method state
0146  *
0147  * RETURN:      Status
0148  *
0149  * DESCRIPTION: Convert Reference objects to values
0150  *
0151  ******************************************************************************/
0152 
0153 ACPI_STATUS
0154 AcpiExResolveToValue (
0155     ACPI_OPERAND_OBJECT     **StackPtr,
0156     ACPI_WALK_STATE         *WalkState)
0157 {
0158     ACPI_STATUS             Status;
0159 
0160 
0161     ACPI_FUNCTION_TRACE_PTR (ExResolveToValue, StackPtr);
0162 
0163 
0164     if (!StackPtr || !*StackPtr)
0165     {
0166         ACPI_ERROR ((AE_INFO, "Internal - null pointer"));
0167         return_ACPI_STATUS (AE_AML_NO_OPERAND);
0168     }
0169 
0170     /*
0171      * The entity pointed to by the StackPtr can be either
0172      * 1) A valid ACPI_OPERAND_OBJECT, or
0173      * 2) A ACPI_NAMESPACE_NODE (NamedObj)
0174      */
0175     if (ACPI_GET_DESCRIPTOR_TYPE (*StackPtr) == ACPI_DESC_TYPE_OPERAND)
0176     {
0177         Status = AcpiExResolveObjectToValue (StackPtr, WalkState);
0178         if (ACPI_FAILURE (Status))
0179         {
0180             return_ACPI_STATUS (Status);
0181         }
0182 
0183         if (!*StackPtr)
0184         {
0185             ACPI_ERROR ((AE_INFO, "Internal - null pointer"));
0186             return_ACPI_STATUS (AE_AML_NO_OPERAND);
0187         }
0188     }
0189 
0190     /*
0191      * Object on the stack may have changed if AcpiExResolveObjectToValue()
0192      * was called (i.e., we can't use an _else_ here.)
0193      */
0194     if (ACPI_GET_DESCRIPTOR_TYPE (*StackPtr) == ACPI_DESC_TYPE_NAMED)
0195     {
0196         Status = AcpiExResolveNodeToValue (
0197                         ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, StackPtr),
0198                         WalkState);
0199         if (ACPI_FAILURE (Status))
0200         {
0201             return_ACPI_STATUS (Status);
0202         }
0203     }
0204 
0205     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Resolved object %p\n", *StackPtr));
0206     return_ACPI_STATUS (AE_OK);
0207 }
0208 
0209 
0210 /*******************************************************************************
0211  *
0212  * FUNCTION:    AcpiExResolveObjectToValue
0213  *
0214  * PARAMETERS:  StackPtr        - Pointer to an internal object
0215  *              WalkState       - Current method state
0216  *
0217  * RETURN:      Status
0218  *
0219  * DESCRIPTION: Retrieve the value from an internal object. The Reference type
0220  *              uses the associated AML opcode to determine the value.
0221  *
0222  ******************************************************************************/
0223 
0224 static ACPI_STATUS
0225 AcpiExResolveObjectToValue (
0226     ACPI_OPERAND_OBJECT     **StackPtr,
0227     ACPI_WALK_STATE         *WalkState)
0228 {
0229     ACPI_STATUS             Status = AE_OK;
0230     ACPI_OPERAND_OBJECT     *StackDesc;
0231     ACPI_OPERAND_OBJECT     *ObjDesc = NULL;
0232     UINT8                   RefType;
0233 
0234 
0235     ACPI_FUNCTION_TRACE (ExResolveObjectToValue);
0236 
0237 
0238     StackDesc = *StackPtr;
0239 
0240     /* This is an ACPI_OPERAND_OBJECT  */
0241 
0242     switch (StackDesc->Common.Type)
0243     {
0244     case ACPI_TYPE_LOCAL_REFERENCE:
0245 
0246         RefType = StackDesc->Reference.Class;
0247 
0248         switch (RefType)
0249         {
0250         case ACPI_REFCLASS_LOCAL:
0251         case ACPI_REFCLASS_ARG:
0252 
0253             /*
0254              * Get the local from the method's state info
0255              * Note: this increments the local's object reference count
0256              */
0257             Status = AcpiDsMethodDataGetValue (RefType,
0258                             StackDesc->Reference.Value, WalkState, &ObjDesc);
0259             if (ACPI_FAILURE (Status))
0260             {
0261                 return_ACPI_STATUS (Status);
0262             }
0263 
0264             ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Arg/Local %X] ValueObj is %p\n",
0265                 StackDesc->Reference.Value, ObjDesc));
0266 
0267             /*
0268              * Now we can delete the original Reference Object and
0269              * replace it with the resolved value
0270              */
0271             AcpiUtRemoveReference (StackDesc);
0272             *StackPtr = ObjDesc;
0273             break;
0274 
0275 
0276         case ACPI_REFCLASS_INDEX:
0277 
0278             switch (StackDesc->Reference.TargetType)
0279             {
0280             case ACPI_TYPE_BUFFER_FIELD:
0281 
0282                 /* Just return - do not dereference */
0283                 break;
0284 
0285 
0286             case ACPI_TYPE_PACKAGE:
0287 
0288                 /* If method call or CopyObject - do not dereference */
0289 
0290                 if ((WalkState->Opcode == AML_INT_METHODCALL_OP) ||
0291                     (WalkState->Opcode == AML_COPY_OP))
0292                 {
0293                     break;
0294                 }
0295 
0296                 /* Otherwise, dereference the PackageIndex to a package element */
0297 
0298                 ObjDesc = *StackDesc->Reference.Where;
0299                 if (ObjDesc)
0300                 {
0301                     /*
0302                      * Valid object descriptor, copy pointer to return value
0303                      * (i.e., dereference the package index)
0304                      * Delete the ref object, increment the returned object
0305                      */
0306                     AcpiUtRemoveReference (StackDesc);
0307                     AcpiUtAddReference (ObjDesc);
0308                     *StackPtr = ObjDesc;
0309                 }
0310                 else
0311                 {
0312                     /*
0313                      * A NULL object descriptor means an uninitialized element of
0314                      * the package, can't dereference it
0315                      */
0316                     ACPI_ERROR ((AE_INFO,
0317                         "Attempt to dereference an Index to NULL package element Idx=%p",
0318                         StackDesc));
0319                     Status = AE_AML_UNINITIALIZED_ELEMENT;
0320                 }
0321                 break;
0322 
0323 
0324             default:
0325 
0326                 /* Invalid reference object */
0327 
0328                 ACPI_ERROR ((AE_INFO,
0329                     "Unknown TargetType %X in Index/Reference object %p",
0330                     StackDesc->Reference.TargetType, StackDesc));
0331                 Status = AE_AML_INTERNAL;
0332                 break;
0333             }
0334             break;
0335 
0336 
0337         case ACPI_REFCLASS_REFOF:
0338         case ACPI_REFCLASS_DEBUG:
0339         case ACPI_REFCLASS_TABLE:
0340 
0341             /* Just leave the object as-is, do not dereference */
0342 
0343             break;
0344 
0345         case ACPI_REFCLASS_NAME:   /* Reference to a named object */
0346 
0347             /* Dereference the name */
0348 
0349             if ((StackDesc->Reference.Node->Type == ACPI_TYPE_DEVICE) ||
0350                 (StackDesc->Reference.Node->Type == ACPI_TYPE_THERMAL))
0351             {
0352                 /* These node types do not have 'real' subobjects */
0353 
0354                 *StackPtr = (void *) StackDesc->Reference.Node;
0355             }
0356             else
0357             {
0358                 /* Get the object pointed to by the namespace node */
0359 
0360                 *StackPtr = (StackDesc->Reference.Node)->Object;
0361                 AcpiUtAddReference (*StackPtr);
0362             }
0363 
0364             AcpiUtRemoveReference (StackDesc);
0365             break;
0366 
0367         default:
0368 
0369             ACPI_ERROR ((AE_INFO,
0370                 "Unknown Reference type %X in %p", RefType, StackDesc));
0371             Status = AE_AML_INTERNAL;
0372             break;
0373         }
0374         break;
0375 
0376 
0377     case ACPI_TYPE_BUFFER:
0378 
0379         Status = AcpiDsGetBufferArguments (StackDesc);
0380         break;
0381 
0382 
0383     case ACPI_TYPE_PACKAGE:
0384 
0385         Status = AcpiDsGetPackageArguments (StackDesc);
0386         break;
0387 
0388 
0389     case ACPI_TYPE_BUFFER_FIELD:
0390     case ACPI_TYPE_LOCAL_REGION_FIELD:
0391     case ACPI_TYPE_LOCAL_BANK_FIELD:
0392     case ACPI_TYPE_LOCAL_INDEX_FIELD:
0393 
0394         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "FieldRead SourceDesc=%p Type=%X\n",
0395             StackDesc, StackDesc->Common.Type));
0396 
0397         Status = AcpiExReadDataFromField (WalkState, StackDesc, &ObjDesc);
0398 
0399         /* Remove a reference to the original operand, then override */
0400 
0401         AcpiUtRemoveReference (*StackPtr);
0402         *StackPtr = (void *) ObjDesc;
0403         break;
0404 
0405     default:
0406         break;
0407     }
0408 
0409     return_ACPI_STATUS (Status);
0410 }
0411 
0412 
0413 /*******************************************************************************
0414  *
0415  * FUNCTION:    AcpiExResolveMultiple
0416  *
0417  * PARAMETERS:  WalkState           - Current state (contains AML opcode)
0418  *              Operand             - Starting point for resolution
0419  *              ReturnType          - Where the object type is returned
0420  *              ReturnDesc          - Where the resolved object is returned
0421  *
0422  * RETURN:      Status
0423  *
0424  * DESCRIPTION: Return the base object and type.  Traverse a reference list if
0425  *              necessary to get to the base object.
0426  *
0427  ******************************************************************************/
0428 
0429 ACPI_STATUS
0430 AcpiExResolveMultiple (
0431     ACPI_WALK_STATE         *WalkState,
0432     ACPI_OPERAND_OBJECT     *Operand,
0433     ACPI_OBJECT_TYPE        *ReturnType,
0434     ACPI_OPERAND_OBJECT     **ReturnDesc)
0435 {
0436     ACPI_OPERAND_OBJECT     *ObjDesc = (void *) Operand;
0437     ACPI_NAMESPACE_NODE     *Node;
0438     ACPI_OBJECT_TYPE        Type;
0439     ACPI_STATUS             Status;
0440 
0441 
0442     ACPI_FUNCTION_TRACE (AcpiExResolveMultiple);
0443 
0444 
0445     /* Operand can be either a namespace node or an operand descriptor */
0446 
0447     switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc))
0448     {
0449     case ACPI_DESC_TYPE_OPERAND:
0450         Type = ObjDesc->Common.Type;
0451         break;
0452 
0453     case ACPI_DESC_TYPE_NAMED:
0454         Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
0455         ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
0456 
0457         /* If we had an Alias node, use the attached object for type info */
0458 
0459         if (Type == ACPI_TYPE_LOCAL_ALIAS)
0460         {
0461             Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
0462             ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
0463         }
0464         break;
0465 
0466     default:
0467         return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
0468     }
0469 
0470     /* If type is anything other than a reference, we are done */
0471 
0472     if (Type != ACPI_TYPE_LOCAL_REFERENCE)
0473     {
0474         goto Exit;
0475     }
0476 
0477     /*
0478      * For reference objects created via the RefOf, Index, or Load/LoadTable
0479      * operators, we need to get to the base object (as per the ACPI
0480      * specification of the ObjectType and SizeOf operators). This means
0481      * traversing the list of possibly many nested references.
0482      */
0483     while (ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE)
0484     {
0485         switch (ObjDesc->Reference.Class)
0486         {
0487         case ACPI_REFCLASS_REFOF:
0488         case ACPI_REFCLASS_NAME:
0489 
0490             /* Dereference the reference pointer */
0491 
0492             if (ObjDesc->Reference.Class == ACPI_REFCLASS_REFOF)
0493             {
0494                 Node = ObjDesc->Reference.Object;
0495             }
0496             else /* AML_INT_NAMEPATH_OP */
0497             {
0498                 Node = ObjDesc->Reference.Node;
0499             }
0500 
0501             /* All "References" point to a NS node */
0502 
0503             if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
0504             {
0505                 ACPI_ERROR ((AE_INFO,
0506                     "Not a NS node %p [%s]",
0507                     Node, AcpiUtGetDescriptorName (Node)));
0508                 return_ACPI_STATUS (AE_AML_INTERNAL);
0509             }
0510 
0511             /* Get the attached object */
0512 
0513             ObjDesc = AcpiNsGetAttachedObject (Node);
0514             if (!ObjDesc)
0515             {
0516                 /* No object, use the NS node type */
0517 
0518                 Type = AcpiNsGetType (Node);
0519                 goto Exit;
0520             }
0521 
0522             /* Check for circular references */
0523 
0524             if (ObjDesc == Operand)
0525             {
0526                 return_ACPI_STATUS (AE_AML_CIRCULAR_REFERENCE);
0527             }
0528             break;
0529 
0530 
0531         case ACPI_REFCLASS_INDEX:
0532 
0533             /* Get the type of this reference (index into another object) */
0534 
0535             Type = ObjDesc->Reference.TargetType;
0536             if (Type != ACPI_TYPE_PACKAGE)
0537             {
0538                 goto Exit;
0539             }
0540 
0541             /*
0542              * The main object is a package, we want to get the type
0543              * of the individual package element that is referenced by
0544              * the index.
0545              *
0546              * This could of course in turn be another reference object.
0547              */
0548             ObjDesc = *(ObjDesc->Reference.Where);
0549             if (!ObjDesc)
0550             {
0551                 /* NULL package elements are allowed */
0552 
0553                 Type = 0; /* Uninitialized */
0554                 goto Exit;
0555             }
0556             break;
0557 
0558 
0559         case ACPI_REFCLASS_TABLE:
0560 
0561             Type = ACPI_TYPE_DDB_HANDLE;
0562             goto Exit;
0563 
0564 
0565         case ACPI_REFCLASS_LOCAL:
0566         case ACPI_REFCLASS_ARG:
0567 
0568             if (ReturnDesc)
0569             {
0570                 Status = AcpiDsMethodDataGetValue (ObjDesc->Reference.Class,
0571                             ObjDesc->Reference.Value, WalkState, &ObjDesc);
0572                 if (ACPI_FAILURE (Status))
0573                 {
0574                     return_ACPI_STATUS (Status);
0575                 }
0576                 AcpiUtRemoveReference (ObjDesc);
0577             }
0578             else
0579             {
0580                 Status = AcpiDsMethodDataGetNode (ObjDesc->Reference.Class,
0581                             ObjDesc->Reference.Value, WalkState, &Node);
0582                 if (ACPI_FAILURE (Status))
0583                 {
0584                     return_ACPI_STATUS (Status);
0585                 }
0586 
0587                 ObjDesc = AcpiNsGetAttachedObject (Node);
0588                 if (!ObjDesc)
0589                 {
0590                     Type = ACPI_TYPE_ANY;
0591                     goto Exit;
0592                 }
0593             }
0594             break;
0595 
0596 
0597         case ACPI_REFCLASS_DEBUG:
0598 
0599             /* The Debug Object is of type "DebugObject" */
0600 
0601             Type = ACPI_TYPE_DEBUG_OBJECT;
0602             goto Exit;
0603 
0604 
0605         default:
0606 
0607             ACPI_ERROR ((AE_INFO,
0608                 "Unknown Reference Class %2.2X", ObjDesc->Reference.Class));
0609             return_ACPI_STATUS (AE_AML_INTERNAL);
0610         }
0611     }
0612 
0613     /*
0614      * Now we are guaranteed to have an object that has not been created
0615      * via the RefOf or Index operators.
0616      */
0617     Type = ObjDesc->Common.Type;
0618 
0619 
0620 Exit:
0621     /* Convert internal types to external types */
0622 
0623     switch (Type)
0624     {
0625     case ACPI_TYPE_LOCAL_REGION_FIELD:
0626     case ACPI_TYPE_LOCAL_BANK_FIELD:
0627     case ACPI_TYPE_LOCAL_INDEX_FIELD:
0628 
0629         Type = ACPI_TYPE_FIELD_UNIT;
0630         break;
0631 
0632     case ACPI_TYPE_LOCAL_SCOPE:
0633 
0634         /* Per ACPI Specification, Scope is untyped */
0635 
0636         Type = ACPI_TYPE_ANY;
0637         break;
0638 
0639     default:
0640         /* No change to Type required */
0641         break;
0642     }
0643 
0644     *ReturnType = Type;
0645     if (ReturnDesc)
0646     {
0647         *ReturnDesc = ObjDesc;
0648     }
0649     return_ACPI_STATUS (AE_OK);
0650 }
0651 
0652