ReactOS  0.4.14-dev-342-gdc047f9
nsaccess.c
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * Module Name: nsaccess - Top-level functions for accessing ACPI namespace
4  *
5  ******************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2019, Intel Corp.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  * notice, this list of conditions, and the following disclaimer,
16  * without modification.
17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18  * substantially similar to the "NO WARRANTY" disclaimer below
19  * ("Disclaimer") and any redistribution must be conditioned upon
20  * including a substantially similar Disclaimer requirement for further
21  * binary redistribution.
22  * 3. Neither the names of the above-listed copyright holders nor the names
23  * of any contributors may be used to endorse or promote products derived
24  * from this software without specific prior written permission.
25  *
26  * Alternatively, this software may be distributed under the terms of the
27  * GNU General Public License ("GPL") version 2 as published by the Free
28  * Software Foundation.
29  *
30  * NO WARRANTY
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGES.
42  */
43 
44 #include "acpi.h"
45 #include "accommon.h"
46 #include "amlcode.h"
47 #include "acnamesp.h"
48 #include "acdispat.h"
49 
50 #ifdef ACPI_ASL_COMPILER
51  #include "acdisasm.h"
52 #endif
53 
54 #define _COMPONENT ACPI_NAMESPACE
55  ACPI_MODULE_NAME ("nsaccess")
56 
57 
58 /*******************************************************************************
59  *
60  * FUNCTION: AcpiNsRootInitialize
61  *
62  * PARAMETERS: None
63  *
64  * RETURN: Status
65  *
66  * DESCRIPTION: Allocate and initialize the default root named objects
67  *
68  * MUTEX: Locks namespace for entire execution
69  *
70  ******************************************************************************/
71 
74  void)
75 {
77  const ACPI_PREDEFINED_NAMES *InitVal = NULL;
78  ACPI_NAMESPACE_NODE *NewNode;
79  ACPI_NAMESPACE_NODE *PrevNode = NULL;
80  ACPI_OPERAND_OBJECT *ObjDesc;
81  ACPI_STRING Val = NULL;
82 
83 
84  ACPI_FUNCTION_TRACE (NsRootInitialize);
85 
86 
88  if (ACPI_FAILURE (Status))
89  {
91  }
92 
93  /*
94  * The global root ptr is initially NULL, so a non-NULL value indicates
95  * that AcpiNsRootInitialize() has already been called; just return.
96  */
97  if (AcpiGbl_RootNode)
98  {
99  Status = AE_OK;
100  goto UnlockAndExit;
101  }
102 
103  /*
104  * Tell the rest of the subsystem that the root is initialized
105  * (This is OK because the namespace is locked)
106  */
107  AcpiGbl_RootNode = &AcpiGbl_RootNodeStruct;
108 
109  /* Enter the predefined names in the name table */
110 
112  "Entering predefined entries into namespace\n"));
113 
114  /*
115  * Create the initial (default) namespace.
116  * This namespace looks like something similar to this:
117  *
118  * ACPI Namespace (from Namespace Root):
119  * 0 _GPE Scope 00203160 00
120  * 0 _PR_ Scope 002031D0 00
121  * 0 _SB_ Device 00203240 00 Notify Object: 0020ADD8
122  * 0 _SI_ Scope 002032B0 00
123  * 0 _TZ_ Device 00203320 00
124  * 0 _REV Integer 00203390 00 = 0000000000000002
125  * 0 _OS_ String 00203488 00 Len 14 "Microsoft Windows NT"
126  * 0 _GL_ Mutex 00203580 00 Object 002035F0
127  * 0 _OSI Method 00203678 00 Args 1 Len 0000 Aml 00000000
128  */
129  for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++)
130  {
131  Status = AE_OK;
132 
133  /* _OSI is optional for now, will be permanent later */
134 
135  if (!strcmp (InitVal->Name, "_OSI") && !AcpiGbl_CreateOsiMethod)
136  {
137  continue;
138  }
139 
140  /*
141  * Create, init, and link the new predefined name
142  * Note: No need to use AcpiNsLookup here because all the
143  * predefined names are at the root level. It is much easier to
144  * just create and link the new node(s) here.
145  */
146  NewNode = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_NAMESPACE_NODE));
147  if (!NewNode)
148  {
150  goto UnlockAndExit;
151  }
152 
153  ACPI_COPY_NAMESEG (NewNode->Name.Ascii, InitVal->Name);
155  NewNode->Type = InitVal->Type;
156 
157  if (!PrevNode)
158  {
159  AcpiGbl_RootNodeStruct.Child = NewNode;
160  }
161  else
162  {
163  PrevNode->Peer = NewNode;
164  }
165 
166  NewNode->Parent = &AcpiGbl_RootNodeStruct;
167  PrevNode = NewNode;
168 
169  /*
170  * Name entered successfully. If entry in PreDefinedNames[] specifies
171  * an initial value, create the initial value.
172  */
173  if (InitVal->Val)
174  {
175  Status = AcpiOsPredefinedOverride (InitVal, &Val);
176  if (ACPI_FAILURE (Status))
177  {
179  "Could not override predefined %s",
180  InitVal->Name));
181  }
182 
183  if (!Val)
184  {
185  Val = InitVal->Val;
186  }
187 
188  /*
189  * Entry requests an initial value, allocate a
190  * descriptor for it.
191  */
192  ObjDesc = AcpiUtCreateInternalObject (InitVal->Type);
193  if (!ObjDesc)
194  {
196  goto UnlockAndExit;
197  }
198 
199  /*
200  * Convert value string from table entry to
201  * internal representation. Only types actually
202  * used for initial values are implemented here.
203  */
204  switch (InitVal->Type)
205  {
206  case ACPI_TYPE_METHOD:
207 
208  ObjDesc->Method.ParamCount = (UINT8) ACPI_TO_INTEGER (Val);
209  ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID;
210 
211 #if defined (ACPI_ASL_COMPILER)
212 
213  /* Save the parameter count for the iASL compiler */
214 
215  NewNode->Value = ObjDesc->Method.ParamCount;
216 #else
217  /* Mark this as a very SPECIAL method (_OSI) */
218 
221 #endif
222  break;
223 
224  case ACPI_TYPE_INTEGER:
225 
226  ObjDesc->Integer.Value = ACPI_TO_INTEGER (Val);
227  break;
228 
229  case ACPI_TYPE_STRING:
230 
231  /* Build an object around the static string */
232 
233  ObjDesc->String.Length = (UINT32) strlen (Val);
234  ObjDesc->String.Pointer = Val;
235  ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
236  break;
237 
238  case ACPI_TYPE_MUTEX:
239 
240  ObjDesc->Mutex.Node = NewNode;
241  ObjDesc->Mutex.SyncLevel = (UINT8) (ACPI_TO_INTEGER (Val) - 1);
242 
243  /* Create a mutex */
244 
245  Status = AcpiOsCreateMutex (&ObjDesc->Mutex.OsMutex);
246  if (ACPI_FAILURE (Status))
247  {
248  AcpiUtRemoveReference (ObjDesc);
249  goto UnlockAndExit;
250  }
251 
252  /* Special case for ACPI Global Lock */
253 
254  if (strcmp (InitVal->Name, "_GL_") == 0)
255  {
256  AcpiGbl_GlobalLockMutex = ObjDesc;
257 
258  /* Create additional counting semaphore for global lock */
259 
261  1, 0, &AcpiGbl_GlobalLockSemaphore);
262  if (ACPI_FAILURE (Status))
263  {
264  AcpiUtRemoveReference (ObjDesc);
265  goto UnlockAndExit;
266  }
267  }
268  break;
269 
270  default:
271 
272  ACPI_ERROR ((AE_INFO, "Unsupported initial type value 0x%X",
273  InitVal->Type));
274  AcpiUtRemoveReference (ObjDesc);
275  ObjDesc = NULL;
276  continue;
277  }
278 
279  /* Store pointer to value descriptor in the Node */
280 
281  Status = AcpiNsAttachObject (NewNode, ObjDesc,
282  ObjDesc->Common.Type);
283 
284  /* Remove local reference to the object */
285 
286  AcpiUtRemoveReference (ObjDesc);
287  }
288  }
289 
290 UnlockAndExit:
292 
293  /* Save a handle to "_GPE", it is always present */
294 
295  if (ACPI_SUCCESS (Status))
296  {
298  &AcpiGbl_FadtGpeDevice);
299  }
300 
302 }
303 
304 
305 /*******************************************************************************
306  *
307  * FUNCTION: AcpiNsLookup
308  *
309  * PARAMETERS: ScopeInfo - Current scope info block
310  * Pathname - Search pathname, in internal format
311  * (as represented in the AML stream)
312  * Type - Type associated with name
313  * InterpreterMode - IMODE_LOAD_PASS2 => add name if not found
314  * Flags - Flags describing the search restrictions
315  * WalkState - Current state of the walk
316  * ReturnNode - Where the Node is placed (if found
317  * or created successfully)
318  *
319  * RETURN: Status
320  *
321  * DESCRIPTION: Find or enter the passed name in the name space.
322  * Log an error if name not found in Exec mode.
323  *
324  * MUTEX: Assumes namespace is locked.
325  *
326  ******************************************************************************/
327 
330  ACPI_GENERIC_STATE *ScopeInfo,
331  char *Pathname,
333  ACPI_INTERPRETER_MODE InterpreterMode,
334  UINT32 Flags,
335  ACPI_WALK_STATE *WalkState,
336  ACPI_NAMESPACE_NODE **ReturnNode)
337 {
339  char *Path = Pathname;
340  char *ExternalPath;
341  ACPI_NAMESPACE_NODE *PrefixNode;
342  ACPI_NAMESPACE_NODE *CurrentNode = NULL;
343  ACPI_NAMESPACE_NODE *ThisNode = NULL;
344  UINT32 NumSegments;
345  UINT32 NumCarats;
346  ACPI_NAME SimpleName;
347  ACPI_OBJECT_TYPE TypeToCheckFor;
348  ACPI_OBJECT_TYPE ThisSearchType;
349  UINT32 SearchParentFlag = ACPI_NS_SEARCH_PARENT;
351  ACPI_INTERPRETER_MODE LocalInterpreterMode;
352 
353 
354  ACPI_FUNCTION_TRACE (NsLookup);
355 
356 
357  if (!ReturnNode)
358  {
360  }
361 
362  LocalFlags = Flags &
365  *ReturnNode = ACPI_ENTRY_NOT_FOUND;
366  AcpiGbl_NsLookupCount++;
367 
368  if (!AcpiGbl_RootNode)
369  {
371  }
372 
373  /* Get the prefix scope. A null scope means use the root scope */
374 
375  if ((!ScopeInfo) ||
376  (!ScopeInfo->Scope.Node))
377  {
379  "Null scope prefix, using root node (%p)\n",
380  AcpiGbl_RootNode));
381 
382  PrefixNode = AcpiGbl_RootNode;
383  }
384  else
385  {
386  PrefixNode = ScopeInfo->Scope.Node;
388  {
389  ACPI_ERROR ((AE_INFO, "%p is not a namespace node [%s]",
390  PrefixNode, AcpiUtGetDescriptorName (PrefixNode)));
392  }
393 
395  {
396  /*
397  * This node might not be a actual "scope" node (such as a
398  * Device/Method, etc.) It could be a Package or other object
399  * node. Backup up the tree to find the containing scope node.
400  */
401  while (!AcpiNsOpensScope (PrefixNode->Type) &&
402  PrefixNode->Type != ACPI_TYPE_ANY)
403  {
404  PrefixNode = PrefixNode->Parent;
405  }
406  }
407  }
408 
409  /* Save type. TBD: may be no longer necessary */
410 
411  TypeToCheckFor = Type;
412 
413  /*
414  * Begin examination of the actual pathname
415  */
416  if (!Pathname)
417  {
418  /* A Null NamePath is allowed and refers to the root */
419 
420  NumSegments = 0;
421  ThisNode = AcpiGbl_RootNode;
422  Path = "";
423 
425  "Null Pathname (Zero segments), Flags=%X\n", Flags));
426  }
427  else
428  {
429  /*
430  * Name pointer is valid (and must be in internal name format)
431  *
432  * Check for scope prefixes:
433  *
434  * As represented in the AML stream, a namepath consists of an
435  * optional scope prefix followed by a name segment part.
436  *
437  * If present, the scope prefix is either a Root Prefix (in
438  * which case the name is fully qualified), or one or more
439  * Parent Prefixes (in which case the name's scope is relative
440  * to the current scope).
441  */
442  if (*Path == (UINT8) AML_ROOT_PREFIX)
443  {
444  /* Pathname is fully qualified, start from the root */
445 
446  ThisNode = AcpiGbl_RootNode;
447  SearchParentFlag = ACPI_NS_NO_UPSEARCH;
448 
449  /* Point to name segment part */
450 
451  Path++;
452 
454  "Path is absolute from root [%p]\n", ThisNode));
455  }
456  else
457  {
458  /* Pathname is relative to current scope, start there */
459 
461  "Searching relative to prefix scope [%4.4s] (%p)\n",
462  AcpiUtGetNodeName (PrefixNode), PrefixNode));
463 
464  /*
465  * Handle multiple Parent Prefixes (carat) by just getting
466  * the parent node for each prefix instance.
467  */
468  ThisNode = PrefixNode;
469  NumCarats = 0;
470  while (*Path == (UINT8) AML_PARENT_PREFIX)
471  {
472  /* Name is fully qualified, no search rules apply */
473 
474  SearchParentFlag = ACPI_NS_NO_UPSEARCH;
475 
476  /*
477  * Point past this prefix to the name segment
478  * part or the next Parent Prefix
479  */
480  Path++;
481 
482  /* Backup to the parent node */
483 
484  NumCarats++;
485  ThisNode = ThisNode->Parent;
486  if (!ThisNode)
487  {
488  /*
489  * Current scope has no parent scope. Externalize
490  * the internal path for error message.
491  */
493  NULL, &ExternalPath);
494  if (ACPI_SUCCESS (Status))
495  {
497  "%s: Path has too many parent prefixes (^)",
498  ExternalPath));
499 
500  ACPI_FREE (ExternalPath);
501  }
502 
504  }
505  }
506 
507  if (SearchParentFlag == ACPI_NS_NO_UPSEARCH)
508  {
510  "Search scope is [%4.4s], path has %u carat(s)\n",
511  AcpiUtGetNodeName (ThisNode), NumCarats));
512  }
513  }
514 
515  /*
516  * Determine the number of ACPI name segments in this pathname.
517  *
518  * The segment part consists of either:
519  * - A Null name segment (0)
520  * - A DualNamePrefix followed by two 4-byte name segments
521  * - A MultiNamePrefix followed by a byte indicating the
522  * number of segments and the segments themselves.
523  * - A single 4-byte name segment
524  *
525  * Examine the name prefix opcode, if any, to determine the number of
526  * segments.
527  */
528  switch (*Path)
529  {
530  case 0:
531  /*
532  * Null name after a root or parent prefixes. We already
533  * have the correct target node and there are no name segments.
534  */
535  NumSegments = 0;
536  Type = ThisNode->Type;
537 
539  "Prefix-only Pathname (Zero name segments), Flags=%X\n",
540  Flags));
541  break;
542 
544 
545  /* More than one NameSeg, search rules do not apply */
546 
547  SearchParentFlag = ACPI_NS_NO_UPSEARCH;
548 
549  /* Two segments, point to first name segment */
550 
551  NumSegments = 2;
552  Path++;
553 
555  "Dual Pathname (2 segments, Flags=%X)\n", Flags));
556  break;
557 
559 
560  /* More than one NameSeg, search rules do not apply */
561 
562  SearchParentFlag = ACPI_NS_NO_UPSEARCH;
563 
564  /* Extract segment count, point to first name segment */
565 
566  Path++;
567  NumSegments = (UINT32) (UINT8) *Path;
568  Path++;
569 
571  "Multi Pathname (%u Segments, Flags=%X)\n",
572  NumSegments, Flags));
573  break;
574 
575  default:
576  /*
577  * Not a Null name, no Dual or Multi prefix, hence there is
578  * only one name segment and Pathname is already pointing to it.
579  */
580  NumSegments = 1;
581 
583  "Simple Pathname (1 segment, Flags=%X)\n", Flags));
584  break;
585  }
586 
587  ACPI_DEBUG_EXEC (AcpiNsPrintPathname (NumSegments, Path));
588  }
589 
590 
591  /*
592  * Search namespace for each segment of the name. Loop through and
593  * verify (or add to the namespace) each name segment.
594  *
595  * The object type is significant only at the last name
596  * segment. (We don't care about the types along the path, only
597  * the type of the final target object.)
598  */
599  ThisSearchType = ACPI_TYPE_ANY;
600  CurrentNode = ThisNode;
601 
602  while (NumSegments && CurrentNode)
603  {
604  NumSegments--;
605  if (!NumSegments)
606  {
607  /* This is the last segment, enable typechecking */
608 
609  ThisSearchType = Type;
610 
611  /*
612  * Only allow automatic parent search (search rules) if the caller
613  * requested it AND we have a single, non-fully-qualified NameSeg
614  */
615  if ((SearchParentFlag != ACPI_NS_NO_UPSEARCH) &&
617  {
619  }
620 
621  /* Set error flag according to caller */
622 
624  {
626  }
627 
628  /* Set override flag according to caller */
629 
631  {
633  }
634  }
635 
636  /* Handle opcodes that create a new NameSeg via a full NamePath */
637 
638  LocalInterpreterMode = InterpreterMode;
639  if ((Flags & ACPI_NS_PREFIX_MUST_EXIST) && (NumSegments > 0))
640  {
641  /* Every element of the path must exist (except for the final NameSeg) */
642 
643  LocalInterpreterMode = ACPI_IMODE_EXECUTE;
644  }
645 
646  /* Extract one ACPI name from the front of the pathname */
647 
648  ACPI_MOVE_32_TO_32 (&SimpleName, Path);
649 
650  /* Try to find the single (4 character) ACPI name */
651 
652  Status = AcpiNsSearchAndEnter (SimpleName, WalkState, CurrentNode,
653  LocalInterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
654  if (ACPI_FAILURE (Status))
655  {
656  if (Status == AE_NOT_FOUND)
657  {
658 #if !defined ACPI_ASL_COMPILER /* Note: iASL reports this error by itself, not needed here */
660  {
662  "Object does not exist: %4.4s\n", (char *) &SimpleName);
663  }
664 #endif
665  /* Name not found in ACPI namespace */
666 
668  "Name [%4.4s] not found in scope [%4.4s] %p\n",
669  (char *) &SimpleName, (char *) &CurrentNode->Name,
670  CurrentNode));
671  }
672 
673 #ifdef ACPI_EXEC_APP
674  if ((Status == AE_ALREADY_EXISTS) &&
675  (ThisNode->Flags & ANOBJ_NODE_EARLY_INIT))
676  {
677  ThisNode->Flags &= ~ANOBJ_NODE_EARLY_INIT;
678  Status = AE_OK;
679  }
680 #endif
681 
682 #ifdef ACPI_ASL_COMPILER
683  /*
684  * If this ACPI name already exists within the namespace as an
685  * external declaration, then mark the external as a conflicting
686  * declaration and proceed to process the current node as if it did
687  * not exist in the namespace. If this node is not processed as
688  * normal, then it could cause improper namespace resolution
689  * by failing to open a new scope.
690  */
691  if (AcpiGbl_DisasmFlag &&
692  (Status == AE_ALREADY_EXISTS) &&
693  ((ThisNode->Flags & ANOBJ_IS_EXTERNAL) ||
694  (WalkState && WalkState->Opcode == AML_EXTERNAL_OP)))
695  {
696  ThisNode->Flags &= ~ANOBJ_IS_EXTERNAL;
697  ThisNode->Type = (UINT8)ThisSearchType;
698  if (WalkState->Opcode != AML_EXTERNAL_OP)
699  {
700  AcpiDmMarkExternalConflict (ThisNode);
701  }
702  break;
703  }
704 #endif
705 
706  *ReturnNode = ThisNode;
708  }
709 
710  /* More segments to follow? */
711 
712  if (NumSegments > 0)
713  {
714  /*
715  * If we have an alias to an object that opens a scope (such as a
716  * device or processor), we need to dereference the alias here so
717  * that we can access any children of the original node (via the
718  * remaining segments).
719  */
720  if (ThisNode->Type == ACPI_TYPE_LOCAL_ALIAS)
721  {
722  if (!ThisNode->Object)
723  {
725  }
726 
728  ThisNode->Object)->Type))
729  {
730  ThisNode = (ACPI_NAMESPACE_NODE *) ThisNode->Object;
731  }
732  }
733  }
734 
735  /* Special handling for the last segment (NumSegments == 0) */
736 
737  else
738  {
739  /*
740  * Sanity typecheck of the target object:
741  *
742  * If 1) This is the last segment (NumSegments == 0)
743  * 2) And we are looking for a specific type
744  * (Not checking for TYPE_ANY)
745  * 3) Which is not an alias
746  * 4) Which is not a local type (TYPE_SCOPE)
747  * 5) And the type of target object is known (not TYPE_ANY)
748  * 6) And target object does not match what we are looking for
749  *
750  * Then we have a type mismatch. Just warn and ignore it.
751  */
752  if ((TypeToCheckFor != ACPI_TYPE_ANY) &&
753  (TypeToCheckFor != ACPI_TYPE_LOCAL_ALIAS) &&
754  (TypeToCheckFor != ACPI_TYPE_LOCAL_METHOD_ALIAS) &&
755  (TypeToCheckFor != ACPI_TYPE_LOCAL_SCOPE) &&
756  (ThisNode->Type != ACPI_TYPE_ANY) &&
757  (ThisNode->Type != TypeToCheckFor))
758  {
759  /* Complain about a type mismatch */
760 
762  "NsLookup: Type mismatch on %4.4s (%s), searching for (%s)",
763  ACPI_CAST_PTR (char, &SimpleName),
764  AcpiUtGetTypeName (ThisNode->Type),
765  AcpiUtGetTypeName (TypeToCheckFor)));
766  }
767 
768  /*
769  * If this is the last name segment and we are not looking for a
770  * specific type, but the type of found object is known, use that
771  * type to (later) see if it opens a scope.
772  */
773  if (Type == ACPI_TYPE_ANY)
774  {
775  Type = ThisNode->Type;
776  }
777  }
778 
779  /* Point to next name segment and make this node current */
780 
782  CurrentNode = ThisNode;
783  }
784 
785  /* Always check if we need to open a new scope */
786 
787  if (!(Flags & ACPI_NS_DONT_OPEN_SCOPE) && (WalkState))
788  {
789  /*
790  * If entry is a type which opens a scope, push the new scope on the
791  * scope stack.
792  */
793  if (AcpiNsOpensScope (Type))
794  {
795  Status = AcpiDsScopeStackPush (ThisNode, Type, WalkState);
796  if (ACPI_FAILURE (Status))
797  {
799  }
800  }
801  }
802 
803 #ifdef ACPI_EXEC_APP
805  {
806  ThisNode->Flags |= ANOBJ_NODE_EARLY_INIT;
807  }
808 #endif
809 
810  *ReturnNode = ThisNode;
812 }
#define AOPOBJ_STATIC_POINTER
Definition: acobject.h:95
#define ACPI_NS_SEARCH_PARENT
Definition: acnamesp.h:63
#define ACPI_TO_INTEGER(p)
Definition: actypes.h:553
#define ACPI_FREE(a)
Definition: actypes.h:386
const char * AcpiUtGetDescriptorName(void *Object)
Definition: utdecode.c:381
ACPI_INTERPRETER_MODE
Definition: aclocal.h:165
union acpi_operand_object * Object
Definition: aclocal.h:187
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define ACPI_TYPE_LOCAL_ALIAS
Definition: actypes.h:711
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
Type
Definition: Type.h:6
#define AE_NO_MEMORY
Definition: acexcep.h:112
ACPI_MUTEX OsMutex
Definition: acobject.h:188
void AcpiNsPrintPathname(UINT32 NumSegments, const char *Pathname)
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define ACPI_WARNING(plist)
Definition: acoutput.h:238
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
ACPI_OBJECT_COMMON_HEADER UINT8 InfoFlags
Definition: acobject.h:215
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
#define AE_AML_INTERNAL
Definition: acexcep.h:194
ACPI_STATUS AcpiDsScopeStackPush(ACPI_NAMESPACE_NODE *Node, ACPI_OBJECT_TYPE Type, ACPI_WALK_STATE *WalkState)
Definition: dswscope.c:107
ACPI_OBJECT_MUTEX Mutex
Definition: acobject.h:523
UINT8 DescriptorType
Definition: aclocal.h:188
char Ascii[4]
Definition: actbl.h:394
#define ACPI_NS_ERROR_IF_FOUND
Definition: acnamesp.h:66
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_NS_PREFIX_MUST_EXIST
Definition: acnamesp.h:72
struct acpi_namespace_node * Parent
Definition: aclocal.h:192
void AcpiDmMarkExternalConflict(ACPI_NAMESPACE_NODE *Node)
ACPI_OBJECT_COMMON_HEADER UINT8 SyncLevel
Definition: acobject.h:186
ACPI_STATUS AcpiNsLookup(ACPI_GENERIC_STATE *ScopeInfo, char *Pathname, ACPI_OBJECT_TYPE Type, ACPI_INTERPRETER_MODE InterpreterMode, UINT32 Flags, ACPI_WALK_STATE *WalkState, ACPI_NAMESPACE_NODE **ReturnNode)
Definition: nsaccess.c:329
#define AE_NO_NAMESPACE
Definition: acexcep.h:111
#define AML_EXTERNAL_OP
Definition: amlcode.h:65
#define ACPI_DEBUG_EXEC(a)
Definition: acoutput.h:477
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
ACPI_STATUS AcpiUtReleaseMutex(ACPI_MUTEX_HANDLE MutexId)
Definition: utmutex.c:348
ACPI_STATUS AcpiNsGetNode(ACPI_NAMESPACE_NODE *PrefixNode, const char *ExternalPathname, UINT32 Flags, ACPI_NAMESPACE_NODE **OutNode)
Definition: nsutils.c:863
union acpi_object_method::@594 Dispatch
ACPI_STATUS AcpiUtAcquireMutex(ACPI_MUTEX_HANDLE MutexId)
Definition: utmutex.c:256
unsigned int UINT32
ACPI_STATUS AcpiNsSearchAndEnter(UINT32 EntryName, ACPI_WALK_STATE *WalkState, ACPI_NAMESPACE_NODE *Node, ACPI_INTERPRETER_MODE InterpreterMode, ACPI_OBJECT_TYPE Type, UINT32 Flags, ACPI_NAMESPACE_NODE **RetNode)
Definition: nssearch.c:294
char * ACPI_STRING
Definition: actypes.h:462
ACPI_STATUS AcpiNsRootInitialize(void)
Definition: nsaccess.c:73
#define ACPI_NS_DONT_OPEN_SCOPE
Definition: acnamesp.h:64
#define ACPI_MODULE_NAME(Name)
Definition: acoutput.h:216
#define AML_DUAL_NAME_PREFIX
Definition: amlcode.h:66
#define AE_INFO
Definition: acoutput.h:230
smooth NULL
Definition: ftsmooth.c:416
ACPI_NAME_UNION Name
Definition: aclocal.h:191
ACPI_STATUS AcpiNsExternalizeName(UINT32 InternalNameLength, const char *InternalName, UINT32 *ConvertedNameLength, char **ConvertedName)
Definition: nsutils.c:470
#define ACPI_TYPE_LOCAL_METHOD_ALIAS
Definition: actypes.h:712
UINT32 ACPI_OBJECT_TYPE
Definition: actypes.h:676
#define ANOBJ_NODE_EARLY_INIT
Definition: aclocal.h:222
UINT32 AcpiNsOpensScope(ACPI_OBJECT_TYPE Type)
Definition: nsutils.c:736
#define ACPI_METHOD_INTERNAL_ONLY
Definition: acobject.h:236
struct acpi_namespace_node * Peer
Definition: aclocal.h:194
#define ACPI_TYPE_METHOD
Definition: actypes.h:686
#define AML_PARENT_PREFIX
Definition: amlcode.h:70
#define AE_ALREADY_EXISTS
Definition: acexcep.h:115
#define ACPI_UINT32_MAX
Definition: actypes.h:66
#define ACPI_NS_PREFIX_IS_SCOPE
Definition: acnamesp.h:67
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define ACPI_ENTRY_NOT_FOUND
Definition: aclocal.h:154
ACPI_STATUS AcpiOsPredefinedOverride(const ACPI_PREDEFINED_NAMES *InitVal, ACPI_STRING *NewVal)
Definition: osl.c:55
ACPI_INTERNAL_METHOD Implementation
Definition: acobject.h:223
#define ACPI_NS_EARLY_INIT
Definition: acnamesp.h:71
#define AE_NOT_FOUND
Definition: acexcep.h:113
void ACPI_INTERNAL_VAR_XFACE AcpiOsPrintf(const char *Format,...)
Definition: osl.c:851
#define AML_ROOT_PREFIX
Definition: amlcode.h:69
ACPI_STATUS AcpiOsCreateSemaphore(UINT32 MaxUnits, UINT32 InitialUnits, ACPI_SEMAPHORE *OutHandle)
Definition: osl.c:352
#define AE_NOT_EXIST
Definition: acexcep.h:114
#define ACPI_TYPE_ANY
Definition: actypes.h:678
UINT32 ACPI_NAME
Definition: actypes.h:461
#define ACPI_MOVE_32_TO_32(d, s)
Definition: acmacros.h:148
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
#define ACPI_COPY_NAMESEG(dest, src)
Definition: actypes.h:562
const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[NUM_PREDEFINED_NAMES]
Definition: utglobal.c:113
ACPI_OBJECT_STRING String
Definition: acobject.h:518
Status
Definition: gdiplustypes.h:24
ACPI_OBJECT_METHOD Method
Definition: acobject.h:522
const char * Name
Definition: actypes.h:1062
ACPI_STATUS AcpiNsAttachObject(ACPI_NAMESPACE_NODE *Node, ACPI_OPERAND_OBJECT *Object, ACPI_OBJECT_TYPE Type)
Definition: nsobject.c:76
#define ACPI_DB_INFO
Definition: acoutput.h:153
PRTL_UNICODE_STRING_BUFFER Path
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_NS_NO_UPSEARCH
Definition: acnamesp.h:62
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_DB_NAMES
Definition: acoutput.h:166
ACPI_OBJECT_COMMON Common
Definition: acobject.h:516
#define ACPI_NS_OVERRIDE_IF_FOUND
Definition: acnamesp.h:70
ACPI_STATE_COMMON ACPI_NAMESPACE_NODE * Node
Definition: aclocal.h:740
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
const char * AcpiUtGetTypeName(ACPI_OBJECT_TYPE Type)
Definition: utdecode.c:249
UINT NTAPI LocalFlags(HLOCAL hMem)
Definition: heapmem.c:1503
#define ACPI_TYPE_MUTEX
Definition: actypes.h:687
ACPI_STATUS AcpiOsCreateMutex(ACPI_MUTEX *OutHandle)
Definition: osl.c:271
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define AML_MULTI_NAME_PREFIX
Definition: amlcode.h:67
const char * AcpiUtGetNodeName(void *Object)
Definition: utdecode.c:305
#define AOPOBJ_DATA_VALID
Definition: acobject.h:96
#define ACPI_TYPE_LOCAL_SCOPE
Definition: actypes.h:717
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
UINT16 Opcode
Definition: acstruct.h:78
#define ACPI_TYPE_STRING
Definition: actypes.h:680
#define AcpiUtCreateInternalObject(t)
Definition: acutils.h:655
ACPI_STATUS AcpiUtOsiImplementation(ACPI_WALK_STATE *WalkState)
Definition: utosi.c:470
#define ACPI_DESC_TYPE_NAMED
Definition: acobject.h:574
#define ACPI_MTX_NAMESPACE
Definition: aclocal.h:85
#define ACPI_NAMESEG_SIZE
Definition: actypes.h:415
#define ACPI_CAST_PTR(t, p)
Definition: actypes.h:544
unsigned char UINT8
#define ACPI_MSG_BIOS_ERROR
Definition: acutils.h:130
#define AE_OK
Definition: acexcep.h:97
ACPI_NAMESPACE_NODE * Node
Definition: acobject.h:193
ACPI_SCOPE_STATE Scope
Definition: aclocal.h:825
#define ACPI_GET_DESCRIPTOR_TYPE(d)
Definition: acmacros.h:414
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING Pathname
Definition: acpixf.h:700
#define ANOBJ_IS_EXTERNAL
Definition: aclocal.h:224