Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
acdispat.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Name: acdispat.h - dispatcher (parser to interpreter interface)
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2012, 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 #ifndef _ACDISPAT_H_
45 #define _ACDISPAT_H_
46 
47 #define NAMEOF_LOCAL_NTE "__L0"
48 #define NAMEOF_ARG_NTE "__A0"
49 
50 /*
51  * dsargs - execution of dynamic arguments for static objects
52  */
55 
58 
60 
62 
64 
65 /*
66  * dscontrol - support for execution control opcodes
67  */
70  union acpi_parse_object *op);
71 
74  union acpi_parse_object *op);
75 
76 /*
77  * dsopcode - support for late operand evaluation
78  */
81  union acpi_parse_object *op);
82 
85  union acpi_parse_object *op);
86 
89  union acpi_parse_object *op);
90 
93  union acpi_parse_object *op,
94  union acpi_operand_object *obj_desc);
95 
98  union acpi_parse_object *op);
99 
101 
102 /*
103  * dsexec - Parser/Interpreter interface, method execution callbacks
104  */
107  union acpi_operand_object *result_obj);
108 
110 acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
111  union acpi_parse_object **out_op);
112 
114 
115 /*
116  * dsfield - Parser/Interpreter interface for AML fields
117  */
120  struct acpi_namespace_node *region_node,
121  struct acpi_walk_state *walk_state);
122 
125  struct acpi_namespace_node *region_node,
126  struct acpi_walk_state *walk_state);
127 
130  struct acpi_namespace_node *region_node,
131  struct acpi_walk_state *walk_state);
132 
135  struct acpi_walk_state *walk_state);
136 
139  struct acpi_walk_state *walk_state);
140 
141 /*
142  * dsload - Parser/Interpreter interface, pass 1 namespace load callbacks
143  */
145 acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);
146 
148 acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
149  union acpi_parse_object **out_op);
150 
152 
153 /*
154  * dsload - Parser/Interpreter interface, pass 2 namespace load callbacks
155  */
157 acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
158  union acpi_parse_object **out_op);
159 
161 
162 /*
163  * dsmthdat - method data (locals/args)
164  */
167  u32 index,
169  struct acpi_walk_state *walk_state);
170 
173  u32 index,
174  struct acpi_walk_state *walk_state,
175  union acpi_operand_object ***node);
176 
177 void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state);
178 
180 
183  u32 index,
184  struct acpi_walk_state *walk_state,
185  union acpi_operand_object **dest_desc);
186 
189  u32 max_param_count,
190  struct acpi_walk_state *walk_state);
191 
194  u32 index,
195  struct acpi_walk_state *walk_state,
196  struct acpi_namespace_node **node);
197 
198 void acpi_ds_method_data_init(struct acpi_walk_state *walk_state);
199 
200 /*
201  * dsmethod - Parser/Interpreter interface - control method parsing
202  */
204 
207  struct acpi_walk_state *walk_state,
208  union acpi_parse_object *op);
209 
212  union acpi_operand_object *return_desc);
213 
214 void
216  struct acpi_walk_state *walk_state);
217 
220  union acpi_operand_object *obj_desc,
221  struct acpi_walk_state *walk_state);
222 
225 
226 /*
227  * dsinit
228  */
230 acpi_ds_initialize_objects(u32 table_index,
231  struct acpi_namespace_node *start_node);
232 
233 /*
234  * dsobject - Parser/Interpreter interface - object initialization and conversion
235  */
238  union acpi_parse_object *op,
240  union acpi_operand_object **obj_desc_ptr);
241 
244  union acpi_parse_object *op,
245  u32 package_length,
246  union acpi_operand_object **obj_desc);
247 
250  union acpi_parse_object *op,
251  u16 opcode, union acpi_operand_object **obj_desc);
252 
254 acpi_ds_create_node(struct acpi_walk_state *walk_state,
255  struct acpi_namespace_node *node,
256  union acpi_parse_object *op);
257 
258 /*
259  * dsutils - Parser/Interpreter interface utility routines
260  */
261 void acpi_ds_clear_implicit_return(struct acpi_walk_state *walk_state);
262 
263 u8
265  struct acpi_walk_state *walk_state,
266  u8 add_reference);
267 
268 u8
270  struct acpi_walk_state *walk_state);
271 
272 void
274  union acpi_operand_object *result_obj,
275  struct acpi_walk_state *walk_state);
276 
278 acpi_ds_create_operand(struct acpi_walk_state *walk_state,
279  union acpi_parse_object *arg, u32 args_remaining);
280 
282 acpi_ds_create_operands(struct acpi_walk_state *walk_state,
283  union acpi_parse_object *first_arg);
284 
286 
287 void acpi_ds_clear_operands(struct acpi_walk_state *walk_state);
288 
290 
291 /*
292  * dswscope - Scope Stack manipulation
293  */
297  struct acpi_walk_state *walk_state);
298 
300 
301 void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state);
302 
303 /*
304  * dswstate - parser WALK_STATE management routines
305  */
307 acpi_ds_obj_stack_push(void *object, struct acpi_walk_state *walk_state);
308 
310 acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state *walk_state);
311 
314  *mth_desc, struct acpi_thread_state
315  *thread);
316 
318 acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
319  union acpi_parse_object *op,
321  u8 * aml_start,
322  u32 aml_length,
324 
325 void
327  struct acpi_walk_state *walk_state);
328 
329 void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state);
330 
332  *thread);
333 
334 void
335 acpi_ds_push_walk_state(struct acpi_walk_state *walk_state,
336  struct acpi_thread_state *thread);
337 
339 
341  *thread);
342 
345  struct acpi_walk_state *walk_state);
346 
349  struct acpi_walk_state *walk_state);
350 
351 #endif /* _ACDISPAT_H_ */