1 /*******************************************************************************
3 * Module Name: dsmthdat - control method arguments and local variables
6 ******************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
13 * All rights reserved.
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code. No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
38 * The above copyright and patent license is granted only if the following
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision. In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change. Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee. Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution. In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
73 * 3.4. Intel retains all right, title, and interest in and to the Original
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
81 * 4. Disclaimer and Export Compliance
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government. In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
115 *****************************************************************************/
117 #define __DSMTHDAT_C__
119 #include <contrib/dev/acpica/acpi.h>
120 #include <contrib/dev/acpica/acdispat.h>
121 #include <contrib/dev/acpica/amlcode.h>
122 #include <contrib/dev/acpica/acnamesp.h>
123 #include <contrib/dev/acpica/acinterp.h>
126 #define _COMPONENT ACPI_DISPATCHER
127 ACPI_MODULE_NAME ("dsmthdat")
129 /* Local prototypes */
132 AcpiDsMethodDataDeleteValue (
135 ACPI_WALK_STATE *WalkState);
138 AcpiDsMethodDataSetValue (
141 ACPI_OPERAND_OBJECT *Object,
142 ACPI_WALK_STATE *WalkState);
144 #ifdef ACPI_OBSOLETE_FUNCTIONS
146 AcpiDsMethodDataGetType (
149 ACPI_WALK_STATE *WalkState);
153 /*******************************************************************************
155 * FUNCTION: AcpiDsMethodDataInit
157 * PARAMETERS: WalkState - Current walk state object
161 * DESCRIPTION: Initialize the data structures that hold the method's arguments
162 * and locals. The data struct is an array of namespace nodes for
163 * each - this allows RefOf and DeRefOf to work properly for these
164 * special data types.
166 * NOTES: WalkState fields are initialized to zero by the
167 * ACPI_ALLOCATE_ZEROED().
169 * A pseudo-Namespace Node is assigned to each argument and local
170 * so that RefOf() can return a pointer to the Node.
172 ******************************************************************************/
175 AcpiDsMethodDataInit (
176 ACPI_WALK_STATE *WalkState)
181 ACPI_FUNCTION_TRACE (DsMethodDataInit);
184 /* Init the method arguments */
186 for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
188 ACPI_MOVE_32_TO_32 (&WalkState->Arguments[i].Name, NAMEOF_ARG_NTE);
189 WalkState->Arguments[i].Name.Integer |= (i << 24);
190 WalkState->Arguments[i].DescriptorType = ACPI_DESC_TYPE_NAMED;
191 WalkState->Arguments[i].Type = ACPI_TYPE_ANY;
192 WalkState->Arguments[i].Flags =
193 ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_ARG;
196 /* Init the method locals */
198 for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
200 ACPI_MOVE_32_TO_32 (&WalkState->LocalVariables[i].Name, NAMEOF_LOCAL_NTE);
202 WalkState->LocalVariables[i].Name.Integer |= (i << 24);
203 WalkState->LocalVariables[i].DescriptorType = ACPI_DESC_TYPE_NAMED;
204 WalkState->LocalVariables[i].Type = ACPI_TYPE_ANY;
205 WalkState->LocalVariables[i].Flags =
206 ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_LOCAL;
213 /*******************************************************************************
215 * FUNCTION: AcpiDsMethodDataDeleteAll
217 * PARAMETERS: WalkState - Current walk state object
221 * DESCRIPTION: Delete method locals and arguments. Arguments are only
222 * deleted if this method was called from another method.
224 ******************************************************************************/
227 AcpiDsMethodDataDeleteAll (
228 ACPI_WALK_STATE *WalkState)
233 ACPI_FUNCTION_TRACE (DsMethodDataDeleteAll);
236 /* Detach the locals */
238 for (Index = 0; Index < ACPI_METHOD_NUM_LOCALS; Index++)
240 if (WalkState->LocalVariables[Index].Object)
242 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Local%d=%p\n",
243 Index, WalkState->LocalVariables[Index].Object));
245 /* Detach object (if present) and remove a reference */
247 AcpiNsDetachObject (&WalkState->LocalVariables[Index]);
251 /* Detach the arguments */
253 for (Index = 0; Index < ACPI_METHOD_NUM_ARGS; Index++)
255 if (WalkState->Arguments[Index].Object)
257 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Arg%d=%p\n",
258 Index, WalkState->Arguments[Index].Object));
260 /* Detach object (if present) and remove a reference */
262 AcpiNsDetachObject (&WalkState->Arguments[Index]);
270 /*******************************************************************************
272 * FUNCTION: AcpiDsMethodDataInitArgs
274 * PARAMETERS: *Params - Pointer to a parameter list for the method
275 * MaxParamCount - The arg count for this method
276 * WalkState - Current walk state object
280 * DESCRIPTION: Initialize arguments for a method. The parameter list is a list
281 * of ACPI operand objects, either null terminated or whose length
282 * is defined by MaxParamCount.
284 ******************************************************************************/
287 AcpiDsMethodDataInitArgs (
288 ACPI_OPERAND_OBJECT **Params,
289 UINT32 MaxParamCount,
290 ACPI_WALK_STATE *WalkState)
296 ACPI_FUNCTION_TRACE_PTR (DsMethodDataInitArgs, Params);
301 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "No param list passed to method\n"));
302 return_ACPI_STATUS (AE_OK);
305 /* Copy passed parameters into the new method stack frame */
307 while ((Index < ACPI_METHOD_NUM_ARGS) &&
308 (Index < MaxParamCount) &&
313 * Store the argument in the method/walk descriptor.
314 * Do not copy the arg in order to implement call by reference
316 Status = AcpiDsMethodDataSetValue (AML_ARG_OP, Index,
317 Params[Index], WalkState);
318 if (ACPI_FAILURE (Status))
320 return_ACPI_STATUS (Status);
326 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%d args passed to method\n", Index));
327 return_ACPI_STATUS (AE_OK);
331 /*******************************************************************************
333 * FUNCTION: AcpiDsMethodDataGetNode
335 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
336 * Index - Which Local or Arg whose type to get
337 * WalkState - Current walk state object
338 * Node - Where the node is returned.
340 * RETURN: Status and node
342 * DESCRIPTION: Get the Node associated with a local or arg.
344 ******************************************************************************/
347 AcpiDsMethodDataGetNode (
350 ACPI_WALK_STATE *WalkState,
351 ACPI_NAMESPACE_NODE **Node)
353 ACPI_FUNCTION_TRACE (DsMethodDataGetNode);
357 * Method Locals and Arguments are supported
363 if (Index > ACPI_METHOD_MAX_LOCAL)
365 ACPI_ERROR ((AE_INFO,
366 "Local index %d is invalid (max %d)",
367 Index, ACPI_METHOD_MAX_LOCAL));
368 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
371 /* Return a pointer to the pseudo-node */
373 *Node = &WalkState->LocalVariables[Index];
378 if (Index > ACPI_METHOD_MAX_ARG)
380 ACPI_ERROR ((AE_INFO,
381 "Arg index %d is invalid (max %d)",
382 Index, ACPI_METHOD_MAX_ARG));
383 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
386 /* Return a pointer to the pseudo-node */
388 *Node = &WalkState->Arguments[Index];
392 ACPI_ERROR ((AE_INFO, "Opcode %d is invalid", Opcode));
393 return_ACPI_STATUS (AE_AML_BAD_OPCODE);
396 return_ACPI_STATUS (AE_OK);
400 /*******************************************************************************
402 * FUNCTION: AcpiDsMethodDataSetValue
404 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
405 * Index - Which Local or Arg to get
406 * Object - Object to be inserted into the stack entry
407 * WalkState - Current walk state object
411 * DESCRIPTION: Insert an object onto the method stack at entry Opcode:Index.
412 * Note: There is no "implicit conversion" for locals.
414 ******************************************************************************/
417 AcpiDsMethodDataSetValue (
420 ACPI_OPERAND_OBJECT *Object,
421 ACPI_WALK_STATE *WalkState)
424 ACPI_NAMESPACE_NODE *Node;
427 ACPI_FUNCTION_TRACE (DsMethodDataSetValue);
430 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
431 "NewObj %p Opcode %X, Refs=%d [%s]\n", Object,
432 Opcode, Object->Common.ReferenceCount,
433 AcpiUtGetTypeName (Object->Common.Type)));
435 /* Get the namespace node for the arg/local */
437 Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
438 if (ACPI_FAILURE (Status))
440 return_ACPI_STATUS (Status);
444 * Increment ref count so object can't be deleted while installed.
445 * NOTE: We do not copy the object in order to preserve the call by
446 * reference semantics of ACPI Control Method invocation.
447 * (See ACPI Specification 2.0C)
449 AcpiUtAddReference (Object);
451 /* Install the object */
453 Node->Object = Object;
454 return_ACPI_STATUS (Status);
458 /*******************************************************************************
460 * FUNCTION: AcpiDsMethodDataGetValue
462 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
463 * Index - Which localVar or argument to get
464 * WalkState - Current walk state object
465 * DestDesc - Where Arg or Local value is returned
469 * DESCRIPTION: Retrieve value of selected Arg or Local for this method
470 * Used only in AcpiExResolveToValue().
472 ******************************************************************************/
475 AcpiDsMethodDataGetValue (
478 ACPI_WALK_STATE *WalkState,
479 ACPI_OPERAND_OBJECT **DestDesc)
482 ACPI_NAMESPACE_NODE *Node;
483 ACPI_OPERAND_OBJECT *Object;
486 ACPI_FUNCTION_TRACE (DsMethodDataGetValue);
489 /* Validate the object descriptor */
493 ACPI_ERROR ((AE_INFO, "Null object descriptor pointer"));
494 return_ACPI_STATUS (AE_BAD_PARAMETER);
497 /* Get the namespace node for the arg/local */
499 Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
500 if (ACPI_FAILURE (Status))
502 return_ACPI_STATUS (Status);
505 /* Get the object from the node */
507 Object = Node->Object;
509 /* Examine the returned object, it must be valid. */
514 * Index points to uninitialized object.
515 * This means that either 1) The expected argument was
516 * not passed to the method, or 2) A local variable
517 * was referenced by the method (via the ASL)
518 * before it was initialized. Either case is an error.
521 /* If slack enabled, init the LocalX/ArgX to an Integer of value zero */
523 if (AcpiGbl_EnableInterpreterSlack)
525 Object = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
528 return_ACPI_STATUS (AE_NO_MEMORY);
531 Object->Integer.Value = 0;
532 Node->Object = Object;
535 /* Otherwise, return the error */
541 ACPI_ERROR ((AE_INFO,
542 "Uninitialized Arg[%d] at node %p",
545 return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
549 ACPI_ERROR ((AE_INFO,
550 "Uninitialized Local[%d] at node %p",
553 return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
556 ACPI_ERROR ((AE_INFO, "Not a Arg/Local opcode: %X", Opcode));
557 return_ACPI_STATUS (AE_AML_INTERNAL);
562 * The Index points to an initialized and valid object.
563 * Return an additional reference to the object
566 AcpiUtAddReference (Object);
568 return_ACPI_STATUS (AE_OK);
572 /*******************************************************************************
574 * FUNCTION: AcpiDsMethodDataDeleteValue
576 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
577 * Index - Which localVar or argument to delete
578 * WalkState - Current walk state object
582 * DESCRIPTION: Delete the entry at Opcode:Index. Inserts
583 * a null into the stack slot after the object is deleted.
585 ******************************************************************************/
588 AcpiDsMethodDataDeleteValue (
591 ACPI_WALK_STATE *WalkState)
594 ACPI_NAMESPACE_NODE *Node;
595 ACPI_OPERAND_OBJECT *Object;
598 ACPI_FUNCTION_TRACE (DsMethodDataDeleteValue);
601 /* Get the namespace node for the arg/local */
603 Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
604 if (ACPI_FAILURE (Status))
609 /* Get the associated object */
611 Object = AcpiNsGetAttachedObject (Node);
614 * Undefine the Arg or Local by setting its descriptor
615 * pointer to NULL. Locals/Args can contain both
616 * ACPI_OPERAND_OBJECTS and ACPI_NAMESPACE_NODEs
621 (ACPI_GET_DESCRIPTOR_TYPE (Object) == ACPI_DESC_TYPE_OPERAND))
624 * There is a valid object.
625 * Decrement the reference count by one to balance the
626 * increment when the object was stored.
628 AcpiUtRemoveReference (Object);
635 /*******************************************************************************
637 * FUNCTION: AcpiDsStoreObjectToLocal
639 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
640 * Index - Which Local or Arg to set
641 * ObjDesc - Value to be stored
642 * WalkState - Current walk state
646 * DESCRIPTION: Store a value in an Arg or Local. The ObjDesc is installed
647 * as the new value for the Arg or Local and the reference count
648 * for ObjDesc is incremented.
650 ******************************************************************************/
653 AcpiDsStoreObjectToLocal (
656 ACPI_OPERAND_OBJECT *ObjDesc,
657 ACPI_WALK_STATE *WalkState)
660 ACPI_NAMESPACE_NODE *Node;
661 ACPI_OPERAND_OBJECT *CurrentObjDesc;
662 ACPI_OPERAND_OBJECT *NewObjDesc;
665 ACPI_FUNCTION_TRACE (DsStoreObjectToLocal);
666 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode=%X Index=%d Obj=%p\n",
667 Opcode, Index, ObjDesc));
669 /* Parameter validation */
673 return_ACPI_STATUS (AE_BAD_PARAMETER);
676 /* Get the namespace node for the arg/local */
678 Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
679 if (ACPI_FAILURE (Status))
681 return_ACPI_STATUS (Status);
684 CurrentObjDesc = AcpiNsGetAttachedObject (Node);
685 if (CurrentObjDesc == ObjDesc)
687 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p already installed!\n",
689 return_ACPI_STATUS (Status);
693 * If the reference count on the object is more than one, we must
694 * take a copy of the object before we store. A reference count
695 * of exactly 1 means that the object was just created during the
696 * evaluation of an expression, and we can safely use it since it
697 * is not used anywhere else.
699 NewObjDesc = ObjDesc;
700 if (ObjDesc->Common.ReferenceCount > 1)
702 Status = AcpiUtCopyIobjectToIobject (ObjDesc, &NewObjDesc, WalkState);
703 if (ACPI_FAILURE (Status))
705 return_ACPI_STATUS (Status);
710 * If there is an object already in this slot, we either
711 * have to delete it, or if this is an argument and there
712 * is an object reference stored there, we have to do
718 * Check for an indirect store if an argument
719 * contains an object reference (stored as an Node).
720 * We don't allow this automatic dereferencing for
721 * locals, since a store to a local should overwrite
722 * anything there, including an object reference.
724 * If both Arg0 and Local0 contain RefOf (Local4):
726 * Store (1, Arg0) - Causes indirect store to local4
727 * Store (1, Local0) - Stores 1 in local0, overwriting
728 * the reference to local4
729 * Store (1, DeRefof (Local0)) - Causes indirect store to local4
733 if (Opcode == AML_ARG_OP)
736 * If we have a valid reference object that came from RefOf(),
737 * do the indirect store
739 if ((ACPI_GET_DESCRIPTOR_TYPE (CurrentObjDesc) == ACPI_DESC_TYPE_OPERAND) &&
740 (CurrentObjDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
741 (CurrentObjDesc->Reference.Opcode == AML_REF_OF_OP))
743 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
744 "Arg (%p) is an ObjRef(Node), storing in node %p\n",
745 NewObjDesc, CurrentObjDesc));
748 * Store this object to the Node (perform the indirect store)
749 * NOTE: No implicit conversion is performed, as per the ACPI
750 * specification rules on storing to Locals/Args.
752 Status = AcpiExStoreObjectToNode (NewObjDesc,
753 CurrentObjDesc->Reference.Object, WalkState,
754 ACPI_NO_IMPLICIT_CONVERSION);
756 /* Remove local reference if we copied the object above */
758 if (NewObjDesc != ObjDesc)
760 AcpiUtRemoveReference (NewObjDesc);
762 return_ACPI_STATUS (Status);
767 * Delete the existing object
768 * before storing the new one
770 AcpiDsMethodDataDeleteValue (Opcode, Index, WalkState);
774 * Install the Obj descriptor (*NewObjDesc) into
775 * the descriptor for the Arg or Local.
776 * (increments the object reference count by one)
778 Status = AcpiDsMethodDataSetValue (Opcode, Index, NewObjDesc, WalkState);
780 /* Remove local reference if we copied the object above */
782 if (NewObjDesc != ObjDesc)
784 AcpiUtRemoveReference (NewObjDesc);
787 return_ACPI_STATUS (Status);
791 #ifdef ACPI_OBSOLETE_FUNCTIONS
792 /*******************************************************************************
794 * FUNCTION: AcpiDsMethodDataGetType
796 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
797 * Index - Which Local or Arg whose type to get
798 * WalkState - Current walk state object
800 * RETURN: Data type of current value of the selected Arg or Local
802 * DESCRIPTION: Get the type of the object stored in the Local or Arg
804 ******************************************************************************/
807 AcpiDsMethodDataGetType (
810 ACPI_WALK_STATE *WalkState)
813 ACPI_NAMESPACE_NODE *Node;
814 ACPI_OPERAND_OBJECT *Object;
817 ACPI_FUNCTION_TRACE (DsMethodDataGetType);
820 /* Get the namespace node for the arg/local */
822 Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
823 if (ACPI_FAILURE (Status))
825 return_VALUE ((ACPI_TYPE_NOT_FOUND));
830 Object = AcpiNsGetAttachedObject (Node);
833 /* Uninitialized local/arg, return TYPE_ANY */
835 return_VALUE (ACPI_TYPE_ANY);
838 /* Get the object type */
840 return_VALUE (ACPI_GET_OBJECT_TYPE (Object));