]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/dev/acpica/evrgnini.c
This commit was generated by cvs2svn to compensate for changes in r156283,
[FreeBSD/FreeBSD.git] / sys / contrib / dev / acpica / evrgnini.c
1 /******************************************************************************
2  *
3  * Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
4  *              $Revision: 1.78 $
5  *
6  *****************************************************************************/
7
8 /******************************************************************************
9  *
10  * 1. Copyright Notice
11  *
12  * Some or all of this work - Copyright (c) 1999 - 2005, 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 __EVRGNINI_C__
119
120 #include <contrib/dev/acpica/acpi.h>
121 #include <contrib/dev/acpica/acevents.h>
122 #include <contrib/dev/acpica/acnamesp.h>
123
124 #define _COMPONENT          ACPI_EVENTS
125         ACPI_MODULE_NAME    ("evrgnini")
126
127
128 /*******************************************************************************
129  *
130  * FUNCTION:    AcpiEvSystemMemoryRegionSetup
131  *
132  * PARAMETERS:  Handle              - Region we are interested in
133  *              Function            - Start or stop
134  *              HandlerContext      - Address space handler context
135  *              RegionContext       - Region specific context
136  *
137  * RETURN:      Status
138  *
139  * DESCRIPTION: Setup a SystemMemory operation region
140  *
141  ******************************************************************************/
142
143 ACPI_STATUS
144 AcpiEvSystemMemoryRegionSetup (
145     ACPI_HANDLE             Handle,
146     UINT32                  Function,
147     void                    *HandlerContext,
148     void                    **RegionContext)
149 {
150     ACPI_OPERAND_OBJECT     *RegionDesc = (ACPI_OPERAND_OBJECT *) Handle;
151     ACPI_MEM_SPACE_CONTEXT  *LocalRegionContext;
152
153
154     ACPI_FUNCTION_TRACE ("EvSystemMemoryRegionSetup");
155
156
157     if (Function == ACPI_REGION_DEACTIVATE)
158     {
159         if (*RegionContext)
160         {
161             ACPI_MEM_FREE (*RegionContext);
162             *RegionContext = NULL;
163         }
164         return_ACPI_STATUS (AE_OK);
165     }
166
167     /* Create a new context */
168
169     LocalRegionContext = ACPI_MEM_CALLOCATE (sizeof (ACPI_MEM_SPACE_CONTEXT));
170     if (!(LocalRegionContext))
171     {
172         return_ACPI_STATUS (AE_NO_MEMORY);
173     }
174
175     /* Save the region length and address for use in the handler */
176
177     LocalRegionContext->Length  = RegionDesc->Region.Length;
178     LocalRegionContext->Address = RegionDesc->Region.Address;
179
180     *RegionContext = LocalRegionContext;
181     return_ACPI_STATUS (AE_OK);
182 }
183
184
185 /*******************************************************************************
186  *
187  * FUNCTION:    AcpiEvIoSpaceRegionSetup
188  *
189  * PARAMETERS:  Handle              - Region we are interested in
190  *              Function            - Start or stop
191  *              HandlerContext      - Address space handler context
192  *              RegionContext       - Region specific context
193  *
194  * RETURN:      Status
195  *
196  * DESCRIPTION: Setup a IO operation region
197  *
198  ******************************************************************************/
199
200 ACPI_STATUS
201 AcpiEvIoSpaceRegionSetup (
202     ACPI_HANDLE             Handle,
203     UINT32                  Function,
204     void                    *HandlerContext,
205     void                    **RegionContext)
206 {
207     ACPI_FUNCTION_TRACE ("EvIoSpaceRegionSetup");
208
209
210     if (Function == ACPI_REGION_DEACTIVATE)
211     {
212         *RegionContext = NULL;
213     }
214     else
215     {
216         *RegionContext = HandlerContext;
217     }
218
219     return_ACPI_STATUS (AE_OK);
220 }
221
222
223 /*******************************************************************************
224  *
225  * FUNCTION:    AcpiEvPciConfigRegionSetup
226  *
227  * PARAMETERS:  Handle              - Region we are interested in
228  *              Function            - Start or stop
229  *              HandlerContext      - Address space handler context
230  *              RegionContext       - Region specific context
231  *
232  * RETURN:      Status
233  *
234  * DESCRIPTION: Setup a PCI_Config operation region
235  *
236  * MUTEX:       Assumes namespace is not locked
237  *
238  ******************************************************************************/
239
240 ACPI_STATUS
241 AcpiEvPciConfigRegionSetup (
242     ACPI_HANDLE             Handle,
243     UINT32                  Function,
244     void                    *HandlerContext,
245     void                    **RegionContext)
246 {
247     ACPI_STATUS             Status = AE_OK;
248     ACPI_INTEGER            PciValue;
249     ACPI_PCI_ID             *PciId = *RegionContext;
250     ACPI_OPERAND_OBJECT     *HandlerObj;
251     ACPI_NAMESPACE_NODE     *ParentNode;
252     ACPI_NAMESPACE_NODE     *PciRootNode;
253     ACPI_OPERAND_OBJECT     *RegionObj = (ACPI_OPERAND_OBJECT  *) Handle;
254     ACPI_DEVICE_ID          ObjectHID;
255
256
257     ACPI_FUNCTION_TRACE ("EvPciConfigRegionSetup");
258
259
260     HandlerObj = RegionObj->Region.Handler;
261     if (!HandlerObj)
262     {
263         /*
264          * No installed handler. This shouldn't happen because the dispatch
265          * routine checks before we get here, but we check again just in case.
266          */
267         ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
268             "Attempting to init a region %p, with no handler\n", RegionObj));
269         return_ACPI_STATUS (AE_NOT_EXIST);
270     }
271
272     *RegionContext = NULL;
273     if (Function == ACPI_REGION_DEACTIVATE)
274     {
275         if (PciId)
276         {
277             ACPI_MEM_FREE (PciId);
278         }
279         return_ACPI_STATUS (Status);
280     }
281
282     ParentNode = AcpiNsGetParentNode (RegionObj->Region.Node);
283
284     /*
285      * Get the _SEG and _BBN values from the device upon which the handler
286      * is installed.
287      *
288      * We need to get the _SEG and _BBN objects relative to the PCI BUS device.
289      * This is the device the handler has been registered to handle.
290      */
291
292     /*
293      * If the AddressSpace.Node is still pointing to the root, we need
294      * to scan upward for a PCI Root bridge and re-associate the OpRegion
295      * handlers with that device.
296      */
297     if (HandlerObj->AddressSpace.Node == AcpiGbl_RootNode)
298     {
299         /* Start search from the parent object */
300
301         PciRootNode = ParentNode;
302         while (PciRootNode != AcpiGbl_RootNode)
303         {
304             Status = AcpiUtExecute_HID (PciRootNode, &ObjectHID);
305             if (ACPI_SUCCESS (Status))
306             {
307                 /*
308                  * Got a valid _HID string, check if this is a PCI root.
309                  * New for ACPI 3.0: check for a PCI Express root also.
310                  */
311                 if (!(ACPI_STRNCMP (ObjectHID.Value, PCI_ROOT_HID_STRING,
312                                     sizeof (PCI_ROOT_HID_STRING))           ||
313                     !(ACPI_STRNCMP (ObjectHID.Value, PCI_EXPRESS_ROOT_HID_STRING,
314                                     sizeof (PCI_EXPRESS_ROOT_HID_STRING)))))
315                 {
316                     /* Install a handler for this PCI root bridge */
317
318                     Status = AcpiInstallAddressSpaceHandler ((ACPI_HANDLE) PciRootNode,
319                                         ACPI_ADR_SPACE_PCI_CONFIG,
320                                         ACPI_DEFAULT_HANDLER, NULL, NULL);
321                     if (ACPI_FAILURE (Status))
322                     {
323                         if (Status == AE_SAME_HANDLER)
324                         {
325                             /*
326                              * It is OK if the handler is already installed on the root
327                              * bridge.  Still need to return a context object for the
328                              * new PCI_Config operation region, however.
329                              */
330                             Status = AE_OK;
331                         }
332                         else
333                         {
334                             ACPI_REPORT_ERROR ((
335                                 "Could not install PciConfig handler for Root Bridge %4.4s, %s\n",
336                                 AcpiUtGetNodeName (PciRootNode), AcpiFormatException (Status)));
337                         }
338                     }
339                     break;
340                 }
341             }
342
343             PciRootNode = AcpiNsGetParentNode (PciRootNode);
344         }
345
346         /* PCI root bridge not found, use namespace root node */
347     }
348     else
349     {
350         PciRootNode = HandlerObj->AddressSpace.Node;
351     }
352
353     /*
354      * If this region is now initialized, we are done.
355      * (InstallAddressSpaceHandler could have initialized it)
356      */
357     if (RegionObj->Region.Flags & AOPOBJ_SETUP_COMPLETE)
358     {
359         return_ACPI_STATUS (AE_OK);
360     }
361
362     /* Region is still not initialized. Create a new context */
363
364     PciId = ACPI_MEM_CALLOCATE (sizeof (ACPI_PCI_ID));
365     if (!PciId)
366     {
367         return_ACPI_STATUS (AE_NO_MEMORY);
368     }
369
370     /*
371      * For PCI_Config space access, we need the segment, bus,
372      * device and function numbers.  Acquire them here.
373      */
374
375     /*
376      * Get the PCI device and function numbers from the _ADR object
377      * contained in the parent's scope.
378      */
379     Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, ParentNode, &PciValue);
380
381     /*
382      * The default is zero, and since the allocation above zeroed
383      * the data, just do nothing on failure.
384      */
385     if (ACPI_SUCCESS (Status))
386     {
387         PciId->Device   = ACPI_HIWORD (ACPI_LODWORD (PciValue));
388         PciId->Function = ACPI_LOWORD (ACPI_LODWORD (PciValue));
389     }
390
391     /* The PCI segment number comes from the _SEG method */
392
393     Status = AcpiUtEvaluateNumericObject (METHOD_NAME__SEG, PciRootNode, &PciValue);
394     if (ACPI_SUCCESS (Status))
395     {
396         PciId->Segment = ACPI_LOWORD (PciValue);
397     }
398
399     /* The PCI bus number comes from the _BBN method */
400
401     Status = AcpiUtEvaluateNumericObject (METHOD_NAME__BBN, PciRootNode, &PciValue);
402     if (ACPI_SUCCESS (Status))
403     {
404         PciId->Bus = ACPI_LOWORD (PciValue);
405     }
406
407     /* Complete this device's PciId */
408
409     AcpiOsDerivePciId (PciRootNode, RegionObj->Region.Node, &PciId);
410
411     *RegionContext = PciId;
412     return_ACPI_STATUS (AE_OK);
413 }
414
415
416 /*******************************************************************************
417  *
418  * FUNCTION:    AcpiEvPciBarRegionSetup
419  *
420  * PARAMETERS:  Handle              - Region we are interested in
421  *              Function            - Start or stop
422  *              HandlerContext      - Address space handler context
423  *              RegionContext       - Region specific context
424  *
425  * RETURN:      Status
426  *
427  * DESCRIPTION: Setup a PciBAR operation region
428  *
429  * MUTEX:       Assumes namespace is not locked
430  *
431  ******************************************************************************/
432
433 ACPI_STATUS
434 AcpiEvPciBarRegionSetup (
435     ACPI_HANDLE             Handle,
436     UINT32                  Function,
437     void                    *HandlerContext,
438     void                    **RegionContext)
439 {
440     ACPI_FUNCTION_TRACE ("EvPciBarRegionSetup");
441
442
443     return_ACPI_STATUS (AE_OK);
444 }
445
446
447 /*******************************************************************************
448  *
449  * FUNCTION:    AcpiEvCmosRegionSetup
450  *
451  * PARAMETERS:  Handle              - Region we are interested in
452  *              Function            - Start or stop
453  *              HandlerContext      - Address space handler context
454  *              RegionContext       - Region specific context
455  *
456  * RETURN:      Status
457  *
458  * DESCRIPTION: Setup a CMOS operation region
459  *
460  * MUTEX:       Assumes namespace is not locked
461  *
462  ******************************************************************************/
463
464 ACPI_STATUS
465 AcpiEvCmosRegionSetup (
466     ACPI_HANDLE             Handle,
467     UINT32                  Function,
468     void                    *HandlerContext,
469     void                    **RegionContext)
470 {
471     ACPI_FUNCTION_TRACE ("EvCmosRegionSetup");
472
473
474     return_ACPI_STATUS (AE_OK);
475 }
476
477
478 /*******************************************************************************
479  *
480  * FUNCTION:    AcpiEvDefaultRegionSetup
481  *
482  * PARAMETERS:  Handle              - Region we are interested in
483  *              Function            - Start or stop
484  *              HandlerContext      - Address space handler context
485  *              RegionContext       - Region specific context
486  *
487  * RETURN:      Status
488  *
489  * DESCRIPTION: Default region initialization
490  *
491  ******************************************************************************/
492
493 ACPI_STATUS
494 AcpiEvDefaultRegionSetup (
495     ACPI_HANDLE             Handle,
496     UINT32                  Function,
497     void                    *HandlerContext,
498     void                    **RegionContext)
499 {
500     ACPI_FUNCTION_TRACE ("EvDefaultRegionSetup");
501
502
503     if (Function == ACPI_REGION_DEACTIVATE)
504     {
505         *RegionContext = NULL;
506     }
507     else
508     {
509         *RegionContext = HandlerContext;
510     }
511
512     return_ACPI_STATUS (AE_OK);
513 }
514
515
516 /*******************************************************************************
517  *
518  * FUNCTION:    AcpiEvInitializeRegion
519  *
520  * PARAMETERS:  RegionObj       - Region we are initializing
521  *              AcpiNsLocked    - Is namespace locked?
522  *
523  * RETURN:      Status
524  *
525  * DESCRIPTION: Initializes the region, finds any _REG methods and saves them
526  *              for execution at a later time
527  *
528  *              Get the appropriate address space handler for a newly
529  *              created region.
530  *
531  *              This also performs address space specific initialization.  For
532  *              example, PCI regions must have an _ADR object that contains
533  *              a PCI address in the scope of the definition.  This address is
534  *              required to perform an access to PCI config space.
535  *
536  ******************************************************************************/
537
538 ACPI_STATUS
539 AcpiEvInitializeRegion (
540     ACPI_OPERAND_OBJECT     *RegionObj,
541     BOOLEAN                 AcpiNsLocked)
542 {
543     ACPI_OPERAND_OBJECT     *HandlerObj;
544     ACPI_OPERAND_OBJECT     *ObjDesc;
545     ACPI_ADR_SPACE_TYPE     SpaceId;
546     ACPI_NAMESPACE_NODE     *Node;
547     ACPI_STATUS             Status;
548     ACPI_NAMESPACE_NODE     *MethodNode;
549     ACPI_NAME               *RegNamePtr = (ACPI_NAME *) METHOD_NAME__REG;
550     ACPI_OPERAND_OBJECT     *RegionObj2;
551
552
553     ACPI_FUNCTION_TRACE_U32 ("EvInitializeRegion", AcpiNsLocked);
554
555
556     if (!RegionObj)
557     {
558         return_ACPI_STATUS (AE_BAD_PARAMETER);
559     }
560
561     if (RegionObj->Common.Flags & AOPOBJ_OBJECT_INITIALIZED)
562     {
563         return_ACPI_STATUS (AE_OK);
564     }
565
566     RegionObj2 = AcpiNsGetSecondaryObject (RegionObj);
567     if (!RegionObj2)
568     {
569         return_ACPI_STATUS (AE_NOT_EXIST);
570     }
571
572     Node = AcpiNsGetParentNode (RegionObj->Region.Node);
573     SpaceId = RegionObj->Region.SpaceId;
574
575     /* Setup defaults */
576
577     RegionObj->Region.Handler = NULL;
578     RegionObj2->Extra.Method_REG = NULL;
579     RegionObj->Common.Flags &= ~(AOPOBJ_SETUP_COMPLETE);
580     RegionObj->Common.Flags |= AOPOBJ_OBJECT_INITIALIZED;
581
582     /* Find any "_REG" method associated with this region definition */
583
584     Status = AcpiNsSearchNode (*RegNamePtr, Node,
585                                 ACPI_TYPE_METHOD, &MethodNode);
586     if (ACPI_SUCCESS (Status))
587     {
588         /*
589          * The _REG method is optional and there can be only one per region
590          * definition.  This will be executed when the handler is attached
591          * or removed
592          */
593         RegionObj2->Extra.Method_REG = MethodNode;
594     }
595
596     /*
597      * The following loop depends upon the root Node having no parent
598      * ie: AcpiGbl_RootNode->ParentEntry being set to NULL
599      */
600     while (Node)
601     {
602         /* Check to see if a handler exists */
603
604         HandlerObj = NULL;
605         ObjDesc = AcpiNsGetAttachedObject (Node);
606         if (ObjDesc)
607         {
608             /* Can only be a handler if the object exists */
609
610             switch (Node->Type)
611             {
612             case ACPI_TYPE_DEVICE:
613
614                 HandlerObj = ObjDesc->Device.Handler;
615                 break;
616
617             case ACPI_TYPE_PROCESSOR:
618
619                 HandlerObj = ObjDesc->Processor.Handler;
620                 break;
621
622             case ACPI_TYPE_THERMAL:
623
624                 HandlerObj = ObjDesc->ThermalZone.Handler;
625                 break;
626
627             default:
628                 /* Ignore other objects */
629                 break;
630             }
631
632             while (HandlerObj)
633             {
634                 /* Is this handler of the correct type? */
635
636                 if (HandlerObj->AddressSpace.SpaceId == SpaceId)
637                 {
638                     /* Found correct handler */
639
640                     ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
641                         "Found handler %p for region %p in obj %p\n",
642                         HandlerObj, RegionObj, ObjDesc));
643
644                     Status = AcpiEvAttachRegion (HandlerObj, RegionObj,
645                                 AcpiNsLocked);
646
647                     /*
648                      * Tell all users that this region is usable by running the _REG
649                      * method
650                      */
651                     if (AcpiNsLocked)
652                     {
653                         Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
654                         if (ACPI_FAILURE (Status))
655                         {
656                             return_ACPI_STATUS (Status);
657                         }
658                     }
659
660                     Status = AcpiEvExecuteRegMethod (RegionObj, 1);
661
662                     if (AcpiNsLocked)
663                     {
664                         Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
665                         if (ACPI_FAILURE (Status))
666                         {
667                             return_ACPI_STATUS (Status);
668                         }
669                     }
670
671                     return_ACPI_STATUS (AE_OK);
672                 }
673
674                 /* Try next handler in the list */
675
676                 HandlerObj = HandlerObj->AddressSpace.Next;
677             }
678         }
679
680         /*
681          * This node does not have the handler we need;
682          * Pop up one level
683          */
684         Node = AcpiNsGetParentNode (Node);
685     }
686
687     /* If we get here, there is no handler for this region */
688
689     ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
690         "No handler for RegionType %s(%X) (RegionObj %p)\n",
691         AcpiUtGetRegionName (SpaceId), SpaceId, RegionObj));
692
693     return_ACPI_STATUS (AE_NOT_EXIST);
694 }
695