Sync ACPICA with Intel's version 20160831.
[dragonfly.git] / sys / contrib / dev / acpica / source / components / namespace / nsutils.c
blob2dafae471940506d52efe750d87fa2985b5e556d
1 /******************************************************************************
3 * Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
4 * parents and siblings and Scope manipulation
6 *****************************************************************************/
8 /*
9 * Copyright (C) 2000 - 2016, Intel Corp.
10 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
45 #include "acpi.h"
46 #include "accommon.h"
47 #include "acnamesp.h"
48 #include "amlcode.h"
50 #define _COMPONENT ACPI_NAMESPACE
51 ACPI_MODULE_NAME ("nsutils")
53 /* Local prototypes */
55 #ifdef ACPI_OBSOLETE_FUNCTIONS
56 ACPI_NAME
57 AcpiNsFindParentName (
58 ACPI_NAMESPACE_NODE *NodeToSearch);
59 #endif
62 /*******************************************************************************
64 * FUNCTION: AcpiNsPrintNodePathname
66 * PARAMETERS: Node - Object
67 * Message - Prefix message
69 * DESCRIPTION: Print an object's full namespace pathname
70 * Manages allocation/freeing of a pathname buffer
72 ******************************************************************************/
74 void
75 AcpiNsPrintNodePathname (
76 ACPI_NAMESPACE_NODE *Node,
77 const char *Message)
79 ACPI_BUFFER Buffer;
80 ACPI_STATUS Status;
83 if (!Node)
85 AcpiOsPrintf ("[NULL NAME]");
86 return;
89 /* Convert handle to full pathname and print it (with supplied message) */
91 Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
93 Status = AcpiNsHandleToPathname (Node, &Buffer, TRUE);
94 if (ACPI_SUCCESS (Status))
96 if (Message)
98 AcpiOsPrintf ("%s ", Message);
101 AcpiOsPrintf ("[%s] (Node %p)", (char *) Buffer.Pointer, Node);
102 ACPI_FREE (Buffer.Pointer);
107 /*******************************************************************************
109 * FUNCTION: AcpiNsGetType
111 * PARAMETERS: Node - Parent Node to be examined
113 * RETURN: Type field from Node whose handle is passed
115 * DESCRIPTION: Return the type of a Namespace node
117 ******************************************************************************/
119 ACPI_OBJECT_TYPE
120 AcpiNsGetType (
121 ACPI_NAMESPACE_NODE *Node)
123 ACPI_FUNCTION_TRACE (NsGetType);
126 if (!Node)
128 ACPI_WARNING ((AE_INFO, "Null Node parameter"));
129 return_UINT8 (ACPI_TYPE_ANY);
132 return_UINT8 (Node->Type);
136 /*******************************************************************************
138 * FUNCTION: AcpiNsLocal
140 * PARAMETERS: Type - A namespace object type
142 * RETURN: LOCAL if names must be found locally in objects of the
143 * passed type, 0 if enclosing scopes should be searched
145 * DESCRIPTION: Returns scope rule for the given object type.
147 ******************************************************************************/
149 UINT32
150 AcpiNsLocal (
151 ACPI_OBJECT_TYPE Type)
153 ACPI_FUNCTION_TRACE (NsLocal);
156 if (!AcpiUtValidObjectType (Type))
158 /* Type code out of range */
160 ACPI_WARNING ((AE_INFO, "Invalid Object Type 0x%X", Type));
161 return_UINT32 (ACPI_NS_NORMAL);
164 return_UINT32 (AcpiGbl_NsProperties[Type] & ACPI_NS_LOCAL);
168 /*******************************************************************************
170 * FUNCTION: AcpiNsGetInternalNameLength
172 * PARAMETERS: Info - Info struct initialized with the
173 * external name pointer.
175 * RETURN: None
177 * DESCRIPTION: Calculate the length of the internal (AML) namestring
178 * corresponding to the external (ASL) namestring.
180 ******************************************************************************/
182 void
183 AcpiNsGetInternalNameLength (
184 ACPI_NAMESTRING_INFO *Info)
186 const char *NextExternalChar;
187 UINT32 i;
190 ACPI_FUNCTION_ENTRY ();
193 NextExternalChar = Info->ExternalName;
194 Info->NumCarats = 0;
195 Info->NumSegments = 0;
196 Info->FullyQualified = FALSE;
199 * For the internal name, the required length is 4 bytes per segment,
200 * plus 1 each for RootPrefix, MultiNamePrefixOp, segment count,
201 * trailing null (which is not really needed, but no there's harm in
202 * putting it there)
204 * strlen() + 1 covers the first NameSeg, which has no path separator
206 if (ACPI_IS_ROOT_PREFIX (*NextExternalChar))
208 Info->FullyQualified = TRUE;
209 NextExternalChar++;
211 /* Skip redundant RootPrefix, like \\_SB.PCI0.SBRG.EC0 */
213 while (ACPI_IS_ROOT_PREFIX (*NextExternalChar))
215 NextExternalChar++;
218 else
220 /* Handle Carat prefixes */
222 while (ACPI_IS_PARENT_PREFIX (*NextExternalChar))
224 Info->NumCarats++;
225 NextExternalChar++;
230 * Determine the number of ACPI name "segments" by counting the number of
231 * path separators within the string. Start with one segment since the
232 * segment count is [(# separators) + 1], and zero separators is ok.
234 if (*NextExternalChar)
236 Info->NumSegments = 1;
237 for (i = 0; NextExternalChar[i]; i++)
239 if (ACPI_IS_PATH_SEPARATOR (NextExternalChar[i]))
241 Info->NumSegments++;
246 Info->Length = (ACPI_NAME_SIZE * Info->NumSegments) +
247 4 + Info->NumCarats;
249 Info->NextExternalChar = NextExternalChar;
253 /*******************************************************************************
255 * FUNCTION: AcpiNsBuildInternalName
257 * PARAMETERS: Info - Info struct fully initialized
259 * RETURN: Status
261 * DESCRIPTION: Construct the internal (AML) namestring
262 * corresponding to the external (ASL) namestring.
264 ******************************************************************************/
266 ACPI_STATUS
267 AcpiNsBuildInternalName (
268 ACPI_NAMESTRING_INFO *Info)
270 UINT32 NumSegments = Info->NumSegments;
271 char *InternalName = Info->InternalName;
272 const char *ExternalName = Info->NextExternalChar;
273 char *Result = NULL;
274 UINT32 i;
277 ACPI_FUNCTION_TRACE (NsBuildInternalName);
280 /* Setup the correct prefixes, counts, and pointers */
282 if (Info->FullyQualified)
284 InternalName[0] = AML_ROOT_PREFIX;
286 if (NumSegments <= 1)
288 Result = &InternalName[1];
290 else if (NumSegments == 2)
292 InternalName[1] = AML_DUAL_NAME_PREFIX;
293 Result = &InternalName[2];
295 else
297 InternalName[1] = AML_MULTI_NAME_PREFIX_OP;
298 InternalName[2] = (char) NumSegments;
299 Result = &InternalName[3];
302 else
305 * Not fully qualified.
306 * Handle Carats first, then append the name segments
308 i = 0;
309 if (Info->NumCarats)
311 for (i = 0; i < Info->NumCarats; i++)
313 InternalName[i] = AML_PARENT_PREFIX;
317 if (NumSegments <= 1)
319 Result = &InternalName[i];
321 else if (NumSegments == 2)
323 InternalName[i] = AML_DUAL_NAME_PREFIX;
324 Result = &InternalName[(ACPI_SIZE) i+1];
326 else
328 InternalName[i] = AML_MULTI_NAME_PREFIX_OP;
329 InternalName[(ACPI_SIZE) i+1] = (char) NumSegments;
330 Result = &InternalName[(ACPI_SIZE) i+2];
334 /* Build the name (minus path separators) */
336 for (; NumSegments; NumSegments--)
338 for (i = 0; i < ACPI_NAME_SIZE; i++)
340 if (ACPI_IS_PATH_SEPARATOR (*ExternalName) ||
341 (*ExternalName == 0))
343 /* Pad the segment with underscore(s) if segment is short */
345 Result[i] = '_';
347 else
349 /* Convert the character to uppercase and save it */
351 Result[i] = (char) toupper ((int) *ExternalName);
352 ExternalName++;
356 /* Now we must have a path separator, or the pathname is bad */
358 if (!ACPI_IS_PATH_SEPARATOR (*ExternalName) &&
359 (*ExternalName != 0))
361 return_ACPI_STATUS (AE_BAD_PATHNAME);
364 /* Move on the next segment */
366 ExternalName++;
367 Result += ACPI_NAME_SIZE;
370 /* Terminate the string */
372 *Result = 0;
374 if (Info->FullyQualified)
376 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Returning [%p] (abs) \"\\%s\"\n",
377 InternalName, InternalName));
379 else
381 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Returning [%p] (rel) \"%s\"\n",
382 InternalName, InternalName));
385 return_ACPI_STATUS (AE_OK);
389 /*******************************************************************************
391 * FUNCTION: AcpiNsInternalizeName
393 * PARAMETERS: *ExternalName - External representation of name
394 * **Converted Name - Where to return the resulting
395 * internal represention of the name
397 * RETURN: Status
399 * DESCRIPTION: Convert an external representation (e.g. "\_PR_.CPU0")
400 * to internal form (e.g. 5c 2f 02 5f 50 52 5f 43 50 55 30)
402 *******************************************************************************/
404 ACPI_STATUS
405 AcpiNsInternalizeName (
406 const char *ExternalName,
407 char **ConvertedName)
409 char *InternalName;
410 ACPI_NAMESTRING_INFO Info;
411 ACPI_STATUS Status;
414 ACPI_FUNCTION_TRACE (NsInternalizeName);
417 if ((!ExternalName) ||
418 (*ExternalName == 0) ||
419 (!ConvertedName))
421 return_ACPI_STATUS (AE_BAD_PARAMETER);
424 /* Get the length of the new internal name */
426 Info.ExternalName = ExternalName;
427 AcpiNsGetInternalNameLength (&Info);
429 /* We need a segment to store the internal name */
431 InternalName = ACPI_ALLOCATE_ZEROED (Info.Length);
432 if (!InternalName)
434 return_ACPI_STATUS (AE_NO_MEMORY);
437 /* Build the name */
439 Info.InternalName = InternalName;
440 Status = AcpiNsBuildInternalName (&Info);
441 if (ACPI_FAILURE (Status))
443 ACPI_FREE (InternalName);
444 return_ACPI_STATUS (Status);
447 *ConvertedName = InternalName;
448 return_ACPI_STATUS (AE_OK);
452 /*******************************************************************************
454 * FUNCTION: AcpiNsExternalizeName
456 * PARAMETERS: InternalNameLength - Lenth of the internal name below
457 * InternalName - Internal representation of name
458 * ConvertedNameLength - Where the length is returned
459 * ConvertedName - Where the resulting external name
460 * is returned
462 * RETURN: Status
464 * DESCRIPTION: Convert internal name (e.g. 5c 2f 02 5f 50 52 5f 43 50 55 30)
465 * to its external (printable) form (e.g. "\_PR_.CPU0")
467 ******************************************************************************/
469 ACPI_STATUS
470 AcpiNsExternalizeName (
471 UINT32 InternalNameLength,
472 const char *InternalName,
473 UINT32 *ConvertedNameLength,
474 char **ConvertedName)
476 UINT32 NamesIndex = 0;
477 UINT32 NumSegments = 0;
478 UINT32 RequiredLength;
479 UINT32 PrefixLength = 0;
480 UINT32 i = 0;
481 UINT32 j = 0;
484 ACPI_FUNCTION_TRACE (NsExternalizeName);
487 if (!InternalNameLength ||
488 !InternalName ||
489 !ConvertedName)
491 return_ACPI_STATUS (AE_BAD_PARAMETER);
494 /* Check for a prefix (one '\' | one or more '^') */
496 switch (InternalName[0])
498 case AML_ROOT_PREFIX:
500 PrefixLength = 1;
501 break;
503 case AML_PARENT_PREFIX:
505 for (i = 0; i < InternalNameLength; i++)
507 if (ACPI_IS_PARENT_PREFIX (InternalName[i]))
509 PrefixLength = i + 1;
511 else
513 break;
517 if (i == InternalNameLength)
519 PrefixLength = i;
522 break;
524 default:
526 break;
530 * Check for object names. Note that there could be 0-255 of these
531 * 4-byte elements.
533 if (PrefixLength < InternalNameLength)
535 switch (InternalName[PrefixLength])
537 case AML_MULTI_NAME_PREFIX_OP:
539 /* <count> 4-byte names */
541 NamesIndex = PrefixLength + 2;
542 NumSegments = (UINT8)
543 InternalName[(ACPI_SIZE) PrefixLength + 1];
544 break;
546 case AML_DUAL_NAME_PREFIX:
548 /* Two 4-byte names */
550 NamesIndex = PrefixLength + 1;
551 NumSegments = 2;
552 break;
554 case 0:
556 /* NullName */
558 NamesIndex = 0;
559 NumSegments = 0;
560 break;
562 default:
564 /* one 4-byte name */
566 NamesIndex = PrefixLength;
567 NumSegments = 1;
568 break;
573 * Calculate the length of ConvertedName, which equals the length
574 * of the prefix, length of all object names, length of any required
575 * punctuation ('.') between object names, plus the NULL terminator.
577 RequiredLength = PrefixLength + (4 * NumSegments) +
578 ((NumSegments > 0) ? (NumSegments - 1) : 0) + 1;
581 * Check to see if we're still in bounds. If not, there's a problem
582 * with InternalName (invalid format).
584 if (RequiredLength > InternalNameLength)
586 ACPI_ERROR ((AE_INFO, "Invalid internal name"));
587 return_ACPI_STATUS (AE_BAD_PATHNAME);
590 /* Build the ConvertedName */
592 *ConvertedName = ACPI_ALLOCATE_ZEROED (RequiredLength);
593 if (!(*ConvertedName))
595 return_ACPI_STATUS (AE_NO_MEMORY);
598 j = 0;
600 for (i = 0; i < PrefixLength; i++)
602 (*ConvertedName)[j++] = InternalName[i];
605 if (NumSegments > 0)
607 for (i = 0; i < NumSegments; i++)
609 if (i > 0)
611 (*ConvertedName)[j++] = '.';
614 /* Copy and validate the 4-char name segment */
616 ACPI_MOVE_NAME (&(*ConvertedName)[j],
617 &InternalName[NamesIndex]);
618 AcpiUtRepairName (&(*ConvertedName)[j]);
620 j += ACPI_NAME_SIZE;
621 NamesIndex += ACPI_NAME_SIZE;
625 if (ConvertedNameLength)
627 *ConvertedNameLength = (UINT32) RequiredLength;
630 return_ACPI_STATUS (AE_OK);
634 /*******************************************************************************
636 * FUNCTION: AcpiNsValidateHandle
638 * PARAMETERS: Handle - Handle to be validated and typecast to a
639 * namespace node.
641 * RETURN: A pointer to a namespace node
643 * DESCRIPTION: Convert a namespace handle to a namespace node. Handles special
644 * cases for the root node.
646 * NOTE: Real integer handles would allow for more verification
647 * and keep all pointers within this subsystem - however this introduces
648 * more overhead and has not been necessary to this point. Drivers
649 * holding handles are typically notified before a node becomes invalid
650 * due to a table unload.
652 ******************************************************************************/
654 ACPI_NAMESPACE_NODE *
655 AcpiNsValidateHandle (
656 ACPI_HANDLE Handle)
659 ACPI_FUNCTION_ENTRY ();
662 /* Parameter validation */
664 if ((!Handle) || (Handle == ACPI_ROOT_OBJECT))
666 return (AcpiGbl_RootNode);
669 /* We can at least attempt to verify the handle */
671 if (ACPI_GET_DESCRIPTOR_TYPE (Handle) != ACPI_DESC_TYPE_NAMED)
673 return (NULL);
676 return (ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Handle));
680 /*******************************************************************************
682 * FUNCTION: AcpiNsTerminate
684 * PARAMETERS: none
686 * RETURN: none
688 * DESCRIPTION: free memory allocated for namespace and ACPI table storage.
690 ******************************************************************************/
692 void
693 AcpiNsTerminate (
694 void)
696 ACPI_STATUS Status;
699 ACPI_FUNCTION_TRACE (NsTerminate);
702 #ifdef ACPI_EXEC_APP
704 ACPI_OPERAND_OBJECT *Prev;
705 ACPI_OPERAND_OBJECT *Next;
707 /* Delete any module-level code blocks */
709 Next = AcpiGbl_ModuleCodeList;
710 while (Next)
712 Prev = Next;
713 Next = Next->Method.Mutex;
714 Prev->Method.Mutex = NULL; /* Clear the Mutex (cheated) field */
715 AcpiUtRemoveReference (Prev);
718 #endif
721 * Free the entire namespace -- all nodes and all objects
722 * attached to the nodes
724 AcpiNsDeleteNamespaceSubtree (AcpiGbl_RootNode);
726 /* Delete any objects attached to the root node */
728 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
729 if (ACPI_FAILURE (Status))
731 return_VOID;
734 AcpiNsDeleteNode (AcpiGbl_RootNode);
735 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
737 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Namespace freed\n"));
738 return_VOID;
742 /*******************************************************************************
744 * FUNCTION: AcpiNsOpensScope
746 * PARAMETERS: Type - A valid namespace type
748 * RETURN: NEWSCOPE if the passed type "opens a name scope" according
749 * to the ACPI specification, else 0
751 ******************************************************************************/
753 UINT32
754 AcpiNsOpensScope (
755 ACPI_OBJECT_TYPE Type)
757 ACPI_FUNCTION_ENTRY ();
760 if (Type > ACPI_TYPE_LOCAL_MAX)
762 /* type code out of range */
764 ACPI_WARNING ((AE_INFO, "Invalid Object Type 0x%X", Type));
765 return (ACPI_NS_NORMAL);
768 return (((UINT32) AcpiGbl_NsProperties[Type]) & ACPI_NS_NEWSCOPE);
772 /*******************************************************************************
774 * FUNCTION: AcpiNsGetNodeUnlocked
776 * PARAMETERS: *Pathname - Name to be found, in external (ASL) format. The
777 * \ (backslash) and ^ (carat) prefixes, and the
778 * . (period) to separate segments are supported.
779 * PrefixNode - Root of subtree to be searched, or NS_ALL for the
780 * root of the name space. If Name is fully
781 * qualified (first INT8 is '\'), the passed value
782 * of Scope will not be accessed.
783 * Flags - Used to indicate whether to perform upsearch or
784 * not.
785 * ReturnNode - Where the Node is returned
787 * DESCRIPTION: Look up a name relative to a given scope and return the
788 * corresponding Node. NOTE: Scope can be null.
790 * MUTEX: Doesn't locks namespace
792 ******************************************************************************/
794 ACPI_STATUS
795 AcpiNsGetNodeUnlocked (
796 ACPI_NAMESPACE_NODE *PrefixNode,
797 const char *Pathname,
798 UINT32 Flags,
799 ACPI_NAMESPACE_NODE **ReturnNode)
801 ACPI_GENERIC_STATE ScopeInfo;
802 ACPI_STATUS Status;
803 char *InternalPath;
806 ACPI_FUNCTION_TRACE_PTR (NsGetNodeUnlocked, ACPI_CAST_PTR (char, Pathname));
809 /* Simplest case is a null pathname */
811 if (!Pathname)
813 *ReturnNode = PrefixNode;
814 if (!PrefixNode)
816 *ReturnNode = AcpiGbl_RootNode;
819 return_ACPI_STATUS (AE_OK);
822 /* Quick check for a reference to the root */
824 if (ACPI_IS_ROOT_PREFIX (Pathname[0]) && (!Pathname[1]))
826 *ReturnNode = AcpiGbl_RootNode;
827 return_ACPI_STATUS (AE_OK);
830 /* Convert path to internal representation */
832 Status = AcpiNsInternalizeName (Pathname, &InternalPath);
833 if (ACPI_FAILURE (Status))
835 return_ACPI_STATUS (Status);
838 /* Setup lookup scope (search starting point) */
840 ScopeInfo.Scope.Node = PrefixNode;
842 /* Lookup the name in the namespace */
844 Status = AcpiNsLookup (&ScopeInfo, InternalPath, ACPI_TYPE_ANY,
845 ACPI_IMODE_EXECUTE, (Flags | ACPI_NS_DONT_OPEN_SCOPE),
846 NULL, ReturnNode);
847 if (ACPI_FAILURE (Status))
849 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s, %s\n",
850 Pathname, AcpiFormatException (Status)));
853 ACPI_FREE (InternalPath);
854 return_ACPI_STATUS (Status);
858 /*******************************************************************************
860 * FUNCTION: AcpiNsGetNode
862 * PARAMETERS: *Pathname - Name to be found, in external (ASL) format. The
863 * \ (backslash) and ^ (carat) prefixes, and the
864 * . (period) to separate segments are supported.
865 * PrefixNode - Root of subtree to be searched, or NS_ALL for the
866 * root of the name space. If Name is fully
867 * qualified (first INT8 is '\'), the passed value
868 * of Scope will not be accessed.
869 * Flags - Used to indicate whether to perform upsearch or
870 * not.
871 * ReturnNode - Where the Node is returned
873 * DESCRIPTION: Look up a name relative to a given scope and return the
874 * corresponding Node. NOTE: Scope can be null.
876 * MUTEX: Locks namespace
878 ******************************************************************************/
880 ACPI_STATUS
881 AcpiNsGetNode (
882 ACPI_NAMESPACE_NODE *PrefixNode,
883 const char *Pathname,
884 UINT32 Flags,
885 ACPI_NAMESPACE_NODE **ReturnNode)
887 ACPI_STATUS Status;
890 ACPI_FUNCTION_TRACE_PTR (NsGetNode, ACPI_CAST_PTR (char, Pathname));
893 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
894 if (ACPI_FAILURE (Status))
896 return_ACPI_STATUS (Status);
899 Status = AcpiNsGetNodeUnlocked (PrefixNode, Pathname,
900 Flags, ReturnNode);
902 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
903 return_ACPI_STATUS (Status);