ReactOS 0.4.15-dev-7670-g69b08be
dswstate.c
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Module Name: dswstate - Dispatcher parse tree walk management routines
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2022, 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 MERCHANTABILITY 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 "acparser.h"
47#include "acdispat.h"
48#include "acnamesp.h"
49
50#define _COMPONENT ACPI_DISPATCHER
51 ACPI_MODULE_NAME ("dswstate")
52
53/* Local prototypes */
54
55static ACPI_STATUS
57 ACPI_WALK_STATE *WalkState);
58
59static ACPI_STATUS
61 ACPI_WALK_STATE *WalkState);
62
63
64/*******************************************************************************
65 *
66 * FUNCTION: AcpiDsResultPop
67 *
68 * PARAMETERS: Object - Where to return the popped object
69 * WalkState - Current Walk state
70 *
71 * RETURN: Status
72 *
73 * DESCRIPTION: Pop an object off the top of this walk's result stack
74 *
75 ******************************************************************************/
76
80 ACPI_WALK_STATE *WalkState)
81{
85
86
87 ACPI_FUNCTION_NAME (DsResultPop);
88
89
90 State = WalkState->Results;
91
92 /* Incorrect state of result stack */
93
94 if (State && !WalkState->ResultCount)
95 {
96 ACPI_ERROR ((AE_INFO, "No results on result stack"));
97 return (AE_AML_INTERNAL);
98 }
99
100 if (!State && WalkState->ResultCount)
101 {
102 ACPI_ERROR ((AE_INFO, "No result state for result stack"));
103 return (AE_AML_INTERNAL);
104 }
105
106 /* Empty result stack */
107
108 if (!State)
109 {
110 ACPI_ERROR ((AE_INFO, "Result stack is empty! State=%p", WalkState));
111 return (AE_AML_NO_RETURN_VALUE);
112 }
113
114 /* Return object of the top element and clean that top element result stack */
115
116 WalkState->ResultCount--;
117 Index = (UINT32) WalkState->ResultCount % ACPI_RESULTS_FRAME_OBJ_NUM;
118
119 *Object = State->Results.ObjDesc [Index];
120 if (!*Object)
121 {
122 ACPI_ERROR ((AE_INFO, "No result objects on result stack, State=%p",
123 WalkState));
124 return (AE_AML_NO_RETURN_VALUE);
125 }
126
127 State->Results.ObjDesc [Index] = NULL;
128 if (Index == 0)
129 {
130 Status = AcpiDsResultStackPop (WalkState);
131 if (ACPI_FAILURE (Status))
132 {
133 return (Status);
134 }
135 }
136
138 "Obj=%p [%s] Index=%X State=%p Num=%X\n", *Object,
140 Index, WalkState, WalkState->ResultCount));
141
142 return (AE_OK);
143}
144
145
146/*******************************************************************************
147 *
148 * FUNCTION: AcpiDsResultPush
149 *
150 * PARAMETERS: Object - Where to return the popped object
151 * WalkState - Current Walk state
152 *
153 * RETURN: Status
154 *
155 * DESCRIPTION: Push an object onto the current result stack
156 *
157 ******************************************************************************/
158
162 ACPI_WALK_STATE *WalkState)
163{
167
168
169 ACPI_FUNCTION_NAME (DsResultPush);
170
171
172 if (WalkState->ResultCount > WalkState->ResultSize)
173 {
174 ACPI_ERROR ((AE_INFO, "Result stack is full"));
175 return (AE_AML_INTERNAL);
176 }
177 else if (WalkState->ResultCount == WalkState->ResultSize)
178 {
179 /* Extend the result stack */
180
181 Status = AcpiDsResultStackPush (WalkState);
182 if (ACPI_FAILURE (Status))
183 {
184 ACPI_ERROR ((AE_INFO, "Failed to extend the result stack"));
185 return (Status);
186 }
187 }
188
189 if (!(WalkState->ResultCount < WalkState->ResultSize))
190 {
191 ACPI_ERROR ((AE_INFO, "No free elements in result stack"));
192 return (AE_AML_INTERNAL);
193 }
194
195 State = WalkState->Results;
196 if (!State)
197 {
198 ACPI_ERROR ((AE_INFO, "No result stack frame during push"));
199 return (AE_AML_INTERNAL);
200 }
201
202 if (!Object)
203 {
205 "Null Object! Obj=%p State=%p Num=%u",
206 Object, WalkState, WalkState->ResultCount));
207 return (AE_BAD_PARAMETER);
208 }
209
210 /* Assign the address of object to the top free element of result stack */
211
213 State->Results.ObjDesc [Index] = Object;
214 WalkState->ResultCount++;
215
216 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p Num=%X Cur=%X\n",
218 WalkState, WalkState->ResultCount, WalkState->CurrentResult));
219
220 return (AE_OK);
221}
222
223
224/*******************************************************************************
225 *
226 * FUNCTION: AcpiDsResultStackPush
227 *
228 * PARAMETERS: WalkState - Current Walk state
229 *
230 * RETURN: Status
231 *
232 * DESCRIPTION: Push an object onto the WalkState result stack
233 *
234 ******************************************************************************/
235
236static ACPI_STATUS
238 ACPI_WALK_STATE *WalkState)
239{
241
242
243 ACPI_FUNCTION_NAME (DsResultStackPush);
244
245
246 /* Check for stack overflow */
247
248 if (((UINT32) WalkState->ResultSize + ACPI_RESULTS_FRAME_OBJ_NUM) >
250 {
251 ACPI_ERROR ((AE_INFO, "Result stack overflow: State=%p Num=%u",
252 WalkState, WalkState->ResultSize));
253 return (AE_STACK_OVERFLOW);
254 }
255
257 if (!State)
258 {
259 return (AE_NO_MEMORY);
260 }
261
262 State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_RESULT;
263 AcpiUtPushGenericState (&WalkState->Results, State);
264
265 /* Increase the length of the result stack by the length of frame */
266
268
269 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Results=%p State=%p\n",
270 State, WalkState));
271
272 return (AE_OK);
273}
274
275
276/*******************************************************************************
277 *
278 * FUNCTION: AcpiDsResultStackPop
279 *
280 * PARAMETERS: WalkState - Current Walk state
281 *
282 * RETURN: Status
283 *
284 * DESCRIPTION: Pop an object off of the WalkState result stack
285 *
286 ******************************************************************************/
287
288static ACPI_STATUS
290 ACPI_WALK_STATE *WalkState)
291{
293
294
295 ACPI_FUNCTION_NAME (DsResultStackPop);
296
297
298 /* Check for stack underflow */
299
300 if (WalkState->Results == NULL)
301 {
303 "Result stack underflow - State=%p\n", WalkState));
304 return (AE_AML_NO_OPERAND);
305 }
306
307 if (WalkState->ResultSize < ACPI_RESULTS_FRAME_OBJ_NUM)
308 {
309 ACPI_ERROR ((AE_INFO, "Insufficient result stack size"));
310 return (AE_AML_INTERNAL);
311 }
312
313 State = AcpiUtPopGenericState (&WalkState->Results);
315
316 /* Decrease the length of result stack by the length of frame */
317
319
321 "Result=%p RemainingResults=%X State=%p\n",
322 State, WalkState->ResultCount, WalkState));
323
324 return (AE_OK);
325}
326
327
328/*******************************************************************************
329 *
330 * FUNCTION: AcpiDsObjStackPush
331 *
332 * PARAMETERS: Object - Object to push
333 * WalkState - Current Walk state
334 *
335 * RETURN: Status
336 *
337 * DESCRIPTION: Push an object onto this walk's object/operand stack
338 *
339 ******************************************************************************/
340
343 void *Object,
344 ACPI_WALK_STATE *WalkState)
345{
346 ACPI_FUNCTION_NAME (DsObjStackPush);
347
348
349 /* Check for stack overflow */
350
351 if (WalkState->NumOperands >= ACPI_OBJ_NUM_OPERANDS)
352 {
354 "Object stack overflow! Obj=%p State=%p #Ops=%u",
355 Object, WalkState, WalkState->NumOperands));
356 return (AE_STACK_OVERFLOW);
357 }
358
359 /* Put the object onto the stack */
360
361 WalkState->Operands [WalkState->OperandIndex] = Object;
362 WalkState->NumOperands++;
363
364 /* For the usual order of filling the operand stack */
365
366 WalkState->OperandIndex++;
367
368 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p #Ops=%X\n",
370 WalkState, WalkState->NumOperands));
371
372 return (AE_OK);
373}
374
375
376/*******************************************************************************
377 *
378 * FUNCTION: AcpiDsObjStackPop
379 *
380 * PARAMETERS: PopCount - Number of objects/entries to pop
381 * WalkState - Current Walk state
382 *
383 * RETURN: Status
384 *
385 * DESCRIPTION: Pop this walk's object stack. Objects on the stack are NOT
386 * deleted by this routine.
387 *
388 ******************************************************************************/
389
392 UINT32 PopCount,
393 ACPI_WALK_STATE *WalkState)
394{
395 UINT32 i;
396
397
398 ACPI_FUNCTION_NAME (DsObjStackPop);
399
400
401 for (i = 0; i < PopCount; i++)
402 {
403 /* Check for stack underflow */
404
405 if (WalkState->NumOperands == 0)
406 {
408 "Object stack underflow! Count=%X State=%p #Ops=%u",
409 PopCount, WalkState, WalkState->NumOperands));
410 return (AE_STACK_UNDERFLOW);
411 }
412
413 /* Just set the stack entry to null */
414
415 WalkState->NumOperands--;
416 WalkState->Operands [WalkState->NumOperands] = NULL;
417 }
418
419 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Count=%X State=%p #Ops=%u\n",
420 PopCount, WalkState, WalkState->NumOperands));
421
422 return (AE_OK);
423}
424
425
426/*******************************************************************************
427 *
428 * FUNCTION: AcpiDsObjStackPopAndDelete
429 *
430 * PARAMETERS: PopCount - Number of objects/entries to pop
431 * WalkState - Current Walk state
432 *
433 * RETURN: Status
434 *
435 * DESCRIPTION: Pop this walk's object stack and delete each object that is
436 * popped off.
437 *
438 ******************************************************************************/
439
440void
442 UINT32 PopCount,
443 ACPI_WALK_STATE *WalkState)
444{
445 INT32 i;
446 ACPI_OPERAND_OBJECT *ObjDesc;
447
448
449 ACPI_FUNCTION_NAME (DsObjStackPopAndDelete);
450
451
452 if (PopCount == 0)
453 {
454 return;
455 }
456
457 for (i = (INT32) PopCount - 1; i >= 0; i--)
458 {
459 if (WalkState->NumOperands == 0)
460 {
461 return;
462 }
463
464 /* Pop the stack and delete an object if present in this stack entry */
465
466 WalkState->NumOperands--;
467 ObjDesc = WalkState->Operands [i];
468 if (ObjDesc)
469 {
470 AcpiUtRemoveReference (WalkState->Operands [i]);
471 WalkState->Operands [i] = NULL;
472 }
473 }
474
475 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Count=%X State=%p #Ops=%X\n",
476 PopCount, WalkState, WalkState->NumOperands));
477}
478
479
480/*******************************************************************************
481 *
482 * FUNCTION: AcpiDsGetCurrentWalkState
483 *
484 * PARAMETERS: Thread - Get current active state for this Thread
485 *
486 * RETURN: Pointer to the current walk state
487 *
488 * DESCRIPTION: Get the walk state that is at the head of the list (the "current"
489 * walk state.)
490 *
491 ******************************************************************************/
492
496{
497 ACPI_FUNCTION_NAME (DsGetCurrentWalkState);
498
499
500 if (!Thread)
501 {
502 return (NULL);
503 }
504
505 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Current WalkState %p\n",
506 Thread->WalkStateList));
507
508 return (Thread->WalkStateList);
509}
510
511
512/*******************************************************************************
513 *
514 * FUNCTION: AcpiDsPushWalkState
515 *
516 * PARAMETERS: WalkState - State to push
517 * Thread - Thread state object
518 *
519 * RETURN: None
520 *
521 * DESCRIPTION: Place the Thread state at the head of the state list
522 *
523 ******************************************************************************/
524
525void
527 ACPI_WALK_STATE *WalkState,
529{
530 ACPI_FUNCTION_TRACE (DsPushWalkState);
531
532
533 WalkState->Next = Thread->WalkStateList;
534 Thread->WalkStateList = WalkState;
535
537}
538
539
540/*******************************************************************************
541 *
542 * FUNCTION: AcpiDsPopWalkState
543 *
544 * PARAMETERS: Thread - Current thread state
545 *
546 * RETURN: A WalkState object popped from the thread's stack
547 *
548 * DESCRIPTION: Remove and return the walkstate object that is at the head of
549 * the walk stack for the given walk list. NULL indicates that
550 * the list is empty.
551 *
552 ******************************************************************************/
553
557{
558 ACPI_WALK_STATE *WalkState;
559
560
561 ACPI_FUNCTION_TRACE (DsPopWalkState);
562
563
564 WalkState = Thread->WalkStateList;
565
566 if (WalkState)
567 {
568 /* Next walk state becomes the current walk state */
569
570 Thread->WalkStateList = WalkState->Next;
571
572 /*
573 * Don't clear the NEXT field, this serves as an indicator
574 * that there is a parent WALK STATE
575 * Do Not: WalkState->Next = NULL;
576 */
577 }
578
579 return_PTR (WalkState);
580}
581
582
583/*******************************************************************************
584 *
585 * FUNCTION: AcpiDsCreateWalkState
586 *
587 * PARAMETERS: OwnerId - ID for object creation
588 * Origin - Starting point for this walk
589 * MethodDesc - Method object
590 * Thread - Current thread state
591 *
592 * RETURN: Pointer to the new walk state.
593 *
594 * DESCRIPTION: Allocate and initialize a new walk state. The current walk
595 * state is set to this new state.
596 *
597 ******************************************************************************/
598
602 ACPI_PARSE_OBJECT *Origin,
603 ACPI_OPERAND_OBJECT *MethodDesc,
605{
606 ACPI_WALK_STATE *WalkState;
607
608
609 ACPI_FUNCTION_TRACE (DsCreateWalkState);
610
611
612 WalkState = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_WALK_STATE));
613 if (!WalkState)
614 {
616 }
617
619 WalkState->MethodDesc = MethodDesc;
620 WalkState->OwnerId = OwnerId;
621 WalkState->Origin = Origin;
622 WalkState->Thread = Thread;
623
624 WalkState->ParserState.StartOp = Origin;
625
626 /* Init the method args/local */
627
628#ifndef ACPI_CONSTANT_EVAL_ONLY
629 AcpiDsMethodDataInit (WalkState);
630#endif
631
632 /* Put the new state at the head of the walk list */
633
634 if (Thread)
635 {
636 AcpiDsPushWalkState (WalkState, Thread);
637 }
638
639 return_PTR (WalkState);
640}
641
642
643/*******************************************************************************
644 *
645 * FUNCTION: AcpiDsInitAmlWalk
646 *
647 * PARAMETERS: WalkState - New state to be initialized
648 * Op - Current parse op
649 * MethodNode - Control method NS node, if any
650 * AmlStart - Start of AML
651 * AmlLength - Length of AML
652 * Info - Method info block (params, etc.)
653 * PassNumber - 1, 2, or 3
654 *
655 * RETURN: Status
656 *
657 * DESCRIPTION: Initialize a walk state for a pass 1 or 2 parse tree walk
658 *
659 ******************************************************************************/
660
663 ACPI_WALK_STATE *WalkState,
665 ACPI_NAMESPACE_NODE *MethodNode,
666 UINT8 *AmlStart,
667 UINT32 AmlLength,
669 UINT8 PassNumber)
670{
672 ACPI_PARSE_STATE *ParserState = &WalkState->ParserState;
673 ACPI_PARSE_OBJECT *ExtraOp;
674
675
676 ACPI_FUNCTION_TRACE (DsInitAmlWalk);
677
678
679 WalkState->ParserState.Aml =
680 WalkState->ParserState.AmlStart = AmlStart;
681 WalkState->ParserState.AmlEnd =
682 WalkState->ParserState.PkgEnd = AmlStart + AmlLength;
683
684 /* The NextOp of the NextWalk will be the beginning of the method */
685
686 WalkState->NextOp = NULL;
687 WalkState->PassNumber = PassNumber;
688
689 if (Info)
690 {
691 WalkState->Params = Info->Parameters;
692 WalkState->CallerReturnDesc = &Info->ReturnObject;
693 }
694
695 Status = AcpiPsInitScope (&WalkState->ParserState, Op);
696 if (ACPI_FAILURE (Status))
697 {
699 }
700
701 if (MethodNode)
702 {
703 WalkState->ParserState.StartNode = MethodNode;
704 WalkState->WalkType = ACPI_WALK_METHOD;
705 WalkState->MethodNode = MethodNode;
706 WalkState->MethodDesc = AcpiNsGetAttachedObject (MethodNode);
707
708 /* Push start scope on scope stack and make it current */
709
711 MethodNode, ACPI_TYPE_METHOD, WalkState);
712 if (ACPI_FAILURE (Status))
713 {
715 }
716
717 /* Init the method arguments */
718
720 ACPI_METHOD_NUM_ARGS, WalkState);
721 if (ACPI_FAILURE (Status))
722 {
724 }
725 }
726 else
727 {
728 /*
729 * Setup the current scope.
730 * Find a Named Op that has a namespace node associated with it.
731 * search upwards from this Op. Current scope is the first
732 * Op with a namespace node.
733 */
734 ExtraOp = ParserState->StartOp;
735 while (ExtraOp && !ExtraOp->Common.Node)
736 {
737 ExtraOp = ExtraOp->Common.Parent;
738 }
739
740 if (!ExtraOp)
741 {
742 ParserState->StartNode = NULL;
743 }
744 else
745 {
746 ParserState->StartNode = ExtraOp->Common.Node;
747 }
748
749 if (ParserState->StartNode)
750 {
751 /* Push start scope on scope stack and make it current */
752
753 Status = AcpiDsScopeStackPush (ParserState->StartNode,
754 ParserState->StartNode->Type, WalkState);
755 if (ACPI_FAILURE (Status))
756 {
758 }
759 }
760 }
761
762 Status = AcpiDsInitCallbacks (WalkState, PassNumber);
764}
765
766
767/*******************************************************************************
768 *
769 * FUNCTION: AcpiDsDeleteWalkState
770 *
771 * PARAMETERS: WalkState - State to delete
772 *
773 * RETURN: Status
774 *
775 * DESCRIPTION: Delete a walk state including all internal data structures
776 *
777 ******************************************************************************/
778
779void
781 ACPI_WALK_STATE *WalkState)
782{
784
785
786 ACPI_FUNCTION_TRACE_PTR (DsDeleteWalkState, WalkState);
787
788
789 if (!WalkState)
790 {
792 }
793
794 if (WalkState->DescriptorType != ACPI_DESC_TYPE_WALK)
795 {
796 ACPI_ERROR ((AE_INFO, "%p is not a valid walk state",
797 WalkState));
799 }
800
801 /* There should not be any open scopes */
802
803 if (WalkState->ParserState.Scope)
804 {
805 ACPI_ERROR ((AE_INFO, "%p walk still has a scope list",
806 WalkState));
807 AcpiPsCleanupScope (&WalkState->ParserState);
808 }
809
810 /* Always must free any linked control states */
811
812 while (WalkState->ControlState)
813 {
814 State = WalkState->ControlState;
815 WalkState->ControlState = State->Common.Next;
816
818 }
819
820 /* Always must free any linked parse states */
821
822 while (WalkState->ScopeInfo)
823 {
824 State = WalkState->ScopeInfo;
825 WalkState->ScopeInfo = State->Common.Next;
826
828 }
829
830 /* Always must free any stacked result states */
831
832 while (WalkState->Results)
833 {
834 State = WalkState->Results;
835 WalkState->Results = State->Common.Next;
836
838 }
839
840 ACPI_FREE (WalkState);
842}
signed int INT32
unsigned char UINT8
unsigned int UINT32
#define AE_STACK_OVERFLOW
Definition: acexcep.h:120
#define AE_AML_NO_OPERAND
Definition: acexcep.h:181
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define AE_AML_INTERNAL
Definition: acexcep.h:194
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define AE_STACK_UNDERFLOW
Definition: acexcep.h:121
#define AE_NO_MEMORY
Definition: acexcep.h:112
#define AE_AML_NO_RETURN_VALUE
Definition: acexcep.h:197
#define AE_OK
Definition: acexcep.h:97
ACPI_OPERAND_OBJECT * AcpiNsGetAttachedObject(ACPI_NAMESPACE_NODE *Node)
Definition: nsobject.c:308
#define ACPI_DESC_TYPE_WALK
Definition: acobject.h:574
#define ACPI_DESC_TYPE_STATE_RESULT
Definition: acobject.h:571
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define ACPI_DB_PARSE
Definition: acoutput.h:162
#define ACPI_MODULE_NAME(Name)
Definition: acoutput.h:216
#define return_PTR(s)
Definition: acoutput.h:497
#define ACPI_DB_EXEC
Definition: acoutput.h:165
#define ACPI_FUNCTION_TRACE_PTR(a, b)
Definition: acoutput.h:481
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define AE_INFO
Definition: acoutput.h:230
#define return_VOID
Definition: acoutput.h:495
#define ACPI_FUNCTION_NAME(a)
Definition: acoutput.h:479
ACPI_STATUS AcpiPsInitScope(ACPI_PARSE_STATE *ParserState, ACPI_PARSE_OBJECT *Root)
Definition: psscope.c:112
void AcpiPsCleanupScope(ACPI_PARSE_STATE *state)
Definition: psscope.c:277
#define ACPI_WALK_METHOD
Definition: acstruct.h:69
#define ACPI_FREE(a)
Definition: actypes.h:386
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
UINT16 ACPI_OWNER_ID
Definition: actypes.h:486
#define ACPI_TYPE_METHOD
Definition: actypes.h:695
ACPI_GENERIC_STATE * AcpiUtCreateGenericState(void)
Definition: utstate.c:130
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:790
const char * AcpiUtGetObjectTypeName(ACPI_OPERAND_OBJECT *ObjDesc)
Definition: utdecode.c:264
ACPI_GENERIC_STATE * AcpiUtPopGenericState(ACPI_GENERIC_STATE **ListHead)
Definition: utstate.c:93
void AcpiUtPushGenericState(ACPI_GENERIC_STATE **ListHead, ACPI_GENERIC_STATE *State)
Definition: utstate.c:65
void AcpiUtDeleteGenericState(ACPI_GENERIC_STATE *State)
Definition: utstate.c:340
#define NULL
Definition: types.h:112
#define ACPI_RESULTS_OBJ_NUM_MAX
Definition: acconfig.h:184
#define ACPI_OBJ_NUM_OPERANDS
Definition: acconfig.h:172
#define ACPI_RESULTS_FRAME_OBJ_NUM
Definition: acconfig.h:177
#define ACPI_METHOD_NUM_ARGS
Definition: acconfig.h:166
ACPI_STATUS AcpiDsMethodDataInitArgs(ACPI_OPERAND_OBJECT **Params, UINT32 MaxParamCount, ACPI_WALK_STATE *WalkState)
Definition: dsmthdat.c:213
void AcpiDsMethodDataInit(ACPI_WALK_STATE *WalkState)
Definition: dsmthdat.c:100
ACPI_STATUS AcpiDsInitCallbacks(ACPI_WALK_STATE *WalkState, UINT32 PassNumber)
Definition: dswload.c:73
ACPI_STATUS AcpiDsScopeStackPush(ACPI_NAMESPACE_NODE *Node, ACPI_OBJECT_TYPE Type, ACPI_WALK_STATE *WalkState)
Definition: dswscope.c:107
void AcpiDsObjStackPopAndDelete(UINT32 PopCount, ACPI_WALK_STATE *WalkState)
Definition: dswstate.c:441
void AcpiDsPushWalkState(ACPI_WALK_STATE *WalkState, ACPI_THREAD_STATE *Thread)
Definition: dswstate.c:526
ACPI_WALK_STATE * AcpiDsCreateWalkState(ACPI_OWNER_ID OwnerId, ACPI_PARSE_OBJECT *Origin, ACPI_OPERAND_OBJECT *MethodDesc, ACPI_THREAD_STATE *Thread)
Definition: dswstate.c:600
static ACPI_STATUS AcpiDsResultStackPop(ACPI_WALK_STATE *WalkState)
Definition: dswstate.c:289
ACPI_STATUS AcpiDsResultPop(ACPI_OPERAND_OBJECT **Object, ACPI_WALK_STATE *WalkState)
Definition: dswstate.c:78
ACPI_STATUS AcpiDsInitAmlWalk(ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op, ACPI_NAMESPACE_NODE *MethodNode, UINT8 *AmlStart, UINT32 AmlLength, ACPI_EVALUATE_INFO *Info, UINT8 PassNumber)
Definition: dswstate.c:662
ACPI_STATUS AcpiDsObjStackPush(void *Object, ACPI_WALK_STATE *WalkState)
Definition: dswstate.c:342
ACPI_STATUS AcpiDsObjStackPop(UINT32 PopCount, ACPI_WALK_STATE *WalkState)
Definition: dswstate.c:391
ACPI_WALK_STATE * AcpiDsPopWalkState(ACPI_THREAD_STATE *Thread)
Definition: dswstate.c:555
ACPI_WALK_STATE * AcpiDsGetCurrentWalkState(ACPI_THREAD_STATE *Thread)
Definition: dswstate.c:494
static ACPI_STATUS AcpiDsResultStackPush(ACPI_WALK_STATE *WalkState)
Definition: dswstate.c:237
ACPI_STATUS AcpiDsResultPush(ACPI_OPERAND_OBJECT *Object, ACPI_WALK_STATE *WalkState)
Definition: dswstate.c:160
void AcpiDsDeleteWalkState(ACPI_WALK_STATE *WalkState)
Definition: dswstate.c:780
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
_Must_inspect_result_ _In_opt_ PVOID OwnerId
Definition: fsrtlfuncs.h:907
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
if(dx< 0)
Definition: linetemp.h:194
union acpi_parse_object * StartOp
Definition: aclocal.h:1106
union acpi_generic_state * Scope
Definition: aclocal.h:1108
UINT8 * PkgEnd
Definition: aclocal.h:1105
UINT8 * AmlEnd
Definition: aclocal.h:1103
struct acpi_namespace_node * StartNode
Definition: aclocal.h:1107
UINT8 * AmlStart
Definition: aclocal.h:1101
union acpi_operand_object * MethodDesc
Definition: acstruct.h:115
union acpi_operand_object * Operands[ACPI_OBJ_NUM_OPERANDS+1]
Definition: acstruct.h:105
ACPI_GENERIC_STATE * Results
Definition: acstruct.h:122
ACPI_PARSE_OBJECT * Origin
Definition: acstruct.h:120
struct acpi_namespace_node * MethodNode
Definition: acstruct.h:116
UINT8 OperandIndex
Definition: acstruct.h:81
ACPI_GENERIC_STATE * ScopeInfo
Definition: acstruct.h:124
ACPI_PARSE_OBJECT * NextOp
Definition: acstruct.h:126
union acpi_operand_object ** Params
Definition: acstruct.h:106
struct acpi_walk_state * Next
Definition: acstruct.h:75
UINT8 ResultCount
Definition: acstruct.h:90
UINT8 DescriptorType
Definition: acstruct.h:76
UINT8 PassNumber
Definition: acstruct.h:87
union acpi_operand_object ** CallerReturnDesc
Definition: acstruct.h:109
UINT8 CurrentResult
Definition: acstruct.h:84
UINT8 ResultSize
Definition: acstruct.h:89
ACPI_GENERIC_STATE * ControlState
Definition: acstruct.h:110
UINT8 NumOperands
Definition: acstruct.h:80
ACPI_OWNER_ID OwnerId
Definition: acstruct.h:82
ACPI_THREAD_STATE * Thread
Definition: acstruct.h:127
ACPI_PARSE_STATE ParserState
Definition: acstruct.h:97
UINT8 WalkType
Definition: acstruct.h:77
ACPI_PARSE_OBJ_COMMON Common
Definition: aclocal.h:1078
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ WDFCOLLECTION _In_ ULONG Index