nsaccess.c revision 85756
1/*******************************************************************************
2 *
3 * Module Name: nsaccess - Top-level functions for accessing ACPI namespace
4 *              $Revision: 135 $
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, 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#define __NSACCESS_C__
118
119#include "acpi.h"
120#include "amlcode.h"
121#include "acinterp.h"
122#include "acnamesp.h"
123#include "acdispat.h"
124
125
126#define _COMPONENT          ACPI_NAMESPACE
127        MODULE_NAME         ("nsaccess")
128
129
130/*******************************************************************************
131 *
132 * FUNCTION:    AcpiNsRootInitialize
133 *
134 * PARAMETERS:  None
135 *
136 * RETURN:      Status
137 *
138 * DESCRIPTION: Allocate and initialize the default root named objects
139 *
140 * MUTEX:       Locks namespace for entire execution
141 *
142 ******************************************************************************/
143
144ACPI_STATUS
145AcpiNsRootInitialize (void)
146{
147    ACPI_STATUS             Status = AE_OK;
148    const PREDEFINED_NAMES  *InitVal = NULL;
149    ACPI_NAMESPACE_NODE     *NewNode;
150    ACPI_OPERAND_OBJECT     *ObjDesc;
151
152
153    FUNCTION_TRACE ("NsRootInitialize");
154
155
156    AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
157
158    /*
159     * The global root ptr is initially NULL, so a non-NULL value indicates
160     * that AcpiNsRootInitialize() has already been called; just return.
161     */
162    if (AcpiGbl_RootNode)
163    {
164        Status = AE_OK;
165        goto UnlockAndExit;
166    }
167
168
169    /*
170     * Tell the rest of the subsystem that the root is initialized
171     * (This is OK because the namespace is locked)
172     */
173    AcpiGbl_RootNode = &AcpiGbl_RootNodeStruct;
174
175
176    /* Enter the pre-defined names in the name table */
177
178    ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Entering predefined entries into namespace\n"));
179
180    for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++)
181    {
182        Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type,
183                                IMODE_LOAD_PASS2, NS_NO_UPSEARCH,
184                                NULL, &NewNode);
185
186        if (ACPI_FAILURE (Status) || (!NewNode)) /* Must be on same line for code converter */
187        {
188            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
189                "Could not create predefined name %s, %s\n",
190                InitVal->Name, AcpiFormatException (Status)));
191        }
192
193        /*
194         * Name entered successfully.
195         * If entry in PreDefinedNames[] specifies an
196         * initial value, create the initial value.
197         */
198        if (InitVal->Val)
199        {
200            /*
201             * Entry requests an initial value, allocate a
202             * descriptor for it.
203             */
204            ObjDesc = AcpiUtCreateInternalObject (InitVal->Type);
205            if (!ObjDesc)
206            {
207                Status = AE_NO_MEMORY;
208                goto UnlockAndExit;
209            }
210
211            /*
212             * Convert value string from table entry to
213             * internal representation. Only types actually
214             * used for initial values are implemented here.
215             */
216
217            switch (InitVal->Type)
218            {
219
220            case ACPI_TYPE_INTEGER:
221
222                ObjDesc->Integer.Value =
223                        (ACPI_INTEGER) STRTOUL (InitVal->Val, NULL, 10);
224                break;
225
226
227            case ACPI_TYPE_STRING:
228
229                /*
230                 * Build an object around the static string
231                 */
232                ObjDesc->String.Length = STRLEN (InitVal->Val);
233                ObjDesc->String.Pointer = InitVal->Val;
234                ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
235                break;
236
237
238            case ACPI_TYPE_MUTEX:
239
240                ObjDesc->Mutex.SyncLevel =
241                            (UINT16) STRTOUL (InitVal->Val, NULL, 10);
242
243                if (STRCMP (InitVal->Name, "_GL_") == 0)
244                {
245                    /*
246                     * Create a counting semaphore for the
247                     * global lock
248                     */
249                    Status = AcpiOsCreateSemaphore (ACPI_NO_UNIT_LIMIT,
250                                            1, &ObjDesc->Mutex.Semaphore);
251
252                    if (ACPI_FAILURE (Status))
253                    {
254                        goto UnlockAndExit;
255                    }
256
257                    /*
258                     * We just created the mutex for the
259                     * global lock, save it
260                     */
261                    AcpiGbl_GlobalLockSemaphore = ObjDesc->Mutex.Semaphore;
262                }
263
264                else
265                {
266                    /* Create a mutex */
267
268                    Status = AcpiOsCreateSemaphore (1, 1,
269                                        &ObjDesc->Mutex.Semaphore);
270
271                    if (ACPI_FAILURE (Status))
272                    {
273                        goto UnlockAndExit;
274                    }
275                }
276                break;
277
278
279            default:
280                REPORT_ERROR (("Unsupported initial type value %X\n",
281                    InitVal->Type));
282                AcpiUtRemoveReference (ObjDesc);
283                ObjDesc = NULL;
284                continue;
285            }
286
287            /* Store pointer to value descriptor in the Node */
288
289            AcpiNsAttachObject (NewNode, ObjDesc, ObjDesc->Common.Type);
290
291            /* Remove local reference to the object */
292
293            AcpiUtRemoveReference (ObjDesc);
294        }
295    }
296
297
298UnlockAndExit:
299    AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
300    return_ACPI_STATUS (Status);
301}
302
303
304/*******************************************************************************
305 *
306 * FUNCTION:    AcpiNsLookup
307 *
308 * PARAMETERS:  PrefixNode      - Search scope if name is not fully qualified
309 *              Pathname        - Search pathname, in internal format
310 *                                (as represented in the AML stream)
311 *              Type            - Type associated with name
312 *              InterpreterMode - IMODE_LOAD_PASS2 => add name if not found
313 *              Flags           - Flags describing the search restrictions
314 *              WalkState       - Current state of the walk
315 *              ReturnNode      - Where the Node is placed (if found
316 *                                or created successfully)
317 *
318 * RETURN:      Status
319 *
320 * DESCRIPTION: Find or enter the passed name in the name space.
321 *              Log an error if name not found in Exec mode.
322 *
323 * MUTEX:       Assumes namespace is locked.
324 *
325 ******************************************************************************/
326
327ACPI_STATUS
328AcpiNsLookup (
329    ACPI_GENERIC_STATE      *ScopeInfo,
330    NATIVE_CHAR             *Pathname,
331    ACPI_OBJECT_TYPE8       Type,
332    OPERATING_MODE          InterpreterMode,
333    UINT32                  Flags,
334    ACPI_WALK_STATE         *WalkState,
335    ACPI_NAMESPACE_NODE     **ReturnNode)
336{
337    ACPI_STATUS             Status;
338    ACPI_NAMESPACE_NODE     *PrefixNode;
339    ACPI_NAMESPACE_NODE     *CurrentNode = NULL;
340    ACPI_NAMESPACE_NODE     *ScopeToPush = NULL;
341    ACPI_NAMESPACE_NODE     *ThisNode = NULL;
342    UINT32                  NumSegments;
343    ACPI_NAME               SimpleName;
344    BOOLEAN                 NullNamePath = FALSE;
345    ACPI_OBJECT_TYPE8       TypeToCheckFor;
346    ACPI_OBJECT_TYPE8       ThisSearchType;
347    UINT32                  LocalFlags = Flags & ~NS_ERROR_IF_FOUND;
348
349    DEBUG_EXEC              (UINT32 i;)
350
351
352    FUNCTION_TRACE ("NsLookup");
353
354
355    if (!ReturnNode)
356    {
357        return_ACPI_STATUS (AE_BAD_PARAMETER);
358    }
359
360
361    AcpiGbl_NsLookupCount++;
362
363    *ReturnNode = ENTRY_NOT_FOUND;
364
365
366    if (!AcpiGbl_RootNode)
367    {
368        return (AE_NO_NAMESPACE);
369    }
370
371    /*
372     * Get the prefix scope.
373     * A null scope means use the root scope
374     */
375    if ((!ScopeInfo) ||
376        (!ScopeInfo->Scope.Node))
377    {
378        ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Null scope prefix, using root node (%p)\n",
379            AcpiGbl_RootNode));
380
381        PrefixNode = AcpiGbl_RootNode;
382    }
383    else
384    {
385        PrefixNode = ScopeInfo->Scope.Node;
386    }
387
388
389    /*
390     * This check is explicitly split to relax the TypeToCheckFor
391     * conditions for BankFieldDefn.  Originally, both BankFieldDefn and
392     * DefFieldDefn caused TypeToCheckFor to be set to ACPI_TYPE_REGION,
393     * but the BankFieldDefn may also check for a Field definition as well
394     * as an OperationRegion.
395     */
396    if (INTERNAL_TYPE_FIELD_DEFN == Type)
397    {
398        /* DefFieldDefn defines fields in a Region */
399
400        TypeToCheckFor = ACPI_TYPE_REGION;
401    }
402
403    else if (INTERNAL_TYPE_BANK_FIELD_DEFN == Type)
404    {
405        /* BankFieldDefn defines data fields in a Field Object */
406
407        TypeToCheckFor = ACPI_TYPE_ANY;
408    }
409
410    else
411    {
412        TypeToCheckFor = Type;
413    }
414
415
416    /* TBD: [Restructure] - Move the pathname stuff into a new procedure */
417
418    /* Examine the name pointer */
419
420    if (!Pathname)
421    {
422        /*  8-12-98 ASL Grammar Update supports null NamePath   */
423
424        NullNamePath = TRUE;
425        NumSegments = 0;
426        ThisNode = AcpiGbl_RootNode;
427
428        ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
429            "Null Pathname (Zero segments),  Flags=%x\n", Flags));
430    }
431
432    else
433    {
434        /*
435         * Valid name pointer (Internal name format)
436         *
437         * Check for prefixes.  As represented in the AML stream, a
438         * Pathname consists of an optional scope prefix followed by
439         * a segment part.
440         *
441         * If present, the scope prefix is either a RootPrefix (in
442         * which case the name is fully qualified), or zero or more
443         * ParentPrefixes (in which case the name's scope is relative
444         * to the current scope).
445         *
446         * The segment part consists of either:
447         *  - A single 4-byte name segment, or
448         *  - A DualNamePrefix followed by two 4-byte name segments, or
449         *  - A MultiNamePrefixOp, followed by a byte indicating the
450         *    number of segments and the segments themselves.
451         */
452        if (*Pathname == AML_ROOT_PREFIX)
453        {
454            /* Pathname is fully qualified, look in root name table */
455
456            CurrentNode = AcpiGbl_RootNode;
457
458            /* point to segment part */
459
460            Pathname++;
461
462            ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching from root [%p]\n",
463                CurrentNode));
464
465            /* Direct reference to root, "\" */
466
467            if (!(*Pathname))
468            {
469                ThisNode = AcpiGbl_RootNode;
470                goto CheckForNewScopeAndExit;
471            }
472        }
473
474        else
475        {
476            /* Pathname is relative to current scope, start there */
477
478            CurrentNode = PrefixNode;
479
480            ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching relative to pfx scope [%p]\n",
481                PrefixNode));
482
483            /*
484             * Handle up-prefix (carat).  More than one prefix
485             * is supported
486             */
487            while (*Pathname == AML_PARENT_PREFIX)
488            {
489                /* Point to segment part or next ParentPrefix */
490
491                Pathname++;
492
493                /*  Backup to the parent's scope  */
494
495                ThisNode = AcpiNsGetParentObject (CurrentNode);
496                if (!ThisNode)
497                {
498                    /* Current scope has no parent scope */
499
500                    REPORT_ERROR (
501                        ("Too many parent prefixes (^) - reached root\n"));
502                    return_ACPI_STATUS (AE_NOT_FOUND);
503                }
504
505                CurrentNode = ThisNode;
506            }
507        }
508
509
510        /*
511         * Examine the name prefix opcode, if any,
512         * to determine the number of segments
513         */
514        if (*Pathname == AML_DUAL_NAME_PREFIX)
515        {
516            NumSegments = 2;
517
518            /* point to first segment */
519
520            Pathname++;
521
522            ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
523                "Dual Pathname (2 segments, Flags=%X)\n", Flags));
524        }
525
526        else if (*Pathname == AML_MULTI_NAME_PREFIX_OP)
527        {
528            NumSegments = (UINT32)* (UINT8 *) ++Pathname;
529
530            /* point to first segment */
531
532            Pathname++;
533
534            ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
535                "Multi Pathname (%d Segments, Flags=%X) \n",
536                NumSegments, Flags));
537        }
538
539        else
540        {
541            /*
542             * No Dual or Multi prefix, hence there is only one
543             * segment and Pathname is already pointing to it.
544             */
545            NumSegments = 1;
546
547            ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
548                "Simple Pathname (1 segment, Flags=%X)\n", Flags));
549        }
550
551#ifdef ACPI_DEBUG
552
553        /* TBD: [Restructure] Make this a procedure */
554
555        /* Debug only: print the entire name that we are about to lookup */
556
557        ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "["));
558
559        for (i = 0; i < NumSegments; i++)
560        {
561            ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES, "%4.4s/", (char*)&Pathname[i * 4]));
562        }
563        ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES, "]\n"));
564#endif
565    }
566
567
568    /*
569     * Search namespace for each segment of the name.
570     * Loop through and verify/add each name segment.
571     */
572    while (NumSegments-- && CurrentNode)
573    {
574        /*
575         * Search for the current name segment under the current
576         * named object.  The Type is significant only at the last (topmost)
577         * level.  (We don't care about the types along the path, only
578         * the type of the final target object.)
579         */
580        ThisSearchType = ACPI_TYPE_ANY;
581        if (!NumSegments)
582        {
583            ThisSearchType = Type;
584            LocalFlags = Flags;
585        }
586
587        /* Pluck one ACPI name from the front of the pathname */
588
589        MOVE_UNALIGNED32_TO_32 (&SimpleName, Pathname);
590
591        /* Try to find the ACPI name */
592
593        Status = AcpiNsSearchAndEnter (SimpleName, WalkState,
594                                        CurrentNode, InterpreterMode,
595                                        ThisSearchType, LocalFlags,
596                                        &ThisNode);
597
598        if (ACPI_FAILURE (Status))
599        {
600            if (Status == AE_NOT_FOUND)
601            {
602                /* Name not found in ACPI namespace  */
603
604                ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
605                    "Name [%4.4s] not found in scope %p\n",
606                    (char*)&SimpleName, CurrentNode));
607            }
608
609            return_ACPI_STATUS (Status);
610        }
611
612
613        /*
614         * If 1) This is the last segment (NumSegments == 0)
615         *    2) and looking for a specific type
616         *       (Not checking for TYPE_ANY)
617         *    3) Which is not an alias
618         *    4) which is not a local type (TYPE_DEF_ANY)
619         *    5) which is not a local type (TYPE_SCOPE)
620         *    6) which is not a local type (TYPE_INDEX_FIELD_DEFN)
621         *    7) and type of object is known (not TYPE_ANY)
622         *    8) and object does not match request
623         *
624         * Then we have a type mismatch.  Just warn and ignore it.
625         */
626        if ((NumSegments        == 0)                               &&
627            (TypeToCheckFor     != ACPI_TYPE_ANY)                   &&
628            (TypeToCheckFor     != INTERNAL_TYPE_ALIAS)             &&
629            (TypeToCheckFor     != INTERNAL_TYPE_DEF_ANY)           &&
630            (TypeToCheckFor     != INTERNAL_TYPE_SCOPE)             &&
631            (TypeToCheckFor     != INTERNAL_TYPE_INDEX_FIELD_DEFN)  &&
632            (ThisNode->Type     != ACPI_TYPE_ANY)                   &&
633            (ThisNode->Type     != TypeToCheckFor))
634        {
635            /* Complain about a type mismatch */
636
637            REPORT_WARNING (
638                ("NsLookup: %4.4s, type %X, checking for type %X\n",
639                (char*)&SimpleName, ThisNode->Type, TypeToCheckFor));
640        }
641
642        /*
643         * If this is the last name segment and we are not looking for a
644         * specific type, but the type of found object is known, use that type
645         * to see if it opens a scope.
646         */
647        if ((0 == NumSegments) && (ACPI_TYPE_ANY == Type))
648        {
649            Type = ThisNode->Type;
650        }
651
652        if ((NumSegments || AcpiNsOpensScope (Type)) &&
653            (ThisNode->Child == NULL))
654        {
655            /*
656             * More segments or the type implies enclosed scope,
657             * and the next scope has not been allocated.
658             */
659            ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Load mode=%X  ThisNode=%p\n",
660                InterpreterMode, ThisNode));
661        }
662
663        CurrentNode = ThisNode;
664
665        /* point to next name segment */
666
667        Pathname += ACPI_NAME_SIZE;
668    }
669
670
671    /*
672     * Always check if we need to open a new scope
673     */
674CheckForNewScopeAndExit:
675
676    if (!(Flags & NS_DONT_OPEN_SCOPE) && (WalkState))
677    {
678        /*
679         * If entry is a type which opens a scope,
680         * push the new scope on the scope stack.
681         */
682        if (AcpiNsOpensScope (TypeToCheckFor))
683        {
684            /*  8-12-98 ASL Grammar Update supports null NamePath   */
685
686            if (NullNamePath)
687            {
688                /* TBD: [Investigate] - is this the correct thing to do? */
689
690                ScopeToPush = NULL;
691            }
692            else
693            {
694                ScopeToPush = ThisNode;
695            }
696
697            Status = AcpiDsScopeStackPush (ScopeToPush, Type,
698                                            WalkState);
699            if (ACPI_FAILURE (Status))
700            {
701                return_ACPI_STATUS (Status);
702            }
703
704            ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Set global scope to %p\n", ScopeToPush));
705        }
706    }
707
708    *ReturnNode = ThisNode;
709    return_ACPI_STATUS (AE_OK);
710}
711
712