Fixed compatibility of output.
[AROS.git] / arch / all-pc / acpica / source / include / acdispat.h
blobfc747f1998cf9f2646cc340214e8ba0eba56d668
1 /******************************************************************************
3 * Name: acdispat.h - dispatcher (parser to interpreter interface)
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2013, Intel Corp.
9 * All rights reserved.
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.
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.
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.
45 #ifndef _ACDISPAT_H_
46 #define _ACDISPAT_H_
49 #define NAMEOF_LOCAL_NTE "__L0"
50 #define NAMEOF_ARG_NTE "__A0"
54 * dsargs - execution of dynamic arguments for static objects
56 ACPI_STATUS
57 AcpiDsGetBufferFieldArguments (
58 ACPI_OPERAND_OBJECT *ObjDesc);
60 ACPI_STATUS
61 AcpiDsGetBankFieldArguments (
62 ACPI_OPERAND_OBJECT *ObjDesc);
64 ACPI_STATUS
65 AcpiDsGetRegionArguments (
66 ACPI_OPERAND_OBJECT *RgnDesc);
68 ACPI_STATUS
69 AcpiDsGetBufferArguments (
70 ACPI_OPERAND_OBJECT *ObjDesc);
72 ACPI_STATUS
73 AcpiDsGetPackageArguments (
74 ACPI_OPERAND_OBJECT *ObjDesc);
78 * dscontrol - support for execution control opcodes
80 ACPI_STATUS
81 AcpiDsExecBeginControlOp (
82 ACPI_WALK_STATE *WalkState,
83 ACPI_PARSE_OBJECT *Op);
85 ACPI_STATUS
86 AcpiDsExecEndControlOp (
87 ACPI_WALK_STATE *WalkState,
88 ACPI_PARSE_OBJECT *Op);
92 * dsopcode - support for late operand evaluation
94 ACPI_STATUS
95 AcpiDsEvalBufferFieldOperands (
96 ACPI_WALK_STATE *WalkState,
97 ACPI_PARSE_OBJECT *Op);
99 ACPI_STATUS
100 AcpiDsEvalRegionOperands (
101 ACPI_WALK_STATE *WalkState,
102 ACPI_PARSE_OBJECT *Op);
104 ACPI_STATUS
105 AcpiDsEvalTableRegionOperands (
106 ACPI_WALK_STATE *WalkState,
107 ACPI_PARSE_OBJECT *Op);
109 ACPI_STATUS
110 AcpiDsEvalDataObjectOperands (
111 ACPI_WALK_STATE *WalkState,
112 ACPI_PARSE_OBJECT *Op,
113 ACPI_OPERAND_OBJECT *ObjDesc);
115 ACPI_STATUS
116 AcpiDsEvalBankFieldOperands (
117 ACPI_WALK_STATE *WalkState,
118 ACPI_PARSE_OBJECT *Op);
120 ACPI_STATUS
121 AcpiDsInitializeRegion (
122 ACPI_HANDLE ObjHandle);
126 * dsexec - Parser/Interpreter interface, method execution callbacks
128 ACPI_STATUS
129 AcpiDsGetPredicateValue (
130 ACPI_WALK_STATE *WalkState,
131 ACPI_OPERAND_OBJECT *ResultObj);
133 ACPI_STATUS
134 AcpiDsExecBeginOp (
135 ACPI_WALK_STATE *WalkState,
136 ACPI_PARSE_OBJECT **OutOp);
138 ACPI_STATUS
139 AcpiDsExecEndOp (
140 ACPI_WALK_STATE *State);
144 * dsfield - Parser/Interpreter interface for AML fields
146 ACPI_STATUS
147 AcpiDsCreateField (
148 ACPI_PARSE_OBJECT *Op,
149 ACPI_NAMESPACE_NODE *RegionNode,
150 ACPI_WALK_STATE *WalkState);
152 ACPI_STATUS
153 AcpiDsCreateBankField (
154 ACPI_PARSE_OBJECT *Op,
155 ACPI_NAMESPACE_NODE *RegionNode,
156 ACPI_WALK_STATE *WalkState);
158 ACPI_STATUS
159 AcpiDsCreateIndexField (
160 ACPI_PARSE_OBJECT *Op,
161 ACPI_NAMESPACE_NODE *RegionNode,
162 ACPI_WALK_STATE *WalkState);
164 ACPI_STATUS
165 AcpiDsCreateBufferField (
166 ACPI_PARSE_OBJECT *Op,
167 ACPI_WALK_STATE *WalkState);
169 ACPI_STATUS
170 AcpiDsInitFieldObjects (
171 ACPI_PARSE_OBJECT *Op,
172 ACPI_WALK_STATE *WalkState);
176 * dsload - Parser/Interpreter interface, pass 1 namespace load callbacks
178 ACPI_STATUS
179 AcpiDsInitCallbacks (
180 ACPI_WALK_STATE *WalkState,
181 UINT32 PassNumber);
183 ACPI_STATUS
184 AcpiDsLoad1BeginOp (
185 ACPI_WALK_STATE *WalkState,
186 ACPI_PARSE_OBJECT **OutOp);
188 ACPI_STATUS
189 AcpiDsLoad1EndOp (
190 ACPI_WALK_STATE *WalkState);
194 * dsload - Parser/Interpreter interface, pass 2 namespace load callbacks
196 ACPI_STATUS
197 AcpiDsLoad2BeginOp (
198 ACPI_WALK_STATE *WalkState,
199 ACPI_PARSE_OBJECT **OutOp);
201 ACPI_STATUS
202 AcpiDsLoad2EndOp (
203 ACPI_WALK_STATE *WalkState);
207 * dsmthdat - method data (locals/args)
209 ACPI_STATUS
210 AcpiDsStoreObjectToLocal (
211 UINT8 Type,
212 UINT32 Index,
213 ACPI_OPERAND_OBJECT *SrcDesc,
214 ACPI_WALK_STATE *WalkState);
216 ACPI_STATUS
217 AcpiDsMethodDataGetEntry (
218 UINT16 Opcode,
219 UINT32 Index,
220 ACPI_WALK_STATE *WalkState,
221 ACPI_OPERAND_OBJECT ***Node);
223 void
224 AcpiDsMethodDataDeleteAll (
225 ACPI_WALK_STATE *WalkState);
227 BOOLEAN
228 AcpiDsIsMethodValue (
229 ACPI_OPERAND_OBJECT *ObjDesc);
231 ACPI_STATUS
232 AcpiDsMethodDataGetValue (
233 UINT8 Type,
234 UINT32 Index,
235 ACPI_WALK_STATE *WalkState,
236 ACPI_OPERAND_OBJECT **DestDesc);
238 ACPI_STATUS
239 AcpiDsMethodDataInitArgs (
240 ACPI_OPERAND_OBJECT **Params,
241 UINT32 MaxParamCount,
242 ACPI_WALK_STATE *WalkState);
244 ACPI_STATUS
245 AcpiDsMethodDataGetNode (
246 UINT8 Type,
247 UINT32 Index,
248 ACPI_WALK_STATE *WalkState,
249 ACPI_NAMESPACE_NODE **Node);
251 void
252 AcpiDsMethodDataInit (
253 ACPI_WALK_STATE *WalkState);
257 * dsmethod - Parser/Interpreter interface - control method parsing
259 ACPI_STATUS
260 AcpiDsParseMethod (
261 ACPI_NAMESPACE_NODE *Node);
263 ACPI_STATUS
264 AcpiDsCallControlMethod (
265 ACPI_THREAD_STATE *Thread,
266 ACPI_WALK_STATE *WalkState,
267 ACPI_PARSE_OBJECT *Op);
269 ACPI_STATUS
270 AcpiDsRestartControlMethod (
271 ACPI_WALK_STATE *WalkState,
272 ACPI_OPERAND_OBJECT *ReturnDesc);
274 void
275 AcpiDsTerminateControlMethod (
276 ACPI_OPERAND_OBJECT *MethodDesc,
277 ACPI_WALK_STATE *WalkState);
279 ACPI_STATUS
280 AcpiDsBeginMethodExecution (
281 ACPI_NAMESPACE_NODE *MethodNode,
282 ACPI_OPERAND_OBJECT *ObjDesc,
283 ACPI_WALK_STATE *WalkState);
285 ACPI_STATUS
286 AcpiDsMethodError (
287 ACPI_STATUS Status,
288 ACPI_WALK_STATE *WalkState);
291 * dsinit
293 ACPI_STATUS
294 AcpiDsInitializeObjects (
295 UINT32 TableIndex,
296 ACPI_NAMESPACE_NODE *StartNode);
300 * dsobject - Parser/Interpreter interface - object initialization and conversion
302 ACPI_STATUS
303 AcpiDsBuildInternalBufferObj (
304 ACPI_WALK_STATE *WalkState,
305 ACPI_PARSE_OBJECT *Op,
306 UINT32 BufferLength,
307 ACPI_OPERAND_OBJECT **ObjDescPtr);
309 ACPI_STATUS
310 AcpiDsBuildInternalPackageObj (
311 ACPI_WALK_STATE *WalkState,
312 ACPI_PARSE_OBJECT *op,
313 UINT32 PackageLength,
314 ACPI_OPERAND_OBJECT **ObjDesc);
316 ACPI_STATUS
317 AcpiDsInitObjectFromOp (
318 ACPI_WALK_STATE *WalkState,
319 ACPI_PARSE_OBJECT *Op,
320 UINT16 Opcode,
321 ACPI_OPERAND_OBJECT **ObjDesc);
323 ACPI_STATUS
324 AcpiDsCreateNode (
325 ACPI_WALK_STATE *WalkState,
326 ACPI_NAMESPACE_NODE *Node,
327 ACPI_PARSE_OBJECT *Op);
331 * dsutils - Parser/Interpreter interface utility routines
333 void
334 AcpiDsClearImplicitReturn (
335 ACPI_WALK_STATE *WalkState);
337 BOOLEAN
338 AcpiDsDoImplicitReturn (
339 ACPI_OPERAND_OBJECT *ReturnDesc,
340 ACPI_WALK_STATE *WalkState,
341 BOOLEAN AddReference);
343 BOOLEAN
344 AcpiDsIsResultUsed (
345 ACPI_PARSE_OBJECT *Op,
346 ACPI_WALK_STATE *WalkState);
348 void
349 AcpiDsDeleteResultIfNotUsed (
350 ACPI_PARSE_OBJECT *Op,
351 ACPI_OPERAND_OBJECT *ResultObj,
352 ACPI_WALK_STATE *WalkState);
354 ACPI_STATUS
355 AcpiDsCreateOperand (
356 ACPI_WALK_STATE *WalkState,
357 ACPI_PARSE_OBJECT *Arg,
358 UINT32 ArgsRemaining);
360 ACPI_STATUS
361 AcpiDsCreateOperands (
362 ACPI_WALK_STATE *WalkState,
363 ACPI_PARSE_OBJECT *FirstArg);
365 ACPI_STATUS
366 AcpiDsResolveOperands (
367 ACPI_WALK_STATE *WalkState);
369 void
370 AcpiDsClearOperands (
371 ACPI_WALK_STATE *WalkState);
373 ACPI_STATUS
374 AcpiDsEvaluateNamePath (
375 ACPI_WALK_STATE *WalkState);
379 * dswscope - Scope Stack manipulation
381 ACPI_STATUS
382 AcpiDsScopeStackPush (
383 ACPI_NAMESPACE_NODE *Node,
384 ACPI_OBJECT_TYPE Type,
385 ACPI_WALK_STATE *WalkState);
388 ACPI_STATUS
389 AcpiDsScopeStackPop (
390 ACPI_WALK_STATE *WalkState);
392 void
393 AcpiDsScopeStackClear (
394 ACPI_WALK_STATE *WalkState);
398 * dswstate - parser WALK_STATE management routines
400 ACPI_STATUS
401 AcpiDsObjStackPush (
402 void *Object,
403 ACPI_WALK_STATE *WalkState);
405 ACPI_STATUS
406 AcpiDsObjStackPop (
407 UINT32 PopCount,
408 ACPI_WALK_STATE *WalkState);
410 ACPI_WALK_STATE *
411 AcpiDsCreateWalkState (
412 ACPI_OWNER_ID OwnerId,
413 ACPI_PARSE_OBJECT *Origin,
414 ACPI_OPERAND_OBJECT *MthDesc,
415 ACPI_THREAD_STATE *Thread);
417 ACPI_STATUS
418 AcpiDsInitAmlWalk (
419 ACPI_WALK_STATE *WalkState,
420 ACPI_PARSE_OBJECT *Op,
421 ACPI_NAMESPACE_NODE *MethodNode,
422 UINT8 *AmlStart,
423 UINT32 AmlLength,
424 ACPI_EVALUATE_INFO *Info,
425 UINT8 PassNumber);
427 void
428 AcpiDsObjStackPopAndDelete (
429 UINT32 PopCount,
430 ACPI_WALK_STATE *WalkState);
432 void
433 AcpiDsDeleteWalkState (
434 ACPI_WALK_STATE *WalkState);
436 ACPI_WALK_STATE *
437 AcpiDsPopWalkState (
438 ACPI_THREAD_STATE *Thread);
440 void
441 AcpiDsPushWalkState (
442 ACPI_WALK_STATE *WalkState,
443 ACPI_THREAD_STATE *Thread);
445 ACPI_STATUS
446 AcpiDsResultStackClear (
447 ACPI_WALK_STATE *WalkState);
449 ACPI_WALK_STATE *
450 AcpiDsGetCurrentWalkState (
451 ACPI_THREAD_STATE *Thread);
453 ACPI_STATUS
454 AcpiDsResultPop (
455 ACPI_OPERAND_OBJECT **Object,
456 ACPI_WALK_STATE *WalkState);
458 ACPI_STATUS
459 AcpiDsResultPush (
460 ACPI_OPERAND_OBJECT *Object,
461 ACPI_WALK_STATE *WalkState);
463 #endif /* _ACDISPAT_H_ */