xref: /freebsd/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c (revision ea825d02749f382c3f7e17f28247f20a48733eab)
1 /******************************************************************************
2  *
3  * Module Name: dspkginit - Completion of deferred package initialization
4  *
5  *****************************************************************************/
6 
7 /******************************************************************************
8  *
9  * 1. Copyright Notice
10  *
11  * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
12  * All rights reserved.
13  *
14  * 2. License
15  *
16  * 2.1. This is your license from Intel Corp. under its intellectual property
17  * rights. You may have additional license terms from the party that provided
18  * you this software, covering your right to use that party's intellectual
19  * property rights.
20  *
21  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22  * copy of the source code appearing in this file ("Covered Code") an
23  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24  * base code distributed originally by Intel ("Original Intel Code") to copy,
25  * make derivatives, distribute, use and display any portion of the Covered
26  * Code in any form, with the right to sublicense such rights; and
27  *
28  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29  * license (with the right to sublicense), under only those claims of Intel
30  * patents that are infringed by the Original Intel Code, to make, use, sell,
31  * offer to sell, and import the Covered Code and derivative works thereof
32  * solely to the minimum extent necessary to exercise the above copyright
33  * license, and in no event shall the patent license extend to any additions
34  * to or modifications of the Original Intel Code. No other license or right
35  * is granted directly or by implication, estoppel or otherwise;
36  *
37  * The above copyright and patent license is granted only if the following
38  * conditions are met:
39  *
40  * 3. Conditions
41  *
42  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43  * Redistribution of source code of any substantial portion of the Covered
44  * Code or modification with rights to further distribute source must include
45  * the above Copyright Notice, the above License, this list of Conditions,
46  * and the following Disclaimer and Export Compliance provision. In addition,
47  * Licensee must cause all Covered Code to which Licensee contributes to
48  * contain a file documenting the changes Licensee made to create that Covered
49  * Code and the date of any change. Licensee must include in that file the
50  * documentation of any changes made by any predecessor Licensee. Licensee
51  * must include a prominent statement that the modification is derived,
52  * directly or indirectly, from Original Intel Code.
53  *
54  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55  * Redistribution of source code of any substantial portion of the Covered
56  * Code or modification without rights to further distribute source must
57  * include the following Disclaimer and Export Compliance provision in the
58  * documentation and/or other materials provided with distribution. In
59  * addition, Licensee may not authorize further sublicense of source of any
60  * portion of the Covered Code, and must include terms to the effect that the
61  * license from Licensee to its licensee is limited to the intellectual
62  * property embodied in the software Licensee provides to its licensee, and
63  * not to intellectual property embodied in modifications its licensee may
64  * make.
65  *
66  * 3.3. Redistribution of Executable. Redistribution in executable form of any
67  * substantial portion of the Covered Code or modification must reproduce the
68  * above Copyright Notice, and the following Disclaimer and Export Compliance
69  * provision in the documentation and/or other materials provided with the
70  * distribution.
71  *
72  * 3.4. Intel retains all right, title, and interest in and to the Original
73  * Intel Code.
74  *
75  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76  * Intel shall be used in advertising or otherwise to promote the sale, use or
77  * other dealings in products derived from or relating to the Covered Code
78  * without prior written authorization from Intel.
79  *
80  * 4. Disclaimer and Export Compliance
81  *
82  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88  * PARTICULAR PURPOSE.
89  *
90  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97  * LIMITED REMEDY.
98  *
99  * 4.3. Licensee shall not export, either directly or indirectly, any of this
100  * software or system incorporating such software without first obtaining any
101  * required license or other approval from the U. S. Department of Commerce or
102  * any other agency or department of the United States Government. In the
103  * event Licensee exports any such software from the United States or
104  * re-exports any such software from a foreign destination, Licensee shall
105  * ensure that the distribution and export/re-export of the software is in
106  * compliance with all laws, regulations, orders, or other restrictions of the
107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108  * any of its subsidiaries will export/re-export any technical data, process,
109  * software, or service, directly or indirectly, to any country for which the
110  * United States government or any agency thereof requires an export license,
111  * other governmental approval, or letter of assurance, without first obtaining
112  * such license, approval or letter.
113  *
114  *****************************************************************************
115  *
116  * Alternatively, you may choose to be licensed under the terms of the
117  * following license:
118  *
119  * Redistribution and use in source and binary forms, with or without
120  * modification, are permitted provided that the following conditions
121  * are met:
122  * 1. Redistributions of source code must retain the above copyright
123  *    notice, this list of conditions, and the following disclaimer,
124  *    without modification.
125  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126  *    substantially similar to the "NO WARRANTY" disclaimer below
127  *    ("Disclaimer") and any redistribution must be conditioned upon
128  *    including a substantially similar Disclaimer requirement for further
129  *    binary redistribution.
130  * 3. Neither the names of the above-listed copyright holders nor the names
131  *    of any contributors may be used to endorse or promote products derived
132  *    from this software without specific prior written permission.
133  *
134  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
145  *
146  * Alternatively, you may choose to be licensed under the terms of the
147  * GNU General Public License ("GPL") version 2 as published by the Free
148  * Software Foundation.
149  *
150  *****************************************************************************/
151 
152 #include <contrib/dev/acpica/include/acpi.h>
153 #include <contrib/dev/acpica/include/accommon.h>
154 #include <contrib/dev/acpica/include/acnamesp.h>
155 #include <contrib/dev/acpica/include/amlcode.h>
156 #include <contrib/dev/acpica/include/acdispat.h>
157 #include <contrib/dev/acpica/include/acinterp.h>
158 
159 
160 #define _COMPONENT          ACPI_NAMESPACE
161         ACPI_MODULE_NAME    ("dspkginit")
162 
163 
164 /* Local prototypes */
165 
166 static void
167 AcpiDsResolvePackageElement (
168     ACPI_OPERAND_OBJECT     **Element);
169 
170 
171 /*******************************************************************************
172  *
173  * FUNCTION:    AcpiDsBuildInternalPackageObj
174  *
175  * PARAMETERS:  WalkState       - Current walk state
176  *              Op              - Parser object to be translated
177  *              ElementCount    - Number of elements in the package - this is
178  *                                the NumElements argument to Package()
179  *              ObjDescPtr      - Where the ACPI internal object is returned
180  *
181  * RETURN:      Status
182  *
183  * DESCRIPTION: Translate a parser Op package object to the equivalent
184  *              namespace object
185  *
186  * NOTE: The number of elements in the package will be always be the NumElements
187  * count, regardless of the number of elements in the package list. If
188  * NumElements is smaller, only that many package list elements are used.
189  * if NumElements is larger, the Package object is padded out with
190  * objects of type Uninitialized (as per ACPI spec.)
191  *
192  * Even though the ASL compilers do not allow NumElements to be smaller
193  * than the Package list length (for the fixed length package opcode), some
194  * BIOS code modifies the AML on the fly to adjust the NumElements, and
195  * this code compensates for that. This also provides compatibility with
196  * other AML interpreters.
197  *
198  ******************************************************************************/
199 
200 ACPI_STATUS
201 AcpiDsBuildInternalPackageObj (
202     ACPI_WALK_STATE         *WalkState,
203     ACPI_PARSE_OBJECT       *Op,
204     UINT32                  ElementCount,
205     ACPI_OPERAND_OBJECT     **ObjDescPtr)
206 {
207     ACPI_PARSE_OBJECT       *Arg;
208     ACPI_PARSE_OBJECT       *Parent;
209     ACPI_OPERAND_OBJECT     *ObjDesc = NULL;
210     ACPI_STATUS             Status = AE_OK;
211     UINT16                  ReferenceCount;
212     UINT32                  Index;
213     UINT32                  i;
214 
215 
216     ACPI_FUNCTION_TRACE (DsBuildInternalPackageObj);
217 
218 
219     /* Find the parent of a possibly nested package */
220 
221     Parent = Op->Common.Parent;
222     while ((Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
223            (Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))
224     {
225         Parent = Parent->Common.Parent;
226     }
227 
228     /*
229      * If we are evaluating a Named package object of the form:
230      *      Name (xxxx, Package)
231      * the package object already exists, otherwise it must be created.
232      */
233     ObjDesc = *ObjDescPtr;
234     if (!ObjDesc)
235     {
236         ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_PACKAGE);
237         *ObjDescPtr = ObjDesc;
238         if (!ObjDesc)
239         {
240             return_ACPI_STATUS (AE_NO_MEMORY);
241         }
242 
243         ObjDesc->Package.Node = Parent->Common.Node;
244     }
245 
246     if (ObjDesc->Package.Flags & AOPOBJ_DATA_VALID) /* Just in case */
247     {
248         return_ACPI_STATUS (AE_OK);
249     }
250 
251     /*
252      * Allocate the element array (array of pointers to the individual
253      * objects) based on the NumElements parameter. Add an extra pointer slot
254      * so that the list is always null terminated.
255      */
256     ObjDesc->Package.Elements = ACPI_ALLOCATE_ZEROED (
257         ((ACPI_SIZE) ElementCount + 1) * sizeof (void *));
258 
259     if (!ObjDesc->Package.Elements)
260     {
261         AcpiUtDeleteObjectDesc (ObjDesc);
262         return_ACPI_STATUS (AE_NO_MEMORY);
263     }
264 
265     ObjDesc->Package.Count = ElementCount;
266     Arg = Op->Common.Value.Arg;
267     Arg = Arg->Common.Next;
268 
269     if (Arg)
270     {
271         ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
272     }
273 
274     /*
275      * Initialize the elements of the package, up to the NumElements count.
276      * Package is automatically padded with uninitialized (NULL) elements
277      * if NumElements is greater than the package list length. Likewise,
278      * Package is truncated if NumElements is less than the list length.
279      */
280     for (i = 0; Arg && (i < ElementCount); i++)
281     {
282         if (Arg->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP)
283         {
284             if (Arg->Common.Node->Type == ACPI_TYPE_METHOD)
285             {
286                 /*
287                  * A method reference "looks" to the parser to be a method
288                  * invocation, so we special case it here
289                  */
290                 Arg->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
291                 Status = AcpiDsBuildInternalObject (
292                     WalkState, Arg, &ObjDesc->Package.Elements[i]);
293             }
294             else
295             {
296                 /* This package element is already built, just get it */
297 
298                 ObjDesc->Package.Elements[i] =
299                     ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Arg->Common.Node);
300             }
301         }
302         else
303         {
304             Status = AcpiDsBuildInternalObject (
305                 WalkState, Arg, &ObjDesc->Package.Elements[i]);
306             if (Status == AE_NOT_FOUND)
307             {
308                 ACPI_ERROR ((AE_INFO, "%-48s", "****DS namepath not found"));
309             }
310 
311             /*
312              * Initialize this package element. This function handles the
313              * resolution of named references within the package.
314              */
315             AcpiDsInitPackageElement (0, ObjDesc->Package.Elements[i],
316                 NULL, &ObjDesc->Package.Elements[i]);
317         }
318 
319         if (*ObjDescPtr)
320         {
321             /* Existing package, get existing reference count */
322 
323             ReferenceCount = (*ObjDescPtr)->Common.ReferenceCount;
324             if (ReferenceCount > 1)
325             {
326                 /* Make new element ref count match original ref count */
327                 /* TBD: Probably need an AcpiUtAddReferences function */
328 
329                 for (Index = 0; Index < ((UINT32) ReferenceCount - 1); Index++)
330                 {
331                     AcpiUtAddReference ((ObjDesc->Package.Elements[i]));
332                 }
333             }
334         }
335 
336         Arg = Arg->Common.Next;
337     }
338 
339     /* Check for match between NumElements and actual length of PackageList */
340 
341     if (Arg)
342     {
343         /*
344          * NumElements was exhausted, but there are remaining elements in
345          * the PackageList. Truncate the package to NumElements.
346          *
347          * Note: technically, this is an error, from ACPI spec: "It is an
348          * error for NumElements to be less than the number of elements in
349          * the PackageList". However, we just print a message and no
350          * exception is returned. This provides compatibility with other
351          * ACPI implementations. Some firmware implementations will alter
352          * the NumElements on the fly, possibly creating this type of
353          * ill-formed package object.
354          */
355         while (Arg)
356         {
357             /*
358              * We must delete any package elements that were created earlier
359              * and are not going to be used because of the package truncation.
360              */
361             if (Arg->Common.Node)
362             {
363                 AcpiUtRemoveReference (
364                     ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Arg->Common.Node));
365                 Arg->Common.Node = NULL;
366             }
367 
368             /* Find out how many elements there really are */
369 
370             i++;
371             Arg = Arg->Common.Next;
372         }
373 
374         ACPI_INFO ((
375             "Actual Package length (%u) is larger than "
376             "NumElements field (%u), truncated",
377             i, ElementCount));
378     }
379     else if (i < ElementCount)
380     {
381         /*
382          * Arg list (elements) was exhausted, but we did not reach
383          * NumElements count.
384          *
385          * Note: this is not an error, the package is padded out
386          * with NULLs.
387          */
388         ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
389             "Package List length (%u) smaller than NumElements "
390             "count (%u), padded with null elements\n",
391             i, ElementCount));
392     }
393 
394     ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
395     Op->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjDesc);
396     return_ACPI_STATUS (Status);
397 }
398 
399 
400 /*******************************************************************************
401  *
402  * FUNCTION:    AcpiDsInitPackageElement
403  *
404  * PARAMETERS:  ACPI_PKG_CALLBACK
405  *
406  * RETURN:      Status
407  *
408  * DESCRIPTION: Resolve a named reference element within a package object
409  *
410  ******************************************************************************/
411 
412 ACPI_STATUS
413 AcpiDsInitPackageElement (
414     UINT8                   ObjectType,
415     ACPI_OPERAND_OBJECT     *SourceObject,
416     ACPI_GENERIC_STATE      *State,
417     void                    *Context)
418 {
419     ACPI_OPERAND_OBJECT     **ElementPtr;
420 
421 
422     if (!SourceObject)
423     {
424         return (AE_OK);
425     }
426 
427     /*
428      * The following code is a bit of a hack to workaround a (current)
429      * limitation of the ACPI_PKG_CALLBACK interface. We need a pointer
430      * to the location within the element array because a new object
431      * may be created and stored there.
432      */
433     if (Context)
434     {
435         /* A direct call was made to this function */
436 
437         ElementPtr = (ACPI_OPERAND_OBJECT **) Context;
438     }
439     else
440     {
441         /* Call came from AcpiUtWalkPackageTree */
442 
443         ElementPtr = State->Pkg.ThisTargetObj;
444     }
445 
446     /* We are only interested in reference objects/elements */
447 
448     if (SourceObject->Common.Type == ACPI_TYPE_LOCAL_REFERENCE)
449     {
450         /* Attempt to resolve the (named) reference to a namespace node */
451 
452         AcpiDsResolvePackageElement (ElementPtr);
453     }
454     else if (SourceObject->Common.Type == ACPI_TYPE_PACKAGE)
455     {
456         SourceObject->Package.Flags |= AOPOBJ_DATA_VALID;
457     }
458 
459     return (AE_OK);
460 }
461 
462 
463 /*******************************************************************************
464  *
465  * FUNCTION:    AcpiDsResolvePackageElement
466  *
467  * PARAMETERS:  ElementPtr          - Pointer to a reference object
468  *
469  * RETURN:      Possible new element is stored to the indirect ElementPtr
470  *
471  * DESCRIPTION: Resolve a package element that is a reference to a named
472  *              object.
473  *
474  ******************************************************************************/
475 
476 static void
477 AcpiDsResolvePackageElement (
478     ACPI_OPERAND_OBJECT     **ElementPtr)
479 {
480     ACPI_STATUS             Status;
481     ACPI_GENERIC_STATE      ScopeInfo;
482     ACPI_OPERAND_OBJECT     *Element = *ElementPtr;
483     ACPI_NAMESPACE_NODE     *ResolvedNode;
484     char                    *ExternalPath = NULL;
485     ACPI_OBJECT_TYPE        Type;
486 
487 
488     ACPI_FUNCTION_TRACE (DsResolvePackageElement);
489 
490 
491     /* Check if reference element is already resolved */
492 
493     if (Element->Reference.Resolved)
494     {
495         return_VOID;
496     }
497 
498     /* Element must be a reference object of correct type */
499 
500     ScopeInfo.Scope.Node = Element->Reference.Node; /* Prefix node */
501 
502     Status = AcpiNsLookup (&ScopeInfo,
503         (char *) Element->Reference.Aml,            /* Pointer to AML path */
504         ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
505         ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
506         NULL, &ResolvedNode);
507     if (ACPI_FAILURE (Status))
508     {
509         Status = AcpiNsExternalizeName (ACPI_UINT32_MAX,
510             (char *) Element->Reference.Aml,
511             NULL, &ExternalPath);
512 
513         ACPI_EXCEPTION ((AE_INFO, Status,
514             "Could not find/resolve named package element: %s", ExternalPath));
515 
516         ACPI_FREE (ExternalPath);
517         *ElementPtr = NULL;
518         return_VOID;
519     }
520     else if (ResolvedNode->Type == ACPI_TYPE_ANY)
521     {
522         /* Named reference not resolved, return a NULL package element */
523 
524         ACPI_ERROR ((AE_INFO,
525             "Could not resolve named package element [%4.4s] in [%4.4s]",
526             ResolvedNode->Name.Ascii, ScopeInfo.Scope.Node->Name.Ascii));
527         *ElementPtr = NULL;
528         return_VOID;
529     }
530 #if 0
531     else if (ResolvedNode->Flags & ANOBJ_TEMPORARY)
532     {
533         /*
534          * A temporary node found here indicates that the reference is
535          * to a node that was created within this method. We are not
536          * going to allow it (especially if the package is returned
537          * from the method) -- the temporary node will be deleted out
538          * from under the method. (05/2017).
539          */
540         ACPI_ERROR ((AE_INFO,
541             "Package element refers to a temporary name [%4.4s], "
542             "inserting a NULL element",
543             ResolvedNode->Name.Ascii));
544         *ElementPtr = NULL;
545         return_VOID;
546     }
547 #endif
548 
549     /*
550      * Special handling for Alias objects. We need ResolvedNode to point
551      * to the Alias target. This effectively "resolves" the alias.
552      */
553     if (ResolvedNode->Type == ACPI_TYPE_LOCAL_ALIAS)
554     {
555         ResolvedNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
556             ResolvedNode->Object);
557     }
558 
559     /* Update the reference object */
560 
561     Element->Reference.Resolved = TRUE;
562     Element->Reference.Node = ResolvedNode;
563     Type = Element->Reference.Node->Type;
564 
565     /*
566      * Attempt to resolve the node to a value before we insert it into
567      * the package. If this is a reference to a common data type,
568      * resolve it immediately. According to the ACPI spec, package
569      * elements can only be "data objects" or method references.
570      * Attempt to resolve to an Integer, Buffer, String or Package.
571      * If cannot, return the named reference (for things like Devices,
572      * Methods, etc.) Buffer Fields and Fields will resolve to simple
573      * objects (int/buf/str/pkg).
574      *
575      * NOTE: References to things like Devices, Methods, Mutexes, etc.
576      * will remain as named references. This behavior is not described
577      * in the ACPI spec, but it appears to be an oversight.
578      */
579     Status = AcpiExResolveNodeToValue (&ResolvedNode, NULL);
580     if (ACPI_FAILURE (Status))
581     {
582         return_VOID;
583     }
584 
585 #if 0
586 /* TBD - alias support */
587     /*
588      * Special handling for Alias objects. We need to setup the type
589      * and the Op->Common.Node to point to the Alias target. Note,
590      * Alias has at most one level of indirection internally.
591      */
592     Type = Op->Common.Node->Type;
593     if (Type == ACPI_TYPE_LOCAL_ALIAS)
594     {
595         Type = ObjDesc->Common.Type;
596         Op->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
597             Op->Common.Node->Object);
598     }
599 #endif
600 
601     switch (Type)
602     {
603     /*
604      * These object types are a result of named references, so we will
605      * leave them as reference objects. In other words, these types
606      * have no intrinsic "value".
607      */
608     case ACPI_TYPE_DEVICE:
609     case ACPI_TYPE_THERMAL:
610 
611         /* TBD: This may not be necesssary */
612 
613         AcpiUtAddReference (ResolvedNode->Object);
614         break;
615 
616     case ACPI_TYPE_MUTEX:
617     case ACPI_TYPE_METHOD:
618     case ACPI_TYPE_POWER:
619     case ACPI_TYPE_PROCESSOR:
620     case ACPI_TYPE_EVENT:
621     case ACPI_TYPE_REGION:
622 
623         break;
624 
625     default:
626         /*
627          * For all other types - the node was resolved to an actual
628          * operand object with a value, return the object
629          */
630         *ElementPtr = (ACPI_OPERAND_OBJECT *) ResolvedNode;
631         break;
632     }
633 
634     return_VOID;
635 }
636