xref: /titanic_52/usr/src/uts/intel/io/acpica/namespace/nsinit.c (revision 269552cd714f2f1e308fdde0fc69b18a7f1142b2)
1 /******************************************************************************
2  *
3  * Module Name: nsinit - namespace initialization
4  *              $Revision: 1.88 $
5  *
6  *****************************************************************************/
7 
8 /******************************************************************************
9  *
10  * 1. Copyright Notice
11  *
12  * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
13  * All rights reserved.
14  *
15  * 2. License
16  *
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
20  * property rights.
21  *
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
28  *
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;
37  *
38  * The above copyright and patent license is granted only if the following
39  * conditions are met:
40  *
41  * 3. Conditions
42  *
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.
54  *
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
65  * make.
66  *
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
71  * distribution.
72  *
73  * 3.4. Intel retains all right, title, and interest in and to the Original
74  * Intel Code.
75  *
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.
80  *
81  * 4. Disclaimer and Export Compliance
82  *
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
89  * PARTICULAR PURPOSE.
90  *
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
98  * LIMITED REMEDY.
99  *
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.
114  *
115  *****************************************************************************/
116 
117 
118 #define __NSXFINIT_C__
119 
120 #include "acpi.h"
121 #include "acnamesp.h"
122 #include "acdispat.h"
123 #include "acinterp.h"
124 
125 #define _COMPONENT          ACPI_NAMESPACE
126         ACPI_MODULE_NAME    ("nsinit")
127 
128 /* Local prototypes */
129 
130 static ACPI_STATUS
131 AcpiNsInitOneObject (
132     ACPI_HANDLE             ObjHandle,
133     UINT32                  Level,
134     void                    *Context,
135     void                    **ReturnValue);
136 
137 static ACPI_STATUS
138 AcpiNsInitOneDevice (
139     ACPI_HANDLE             ObjHandle,
140     UINT32                  NestingLevel,
141     void                    *Context,
142     void                    **ReturnValue);
143 
144 static ACPI_STATUS
145 AcpiNsFindIniMethods (
146     ACPI_HANDLE             ObjHandle,
147     UINT32                  NestingLevel,
148     void                    *Context,
149     void                    **ReturnValue);
150 
151 
152 /*******************************************************************************
153  *
154  * FUNCTION:    AcpiNsInitializeObjects
155  *
156  * PARAMETERS:  None
157  *
158  * RETURN:      Status
159  *
160  * DESCRIPTION: Walk the entire namespace and perform any necessary
161  *              initialization on the objects found therein
162  *
163  ******************************************************************************/
164 
165 ACPI_STATUS
166 AcpiNsInitializeObjects (
167     void)
168 {
169     ACPI_STATUS             Status;
170     ACPI_INIT_WALK_INFO     Info;
171 
172 
173     ACPI_FUNCTION_TRACE (NsInitializeObjects);
174 
175 
176     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
177         "**** Starting initialization of namespace objects ****\n"));
178     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
179         "Completing Region/Field/Buffer/Package initialization:"));
180 
181     /* Set all init info to zero */
182 
183     ACPI_MEMSET (&Info, 0, sizeof (ACPI_INIT_WALK_INFO));
184 
185     /* Walk entire namespace from the supplied root */
186 
187     Status = AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
188                                 ACPI_UINT32_MAX, AcpiNsInitOneObject,
189                                 &Info, NULL);
190     if (ACPI_FAILURE (Status))
191     {
192         ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));
193     }
194 
195     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
196         "\nInitialized %hd/%hd Regions %hd/%hd Fields %hd/%hd Buffers %hd/%hd Packages (%hd nodes)\n",
197         Info.OpRegionInit,  Info.OpRegionCount,
198         Info.FieldInit,     Info.FieldCount,
199         Info.BufferInit,    Info.BufferCount,
200         Info.PackageInit,   Info.PackageCount, Info.ObjectCount));
201 
202     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
203         "%hd Control Methods found\n", Info.MethodCount));
204     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
205         "%hd Op Regions found\n", Info.OpRegionCount));
206 
207     return_ACPI_STATUS (AE_OK);
208 }
209 
210 
211 /*******************************************************************************
212  *
213  * FUNCTION:    AcpiNsInitializeDevices
214  *
215  * PARAMETERS:  None
216  *
217  * RETURN:      ACPI_STATUS
218  *
219  * DESCRIPTION: Walk the entire namespace and initialize all ACPI devices.
220  *              This means running _INI on all present devices.
221  *
222  *              Note: We install PCI config space handler on region access,
223  *              not here.
224  *
225  ******************************************************************************/
226 
227 ACPI_STATUS
228 AcpiNsInitializeDevices (
229     void)
230 {
231     ACPI_STATUS             Status;
232     ACPI_DEVICE_WALK_INFO   Info;
233 
234 
235     ACPI_FUNCTION_TRACE (NsInitializeDevices);
236 
237 
238     /* Init counters */
239 
240     Info.DeviceCount = 0;
241     Info.Num_STA = 0;
242     Info.Num_INI = 0;
243 
244     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
245         "Initializing Device/Processor/Thermal objects by executing _INI methods:"));
246 
247     /* Tree analysis: find all subtrees that contain _INI methods */
248 
249     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
250                 ACPI_UINT32_MAX, FALSE, AcpiNsFindIniMethods, &Info, NULL);
251     if (ACPI_FAILURE (Status))
252     {
253         goto ErrorExit;
254     }
255 
256     /* Allocate the evaluation information block */
257 
258     Info.EvaluateInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
259     if (!Info.EvaluateInfo)
260     {
261         Status = AE_NO_MEMORY;
262         goto ErrorExit;
263     }
264 
265     /* Walk namespace to execute all _INIs on present devices */
266 
267     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
268                 ACPI_UINT32_MAX, FALSE, AcpiNsInitOneDevice, &Info, NULL);
269 
270     ACPI_FREE (Info.EvaluateInfo);
271     if (ACPI_FAILURE (Status))
272     {
273         goto ErrorExit;
274     }
275 
276     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
277         "\nExecuted %hd _INI methods requiring %hd _STA executions (examined %hd objects)\n",
278         Info.Num_INI, Info.Num_STA, Info.DeviceCount));
279 
280     return_ACPI_STATUS (Status);
281 
282 
283 ErrorExit:
284     ACPI_EXCEPTION ((AE_INFO, Status, "During device initialization"));
285     return_ACPI_STATUS (Status);
286 }
287 
288 
289 /*******************************************************************************
290  *
291  * FUNCTION:    AcpiNsInitOneObject
292  *
293  * PARAMETERS:  ObjHandle       - Node
294  *              Level           - Current nesting level
295  *              Context         - Points to a init info struct
296  *              ReturnValue     - Not used
297  *
298  * RETURN:      Status
299  *
300  * DESCRIPTION: Callback from AcpiWalkNamespace.  Invoked for every object
301  *              within the  namespace.
302  *
303  *              Currently, the only objects that require initialization are:
304  *              1) Methods
305  *              2) Op Regions
306  *
307  ******************************************************************************/
308 
309 static ACPI_STATUS
310 AcpiNsInitOneObject (
311     ACPI_HANDLE             ObjHandle,
312     UINT32                  Level,
313     void                    *Context,
314     void                    **ReturnValue)
315 {
316     ACPI_OBJECT_TYPE        Type;
317     ACPI_STATUS             Status = AE_OK;
318     ACPI_INIT_WALK_INFO     *Info = (ACPI_INIT_WALK_INFO *) Context;
319     ACPI_NAMESPACE_NODE     *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
320     ACPI_OPERAND_OBJECT     *ObjDesc;
321 
322 
323     ACPI_FUNCTION_NAME (NsInitOneObject);
324 
325 
326     Info->ObjectCount++;
327 
328     /* And even then, we are only interested in a few object types */
329 
330     Type = AcpiNsGetType (ObjHandle);
331     ObjDesc = AcpiNsGetAttachedObject (Node);
332     if (!ObjDesc)
333     {
334         return (AE_OK);
335     }
336 
337     /* Increment counters for object types we are looking for */
338 
339     switch (Type)
340     {
341     case ACPI_TYPE_REGION:
342         Info->OpRegionCount++;
343         break;
344 
345     case ACPI_TYPE_BUFFER_FIELD:
346         Info->FieldCount++;
347         break;
348 
349     case ACPI_TYPE_LOCAL_BANK_FIELD:
350         Info->FieldCount++;
351         break;
352 
353     case ACPI_TYPE_BUFFER:
354         Info->BufferCount++;
355         break;
356 
357     case ACPI_TYPE_PACKAGE:
358         Info->PackageCount++;
359         break;
360 
361     default:
362 
363         /* No init required, just exit now */
364         return (AE_OK);
365     }
366 
367     /*
368      * If the object is already initialized, nothing else to do
369      */
370     if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
371     {
372         return (AE_OK);
373     }
374 
375     /*
376      * Must lock the interpreter before executing AML code
377      */
378     AcpiExEnterInterpreter ();
379 
380     /*
381      * Each of these types can contain executable AML code within the
382      * declaration.
383      */
384     switch (Type)
385     {
386     case ACPI_TYPE_REGION:
387 
388         Info->OpRegionInit++;
389         Status = AcpiDsGetRegionArguments (ObjDesc);
390         break;
391 
392     case ACPI_TYPE_BUFFER_FIELD:
393 
394         Info->FieldInit++;
395         Status = AcpiDsGetBufferFieldArguments (ObjDesc);
396         break;
397 
398     case ACPI_TYPE_LOCAL_BANK_FIELD:
399 
400         Info->FieldInit++;
401         Status = AcpiDsGetBankFieldArguments (ObjDesc);
402         break;
403 
404     case ACPI_TYPE_BUFFER:
405 
406         Info->BufferInit++;
407         Status = AcpiDsGetBufferArguments (ObjDesc);
408         break;
409 
410     case ACPI_TYPE_PACKAGE:
411 
412         Info->PackageInit++;
413         Status = AcpiDsGetPackageArguments (ObjDesc);
414         break;
415 
416     default:
417         /* No other types can get here */
418         break;
419     }
420 
421     if (ACPI_FAILURE (Status))
422     {
423         ACPI_EXCEPTION ((AE_INFO, Status,
424             "Could not execute arguments for [%4.4s] (%s)",
425             AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Type)));
426     }
427 
428     /*
429      * Print a dot for each object unless we are going to print the entire
430      * pathname
431      */
432     if (!(AcpiDbgLevel & ACPI_LV_INIT_NAMES))
433     {
434         ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
435     }
436 
437     /*
438      * We ignore errors from above, and always return OK, since we don't want
439      * to abort the walk on any single error.
440      */
441     AcpiExExitInterpreter ();
442     return (AE_OK);
443 }
444 
445 
446 /*******************************************************************************
447  *
448  * FUNCTION:    AcpiNsFindIniMethods
449  *
450  * PARAMETERS:  ACPI_WALK_CALLBACK
451  *
452  * RETURN:      ACPI_STATUS
453  *
454  * DESCRIPTION: Called during namespace walk. Finds objects named _INI under
455  *              device/processor/thermal objects, and marks the entire subtree
456  *              with a SUBTREE_HAS_INI flag. This flag is used during the
457  *              subsequent device initialization walk to avoid entire subtrees
458  *              that do not contain an _INI.
459  *
460  ******************************************************************************/
461 
462 static ACPI_STATUS
463 AcpiNsFindIniMethods (
464     ACPI_HANDLE             ObjHandle,
465     UINT32                  NestingLevel,
466     void                    *Context,
467     void                    **ReturnValue)
468 {
469     ACPI_DEVICE_WALK_INFO   *Info = ACPI_CAST_PTR (ACPI_DEVICE_WALK_INFO, Context);
470     ACPI_NAMESPACE_NODE     *Node;
471     ACPI_NAMESPACE_NODE     *ParentNode;
472 
473 
474     /* Keep count of device/processor/thermal objects */
475 
476     Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
477     if ((Node->Type == ACPI_TYPE_DEVICE)    ||
478         (Node->Type == ACPI_TYPE_PROCESSOR) ||
479         (Node->Type == ACPI_TYPE_THERMAL))
480     {
481         Info->DeviceCount++;
482         return (AE_OK);
483     }
484 
485     /* We are only looking for methods named _INI */
486 
487     if (!ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__INI))
488     {
489         return (AE_OK);
490     }
491 
492     /*
493      * The only _INI methods that we care about are those that are
494      * present under Device, Processor, and Thermal objects.
495      */
496     ParentNode = AcpiNsGetParentNode (Node);
497     switch (ParentNode->Type)
498     {
499     case ACPI_TYPE_DEVICE:
500     case ACPI_TYPE_PROCESSOR:
501     case ACPI_TYPE_THERMAL:
502 
503         /* Mark parent and bubble up the INI present flag to the root */
504 
505         while (ParentNode)
506         {
507             ParentNode->Flags |= ANOBJ_SUBTREE_HAS_INI;
508             ParentNode = AcpiNsGetParentNode (ParentNode);
509         }
510         break;
511 
512     default:
513         break;
514     }
515 
516     return (AE_OK);
517 }
518 
519 
520 /*******************************************************************************
521  *
522  * FUNCTION:    AcpiNsInitOneDevice
523  *
524  * PARAMETERS:  ACPI_WALK_CALLBACK
525  *
526  * RETURN:      ACPI_STATUS
527  *
528  * DESCRIPTION: This is called once per device soon after ACPI is enabled
529  *              to initialize each device. It determines if the device is
530  *              present, and if so, calls _INI.
531  *
532  ******************************************************************************/
533 
534 static ACPI_STATUS
535 AcpiNsInitOneDevice (
536     ACPI_HANDLE             ObjHandle,
537     UINT32                  NestingLevel,
538     void                    *Context,
539     void                    **ReturnValue)
540 {
541     ACPI_DEVICE_WALK_INFO   *WalkInfo = ACPI_CAST_PTR (ACPI_DEVICE_WALK_INFO, Context);
542     ACPI_EVALUATE_INFO      *Info = WalkInfo->EvaluateInfo;
543     UINT32                  Flags;
544     ACPI_STATUS             Status;
545     ACPI_NAMESPACE_NODE     *DeviceNode;
546 
547 
548     ACPI_FUNCTION_TRACE (NsInitOneDevice);
549 
550 
551     /* We are interested in Devices, Processors and ThermalZones only */
552 
553     DeviceNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
554     if ((DeviceNode->Type != ACPI_TYPE_DEVICE)    &&
555         (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
556         (DeviceNode->Type != ACPI_TYPE_THERMAL))
557     {
558         return_ACPI_STATUS (AE_OK);
559     }
560 
561     /*
562      * Because of an earlier namespace analysis, all subtrees that contain an
563      * _INI method are tagged.
564      *
565      * If this device subtree does not contain any _INI methods, we
566      * can exit now and stop traversing this entire subtree.
567      */
568     if (!(DeviceNode->Flags & ANOBJ_SUBTREE_HAS_INI))
569     {
570         return_ACPI_STATUS (AE_CTRL_DEPTH);
571     }
572 
573     /*
574      * Run _STA to determine if this device is present and functioning. We
575      * must know this information for two important reasons (from ACPI spec):
576      *
577      * 1) We can only run _INI if the device is present.
578      * 2) We must abort the device tree walk on this subtree if the device is
579      *    not present and is not functional (we will not examine the children)
580      *
581      * The _STA method is not required to be present under the device, we
582      * assume the device is present if _STA does not exist.
583      */
584     ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
585         ACPI_TYPE_METHOD, DeviceNode, METHOD_NAME__STA));
586 
587     Status = AcpiUtExecute_STA (DeviceNode, &Flags);
588     if (ACPI_FAILURE (Status))
589     {
590         /* Ignore error and move on to next device */
591 
592         return_ACPI_STATUS (AE_OK);
593     }
594 
595     /*
596      * Flags == -1 means that _STA was not found. In this case, we assume that
597      * the device is both present and functional.
598      *
599      * From the ACPI spec, description of _STA:
600      *
601      * "If a device object (including the processor object) does not have an
602      * _STA object, then OSPM assumes that all of the above bits are set (in
603      * other words, the device is present, ..., and functioning)"
604      */
605     if (Flags != ACPI_UINT32_MAX)
606     {
607         WalkInfo->Num_STA++;
608     }
609 
610     /*
611      * Examine the PRESENT and FUNCTIONING status bits
612      *
613      * Note: ACPI spec does not seem to specify behavior for the present but
614      * not functioning case, so we assume functioning if present.
615      */
616     if (!(Flags & ACPI_STA_DEVICE_PRESENT))
617     {
618         /* Device is not present, we must examine the Functioning bit */
619 
620         if (Flags & ACPI_STA_DEVICE_FUNCTIONING)
621         {
622             /*
623              * Device is not present but is "functioning". In this case,
624              * we will not run _INI, but we continue to examine the children
625              * of this device.
626              *
627              * From the ACPI spec, description of _STA: (Note - no mention
628              * of whether to run _INI or not on the device in question)
629              *
630              * "_STA may return bit 0 clear (not present) with bit 3 set
631              * (device is functional). This case is used to indicate a valid
632              * device for which no device driver should be loaded (for example,
633              * a bridge device.) Children of this device may be present and
634              * valid. OSPM should continue enumeration below a device whose
635              * _STA returns this bit combination"
636              */
637             return_ACPI_STATUS (AE_OK);
638         }
639         else
640         {
641             /*
642              * Device is not present and is not functioning. We must abort the
643              * walk of this subtree immediately -- don't look at the children
644              * of such a device.
645              *
646              * From the ACPI spec, description of _INI:
647              *
648              * "If the _STA method indicates that the device is not present,
649              * OSPM will not run the _INI and will not examine the children
650              * of the device for _INI methods"
651              */
652             return_ACPI_STATUS (AE_CTRL_DEPTH);
653         }
654     }
655 
656     /*
657      * The device is present or is assumed present if no _STA exists.
658      * Run the _INI if it exists (not required to exist)
659      *
660      * Note: We know there is an _INI within this subtree, but it may not be
661      * under this particular device, it may be lower in the branch.
662      */
663     ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
664         ACPI_TYPE_METHOD, DeviceNode, METHOD_NAME__INI));
665 
666     Info->PrefixNode = DeviceNode;
667     Info->Pathname = METHOD_NAME__INI;
668     Info->Parameters = NULL;
669     Info->Flags = ACPI_IGNORE_RETURN_VALUE;
670 
671     Status = AcpiNsEvaluate (Info);
672     if (ACPI_SUCCESS (Status))
673     {
674         WalkInfo->Num_INI++;
675 
676         if ((AcpiDbgLevel <= ACPI_LV_ALL_EXCEPTIONS) &&
677             (!(AcpiDbgLevel & ACPI_LV_INFO)))
678         {
679             ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
680         }
681     }
682 
683 #ifdef ACPI_DEBUG_OUTPUT
684     else if (Status != AE_NOT_FOUND)
685     {
686         /* Ignore error and move on to next device */
687 
688         char *ScopeName = AcpiNsGetExternalPathname (Info->ResolvedNode);
689 
690         ACPI_EXCEPTION ((AE_INFO, Status, "during %s._INI execution",
691             ScopeName));
692         ACPI_FREE (ScopeName);
693     }
694 #endif
695 
696     /* Ignore errors from above */
697 
698     Status = AE_OK;
699 
700     /*
701      * The _INI method has been run if present; call the Global Initialization
702      * Handler for this device.
703      */
704     if (AcpiGbl_InitHandler)
705     {
706         Status = AcpiGbl_InitHandler (DeviceNode, ACPI_INIT_DEVICE_INI);
707     }
708 
709     return_ACPI_STATUS (Status);
710 }
711