Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:03

0001 /*******************************************************************************
0002  *
0003  * Module Name: nsobject - Utilities for objects attached to namespace
0004  *                         table entries
0005  *
0006  ******************************************************************************/
0007 
0008 /******************************************************************************
0009  *
0010  * 1. Copyright Notice
0011  *
0012  * Some or all of this work - Copyright (c) 1999 - 2024, 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  * Alternatively, you may choose to be licensed under the terms of the
0118  * following license:
0119  *
0120  * Redistribution and use in source and binary forms, with or without
0121  * modification, are permitted provided that the following conditions
0122  * are met:
0123  * 1. Redistributions of source code must retain the above copyright
0124  *    notice, this list of conditions, and the following disclaimer,
0125  *    without modification.
0126  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
0127  *    substantially similar to the "NO WARRANTY" disclaimer below
0128  *    ("Disclaimer") and any redistribution must be conditioned upon
0129  *    including a substantially similar Disclaimer requirement for further
0130  *    binary redistribution.
0131  * 3. Neither the names of the above-listed copyright holders nor the names
0132  *    of any contributors may be used to endorse or promote products derived
0133  *    from this software without specific prior written permission.
0134  *
0135  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0136  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0137  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0138  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0139  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0140  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0141  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0142  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0143  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0144  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0145  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0146  *
0147  * Alternatively, you may choose to be licensed under the terms of the
0148  * GNU General Public License ("GPL") version 2 as published by the Free
0149  * Software Foundation.
0150  *
0151  *****************************************************************************/
0152 
0153 #include "acpi.h"
0154 #include "accommon.h"
0155 #include "acnamesp.h"
0156 
0157 
0158 #define _COMPONENT          ACPI_NAMESPACE
0159         ACPI_MODULE_NAME    ("nsobject")
0160 
0161 
0162 /*******************************************************************************
0163  *
0164  * FUNCTION:    AcpiNsAttachObject
0165  *
0166  * PARAMETERS:  Node                - Parent Node
0167  *              Object              - Object to be attached
0168  *              Type                - Type of object, or ACPI_TYPE_ANY if not
0169  *                                    known
0170  *
0171  * RETURN:      Status
0172  *
0173  * DESCRIPTION: Record the given object as the value associated with the
0174  *              name whose ACPI_HANDLE is passed. If Object is NULL
0175  *              and Type is ACPI_TYPE_ANY, set the name as having no value.
0176  *              Note: Future may require that the Node->Flags field be passed
0177  *              as a parameter.
0178  *
0179  * MUTEX:       Assumes namespace is locked
0180  *
0181  ******************************************************************************/
0182 
0183 ACPI_STATUS
0184 AcpiNsAttachObject (
0185     ACPI_NAMESPACE_NODE     *Node,
0186     ACPI_OPERAND_OBJECT     *Object,
0187     ACPI_OBJECT_TYPE        Type)
0188 {
0189     ACPI_OPERAND_OBJECT     *ObjDesc;
0190     ACPI_OPERAND_OBJECT     *LastObjDesc;
0191     ACPI_OBJECT_TYPE        ObjectType = ACPI_TYPE_ANY;
0192 
0193 
0194     ACPI_FUNCTION_TRACE (NsAttachObject);
0195 
0196 
0197     /*
0198      * Parameter validation
0199      */
0200     if (!Node)
0201     {
0202         /* Invalid handle */
0203 
0204         ACPI_ERROR ((AE_INFO, "Null NamedObj handle"));
0205         return_ACPI_STATUS (AE_BAD_PARAMETER);
0206     }
0207 
0208     if (!Object && (ACPI_TYPE_ANY != Type))
0209     {
0210         /* Null object */
0211 
0212         ACPI_ERROR ((AE_INFO,
0213             "Null object, but type not ACPI_TYPE_ANY"));
0214         return_ACPI_STATUS (AE_BAD_PARAMETER);
0215     }
0216 
0217     if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
0218     {
0219         /* Not a name handle */
0220 
0221         ACPI_ERROR ((AE_INFO, "Invalid handle %p [%s]",
0222             Node, AcpiUtGetDescriptorName (Node)));
0223         return_ACPI_STATUS (AE_BAD_PARAMETER);
0224     }
0225 
0226     /* Check if this object is already attached */
0227 
0228     if (Node->Object == Object)
0229     {
0230         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
0231             "Obj %p already installed in NameObj %p\n",
0232             Object, Node));
0233 
0234         return_ACPI_STATUS (AE_OK);
0235     }
0236 
0237     /* If null object, we will just install it */
0238 
0239     if (!Object)
0240     {
0241         ObjDesc    = NULL;
0242         ObjectType = ACPI_TYPE_ANY;
0243     }
0244 
0245     /*
0246      * If the source object is a namespace Node with an attached object,
0247      * we will use that (attached) object
0248      */
0249     else if ((ACPI_GET_DESCRIPTOR_TYPE (Object) == ACPI_DESC_TYPE_NAMED) &&
0250             ((ACPI_NAMESPACE_NODE *) Object)->Object)
0251     {
0252         /*
0253          * Value passed is a name handle and that name has a
0254          * non-null value. Use that name's value and type.
0255          */
0256         ObjDesc = ((ACPI_NAMESPACE_NODE *) Object)->Object;
0257         ObjectType = ((ACPI_NAMESPACE_NODE *) Object)->Type;
0258     }
0259 
0260     /*
0261      * Otherwise, we will use the parameter object, but we must type
0262      * it first
0263      */
0264     else
0265     {
0266         ObjDesc = (ACPI_OPERAND_OBJECT  *) Object;
0267 
0268         /* Use the given type */
0269 
0270         ObjectType = Type;
0271     }
0272 
0273     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Installing %p into Node %p [%4.4s]\n",
0274         ObjDesc, Node, AcpiUtGetNodeName (Node)));
0275 
0276     /* Detach an existing attached object if present */
0277 
0278     if (Node->Object)
0279     {
0280         AcpiNsDetachObject (Node);
0281     }
0282 
0283     if (ObjDesc)
0284     {
0285         /*
0286          * Must increment the new value's reference count
0287          * (if it is an internal object)
0288          */
0289         AcpiUtAddReference (ObjDesc);
0290 
0291         /*
0292          * Handle objects with multiple descriptors - walk
0293          * to the end of the descriptor list
0294          */
0295         LastObjDesc = ObjDesc;
0296         while (LastObjDesc->Common.NextObject)
0297         {
0298             LastObjDesc = LastObjDesc->Common.NextObject;
0299         }
0300 
0301         /* Install the object at the front of the object list */
0302 
0303         LastObjDesc->Common.NextObject = Node->Object;
0304     }
0305 
0306     Node->Type = (UINT8) ObjectType;
0307     Node->Object = ObjDesc;
0308 
0309     return_ACPI_STATUS (AE_OK);
0310 }
0311 
0312 
0313 /*******************************************************************************
0314  *
0315  * FUNCTION:    AcpiNsDetachObject
0316  *
0317  * PARAMETERS:  Node           - A Namespace node whose object will be detached
0318  *
0319  * RETURN:      None.
0320  *
0321  * DESCRIPTION: Detach/delete an object associated with a namespace node.
0322  *              if the object is an allocated object, it is freed.
0323  *              Otherwise, the field is simply cleared.
0324  *
0325  ******************************************************************************/
0326 
0327 void
0328 AcpiNsDetachObject (
0329     ACPI_NAMESPACE_NODE     *Node)
0330 {
0331     ACPI_OPERAND_OBJECT     *ObjDesc;
0332 
0333 
0334     ACPI_FUNCTION_TRACE (NsDetachObject);
0335 
0336 
0337     ObjDesc = Node->Object;
0338 
0339     if (!ObjDesc ||
0340         (ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA))
0341     {
0342         return_VOID;
0343     }
0344 
0345     if (Node->Flags & ANOBJ_ALLOCATED_BUFFER)
0346     {
0347         /* Free the dynamic aml buffer */
0348 
0349         if (ObjDesc->Common.Type == ACPI_TYPE_METHOD)
0350         {
0351             ACPI_FREE (ObjDesc->Method.AmlStart);
0352         }
0353     }
0354 
0355     if (ObjDesc->Common.Type == ACPI_TYPE_REGION)
0356     {
0357         AcpiUtRemoveAddressRange(ObjDesc->Region.SpaceId, Node);
0358     }
0359 
0360     /* Clear the Node entry in all cases */
0361 
0362     Node->Object = NULL;
0363     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND)
0364     {
0365         /* Unlink object from front of possible object list */
0366 
0367         Node->Object = ObjDesc->Common.NextObject;
0368 
0369         /* Handle possible 2-descriptor object */
0370 
0371         if (Node->Object &&
0372            (Node->Object->Common.Type != ACPI_TYPE_LOCAL_DATA))
0373         {
0374             Node->Object = Node->Object->Common.NextObject;
0375         }
0376 
0377         /*
0378          * Detach the object from any data objects (which are still held by
0379          * the namespace node)
0380          */
0381         if (ObjDesc->Common.NextObject &&
0382            ((ObjDesc->Common.NextObject)->Common.Type == ACPI_TYPE_LOCAL_DATA))
0383         {
0384            ObjDesc->Common.NextObject = NULL;
0385         }
0386     }
0387 
0388     /* Reset the node type to untyped */
0389 
0390     Node->Type = ACPI_TYPE_ANY;
0391 
0392     ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Node %p [%4.4s] Object %p\n",
0393         Node, AcpiUtGetNodeName (Node), ObjDesc));
0394 
0395     /* Remove one reference on the object (and all subobjects) */
0396 
0397     AcpiUtRemoveReference (ObjDesc);
0398     return_VOID;
0399 }
0400 
0401 
0402 /*******************************************************************************
0403  *
0404  * FUNCTION:    AcpiNsGetAttachedObject
0405  *
0406  * PARAMETERS:  Node             - Namespace node
0407  *
0408  * RETURN:      Current value of the object field from the Node whose
0409  *              handle is passed
0410  *
0411  * DESCRIPTION: Obtain the object attached to a namespace node.
0412  *
0413  ******************************************************************************/
0414 
0415 ACPI_OPERAND_OBJECT *
0416 AcpiNsGetAttachedObject (
0417     ACPI_NAMESPACE_NODE     *Node)
0418 {
0419     ACPI_FUNCTION_TRACE_PTR (NsGetAttachedObject, Node);
0420 
0421 
0422     if (!Node)
0423     {
0424         ACPI_WARNING ((AE_INFO, "Null Node ptr"));
0425         return_PTR (NULL);
0426     }
0427 
0428     if (!Node->Object ||
0429             ((ACPI_GET_DESCRIPTOR_TYPE (Node->Object) != ACPI_DESC_TYPE_OPERAND) &&
0430              (ACPI_GET_DESCRIPTOR_TYPE (Node->Object) != ACPI_DESC_TYPE_NAMED))  ||
0431         ((Node->Object)->Common.Type == ACPI_TYPE_LOCAL_DATA))
0432     {
0433         return_PTR (NULL);
0434     }
0435 
0436     return_PTR (Node->Object);
0437 }
0438 
0439 
0440 /*******************************************************************************
0441  *
0442  * FUNCTION:    AcpiNsGetSecondaryObject
0443  *
0444  * PARAMETERS:  Node             - Namespace node
0445  *
0446  * RETURN:      Current value of the object field from the Node whose
0447  *              handle is passed.
0448  *
0449  * DESCRIPTION: Obtain a secondary object associated with a namespace node.
0450  *
0451  ******************************************************************************/
0452 
0453 ACPI_OPERAND_OBJECT *
0454 AcpiNsGetSecondaryObject (
0455     ACPI_OPERAND_OBJECT     *ObjDesc)
0456 {
0457     ACPI_FUNCTION_TRACE_PTR (NsGetSecondaryObject, ObjDesc);
0458 
0459 
0460     if ((!ObjDesc)                                     ||
0461         (ObjDesc->Common.Type== ACPI_TYPE_LOCAL_DATA)  ||
0462         (!ObjDesc->Common.NextObject)                  ||
0463         ((ObjDesc->Common.NextObject)->Common.Type == ACPI_TYPE_LOCAL_DATA))
0464     {
0465         return_PTR (NULL);
0466     }
0467 
0468     return_PTR (ObjDesc->Common.NextObject);
0469 }
0470 
0471 
0472 /*******************************************************************************
0473  *
0474  * FUNCTION:    AcpiNsAttachData
0475  *
0476  * PARAMETERS:  Node            - Namespace node
0477  *              Handler         - Handler to be associated with the data
0478  *              Data            - Data to be attached
0479  *
0480  * RETURN:      Status
0481  *
0482  * DESCRIPTION: Low-level attach data. Create and attach a Data object.
0483  *
0484  ******************************************************************************/
0485 
0486 ACPI_STATUS
0487 AcpiNsAttachData (
0488     ACPI_NAMESPACE_NODE     *Node,
0489     ACPI_OBJECT_HANDLER     Handler,
0490     void                    *Data)
0491 {
0492     ACPI_OPERAND_OBJECT     *PrevObjDesc;
0493     ACPI_OPERAND_OBJECT     *ObjDesc;
0494     ACPI_OPERAND_OBJECT     *DataDesc;
0495 
0496 
0497     /* We only allow one attachment per handler */
0498 
0499     PrevObjDesc = NULL;
0500     ObjDesc = Node->Object;
0501     while (ObjDesc)
0502     {
0503         if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA) &&
0504             (ObjDesc->Data.Handler == Handler))
0505         {
0506             return (AE_ALREADY_EXISTS);
0507         }
0508 
0509         PrevObjDesc = ObjDesc;
0510         ObjDesc = ObjDesc->Common.NextObject;
0511     }
0512 
0513     /* Create an internal object for the data */
0514 
0515     DataDesc = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_DATA);
0516     if (!DataDesc)
0517     {
0518         return (AE_NO_MEMORY);
0519     }
0520 
0521     DataDesc->Data.Handler = Handler;
0522     DataDesc->Data.Pointer = Data;
0523 
0524     /* Install the data object */
0525 
0526     if (PrevObjDesc)
0527     {
0528         PrevObjDesc->Common.NextObject = DataDesc;
0529     }
0530     else
0531     {
0532         Node->Object = DataDesc;
0533     }
0534 
0535     return (AE_OK);
0536 }
0537 
0538 
0539 /*******************************************************************************
0540  *
0541  * FUNCTION:    AcpiNsDetachData
0542  *
0543  * PARAMETERS:  Node            - Namespace node
0544  *              Handler         - Handler associated with the data
0545  *
0546  * RETURN:      Status
0547  *
0548  * DESCRIPTION: Low-level detach data. Delete the data node, but the caller
0549  *              is responsible for the actual data.
0550  *
0551  ******************************************************************************/
0552 
0553 ACPI_STATUS
0554 AcpiNsDetachData (
0555     ACPI_NAMESPACE_NODE     *Node,
0556     ACPI_OBJECT_HANDLER     Handler)
0557 {
0558     ACPI_OPERAND_OBJECT     *ObjDesc;
0559     ACPI_OPERAND_OBJECT     *PrevObjDesc;
0560 
0561 
0562     PrevObjDesc = NULL;
0563     ObjDesc = Node->Object;
0564     while (ObjDesc)
0565     {
0566         if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA) &&
0567             (ObjDesc->Data.Handler == Handler))
0568         {
0569             if (PrevObjDesc)
0570             {
0571                 PrevObjDesc->Common.NextObject = ObjDesc->Common.NextObject;
0572             }
0573             else
0574             {
0575                 Node->Object = ObjDesc->Common.NextObject;
0576             }
0577 
0578             AcpiUtRemoveReference (ObjDesc);
0579             return (AE_OK);
0580         }
0581 
0582         PrevObjDesc = ObjDesc;
0583         ObjDesc = ObjDesc->Common.NextObject;
0584     }
0585 
0586     return (AE_NOT_FOUND);
0587 }
0588 
0589 
0590 /*******************************************************************************
0591  *
0592  * FUNCTION:    AcpiNsGetAttachedData
0593  *
0594  * PARAMETERS:  Node            - Namespace node
0595  *              Handler         - Handler associated with the data
0596  *              Data            - Where the data is returned
0597  *
0598  * RETURN:      Status
0599  *
0600  * DESCRIPTION: Low level interface to obtain data previously associated with
0601  *              a namespace node.
0602  *
0603  ******************************************************************************/
0604 
0605 ACPI_STATUS
0606 AcpiNsGetAttachedData (
0607     ACPI_NAMESPACE_NODE     *Node,
0608     ACPI_OBJECT_HANDLER     Handler,
0609     void                    **Data)
0610 {
0611     ACPI_OPERAND_OBJECT     *ObjDesc;
0612 
0613 
0614     ObjDesc = Node->Object;
0615     while (ObjDesc)
0616     {
0617         if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA) &&
0618             (ObjDesc->Data.Handler == Handler))
0619         {
0620             *Data = ObjDesc->Data.Pointer;
0621             return (AE_OK);
0622         }
0623 
0624         ObjDesc = ObjDesc->Common.NextObject;
0625     }
0626 
0627     return (AE_NOT_FOUND);
0628 }