aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acdispat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/acdispat.h')
-rw-r--r--include/acpi/acdispat.h405
1 files changed, 145 insertions, 260 deletions
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 8f5f2f71b1de..065f24a77cfc 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -41,419 +41,304 @@
41 * POSSIBILITY OF SUCH DAMAGES. 41 * POSSIBILITY OF SUCH DAMAGES.
42 */ 42 */
43 43
44
45#ifndef _ACDISPAT_H_ 44#ifndef _ACDISPAT_H_
46#define _ACDISPAT_H_ 45#define _ACDISPAT_H_
47 46
48
49#define NAMEOF_LOCAL_NTE "__L0" 47#define NAMEOF_LOCAL_NTE "__L0"
50#define NAMEOF_ARG_NTE "__A0" 48#define NAMEOF_ARG_NTE "__A0"
51 49
52
53/* 50/*
54 * dsopcode - support for late evaluation 51 * dsopcode - support for late evaluation
55 */ 52 */
56acpi_status 53acpi_status
57acpi_ds_get_buffer_field_arguments ( 54acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc);
58 union acpi_operand_object *obj_desc);
59
60acpi_status
61acpi_ds_get_region_arguments (
62 union acpi_operand_object *rgn_desc);
63 55
64acpi_status 56acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *rgn_desc);
65acpi_ds_get_buffer_arguments (
66 union acpi_operand_object *obj_desc);
67 57
68acpi_status 58acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc);
69acpi_ds_get_package_arguments (
70 union acpi_operand_object *obj_desc);
71 59
72acpi_status 60acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc);
73acpi_ds_eval_buffer_field_operands (
74 struct acpi_walk_state *walk_state,
75 union acpi_parse_object *op);
76 61
77acpi_status 62acpi_status
78acpi_ds_eval_region_operands ( 63acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
79 struct acpi_walk_state *walk_state, 64 union acpi_parse_object *op);
80 union acpi_parse_object *op);
81 65
82acpi_status 66acpi_status
83acpi_ds_eval_data_object_operands ( 67acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
84 struct acpi_walk_state *walk_state, 68 union acpi_parse_object *op);
85 union acpi_parse_object *op,
86 union acpi_operand_object *obj_desc);
87 69
88acpi_status 70acpi_status
89acpi_ds_initialize_region ( 71acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
90 acpi_handle obj_handle); 72 union acpi_parse_object *op,
73 union acpi_operand_object *obj_desc);
91 74
75acpi_status acpi_ds_initialize_region(acpi_handle obj_handle);
92 76
93/* 77/*
94 * dsctrl - Parser/Interpreter interface, control stack routines 78 * dsctrl - Parser/Interpreter interface, control stack routines
95 */ 79 */
96acpi_status 80acpi_status
97acpi_ds_exec_begin_control_op ( 81acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
98 struct acpi_walk_state *walk_state, 82 union acpi_parse_object *op);
99 union acpi_parse_object *op);
100 83
101acpi_status 84acpi_status
102acpi_ds_exec_end_control_op ( 85acpi_ds_exec_end_control_op(struct acpi_walk_state *walk_state,
103 struct acpi_walk_state *walk_state, 86 union acpi_parse_object *op);
104 union acpi_parse_object *op);
105
106 87
107/* 88/*
108 * dsexec - Parser/Interpreter interface, method execution callbacks 89 * dsexec - Parser/Interpreter interface, method execution callbacks
109 */ 90 */
110acpi_status 91acpi_status
111acpi_ds_get_predicate_value ( 92acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
112 struct acpi_walk_state *walk_state, 93 union acpi_operand_object *result_obj);
113 union acpi_operand_object *result_obj);
114
115acpi_status
116acpi_ds_exec_begin_op (
117 struct acpi_walk_state *walk_state,
118 union acpi_parse_object **out_op);
119 94
120acpi_status 95acpi_status
121acpi_ds_exec_end_op ( 96acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
122 struct acpi_walk_state *state); 97 union acpi_parse_object **out_op);
123 98
99acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *state);
124 100
125/* 101/*
126 * dsfield - Parser/Interpreter interface for AML fields 102 * dsfield - Parser/Interpreter interface for AML fields
127 */ 103 */
128acpi_status 104acpi_status
129acpi_ds_create_field ( 105acpi_ds_create_field(union acpi_parse_object *op,
130 union acpi_parse_object *op, 106 struct acpi_namespace_node *region_node,
131 struct acpi_namespace_node *region_node, 107 struct acpi_walk_state *walk_state);
132 struct acpi_walk_state *walk_state);
133 108
134acpi_status 109acpi_status
135acpi_ds_create_bank_field ( 110acpi_ds_create_bank_field(union acpi_parse_object *op,
136 union acpi_parse_object *op, 111 struct acpi_namespace_node *region_node,
137 struct acpi_namespace_node *region_node, 112 struct acpi_walk_state *walk_state);
138 struct acpi_walk_state *walk_state);
139 113
140acpi_status 114acpi_status
141acpi_ds_create_index_field ( 115acpi_ds_create_index_field(union acpi_parse_object *op,
142 union acpi_parse_object *op, 116 struct acpi_namespace_node *region_node,
143 struct acpi_namespace_node *region_node, 117 struct acpi_walk_state *walk_state);
144 struct acpi_walk_state *walk_state);
145 118
146acpi_status 119acpi_status
147acpi_ds_create_buffer_field ( 120acpi_ds_create_buffer_field(union acpi_parse_object *op,
148 union acpi_parse_object *op, 121 struct acpi_walk_state *walk_state);
149 struct acpi_walk_state *walk_state);
150 122
151acpi_status 123acpi_status
152acpi_ds_init_field_objects ( 124acpi_ds_init_field_objects(union acpi_parse_object *op,
153 union acpi_parse_object *op, 125 struct acpi_walk_state *walk_state);
154 struct acpi_walk_state *walk_state);
155
156 126
157/* 127/*
158 * dsload - Parser/Interpreter interface, namespace load callbacks 128 * dsload - Parser/Interpreter interface, namespace load callbacks
159 */ 129 */
160acpi_status 130acpi_status
161acpi_ds_load1_begin_op ( 131acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
162 struct acpi_walk_state *walk_state, 132 union acpi_parse_object **out_op);
163 union acpi_parse_object **out_op);
164 133
165acpi_status 134acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state);
166acpi_ds_load1_end_op (
167 struct acpi_walk_state *walk_state);
168 135
169acpi_status 136acpi_status
170acpi_ds_load2_begin_op ( 137acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
171 struct acpi_walk_state *walk_state, 138 union acpi_parse_object **out_op);
172 union acpi_parse_object **out_op);
173 139
174acpi_status 140acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state);
175acpi_ds_load2_end_op (
176 struct acpi_walk_state *walk_state);
177 141
178acpi_status 142acpi_status
179acpi_ds_init_callbacks ( 143acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);
180 struct acpi_walk_state *walk_state,
181 u32 pass_number);
182
183 144
184/* 145/*
185 * dsmthdat - method data (locals/args) 146 * dsmthdat - method data (locals/args)
186 */ 147 */
187acpi_status 148acpi_status
188acpi_ds_store_object_to_local ( 149acpi_ds_store_object_to_local(u16 opcode,
189 u16 opcode, 150 u32 index,
190 u32 index, 151 union acpi_operand_object *src_desc,
191 union acpi_operand_object *src_desc, 152 struct acpi_walk_state *walk_state);
192 struct acpi_walk_state *walk_state);
193 153
194acpi_status 154acpi_status
195acpi_ds_method_data_get_entry ( 155acpi_ds_method_data_get_entry(u16 opcode,
196 u16 opcode, 156 u32 index,
197 u32 index, 157 struct acpi_walk_state *walk_state,
198 struct acpi_walk_state *walk_state, 158 union acpi_operand_object ***node);
199 union acpi_operand_object ***node);
200 159
201void 160void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state);
202acpi_ds_method_data_delete_all (
203 struct acpi_walk_state *walk_state);
204 161
205u8 162u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc);
206acpi_ds_is_method_value (
207 union acpi_operand_object *obj_desc);
208 163
209acpi_status 164acpi_status
210acpi_ds_method_data_get_value ( 165acpi_ds_method_data_get_value(u16 opcode,
211 u16 opcode, 166 u32 index,
212 u32 index, 167 struct acpi_walk_state *walk_state,
213 struct acpi_walk_state *walk_state, 168 union acpi_operand_object **dest_desc);
214 union acpi_operand_object **dest_desc);
215 169
216acpi_status 170acpi_status
217acpi_ds_method_data_init_args ( 171acpi_ds_method_data_init_args(union acpi_operand_object **params,
218 union acpi_operand_object **params, 172 u32 max_param_count,
219 u32 max_param_count, 173 struct acpi_walk_state *walk_state);
220 struct acpi_walk_state *walk_state);
221 174
222acpi_status 175acpi_status
223acpi_ds_method_data_get_node ( 176acpi_ds_method_data_get_node(u16 opcode,
224 u16 opcode, 177 u32 index,
225 u32 index, 178 struct acpi_walk_state *walk_state,
226 struct acpi_walk_state *walk_state, 179 struct acpi_namespace_node **node);
227 struct acpi_namespace_node **node);
228
229void
230acpi_ds_method_data_init (
231 struct acpi_walk_state *walk_state);
232 180
181void acpi_ds_method_data_init(struct acpi_walk_state *walk_state);
233 182
234/* 183/*
235 * dsmethod - Parser/Interpreter interface - control method parsing 184 * dsmethod - Parser/Interpreter interface - control method parsing
236 */ 185 */
237acpi_status 186acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node);
238acpi_ds_parse_method (
239 acpi_handle obj_handle);
240 187
241acpi_status 188acpi_status
242acpi_ds_call_control_method ( 189acpi_ds_call_control_method(struct acpi_thread_state *thread,
243 struct acpi_thread_state *thread, 190 struct acpi_walk_state *walk_state,
244 struct acpi_walk_state *walk_state, 191 union acpi_parse_object *op);
245 union acpi_parse_object *op);
246 192
247acpi_status 193acpi_status
248acpi_ds_restart_control_method ( 194acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
249 struct acpi_walk_state *walk_state, 195 union acpi_operand_object *return_desc);
250 union acpi_operand_object *return_desc);
251 196
252acpi_status 197void acpi_ds_terminate_control_method(struct acpi_walk_state *walk_state);
253acpi_ds_terminate_control_method (
254 struct acpi_walk_state *walk_state);
255 198
256acpi_status 199acpi_status
257acpi_ds_begin_method_execution ( 200acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
258 struct acpi_namespace_node *method_node, 201 union acpi_operand_object *obj_desc,
259 union acpi_operand_object *obj_desc, 202 struct acpi_namespace_node *calling_method_node);
260 struct acpi_namespace_node *calling_method_node);
261
262 203
263/* 204/*
264 * dsinit 205 * dsinit
265 */ 206 */
266acpi_status 207acpi_status
267acpi_ds_initialize_objects ( 208acpi_ds_initialize_objects(struct acpi_table_desc *table_desc,
268 struct acpi_table_desc *table_desc, 209 struct acpi_namespace_node *start_node);
269 struct acpi_namespace_node *start_node);
270
271 210
272/* 211/*
273 * dsobject - Parser/Interpreter interface - object initialization and conversion 212 * dsobject - Parser/Interpreter interface - object initialization and conversion
274 */ 213 */
275acpi_status 214acpi_status
276acpi_ds_build_internal_buffer_obj ( 215acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
277 struct acpi_walk_state *walk_state, 216 union acpi_parse_object *op,
278 union acpi_parse_object *op, 217 u32 buffer_length,
279 u32 buffer_length, 218 union acpi_operand_object **obj_desc_ptr);
280 union acpi_operand_object **obj_desc_ptr);
281 219
282acpi_status 220acpi_status
283acpi_ds_build_internal_package_obj ( 221acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
284 struct acpi_walk_state *walk_state, 222 union acpi_parse_object *op,
285 union acpi_parse_object *op, 223 u32 package_length,
286 u32 package_length, 224 union acpi_operand_object **obj_desc);
287 union acpi_operand_object **obj_desc);
288 225
289acpi_status 226acpi_status
290acpi_ds_init_object_from_op ( 227acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
291 struct acpi_walk_state *walk_state, 228 union acpi_parse_object *op,
292 union acpi_parse_object *op, 229 u16 opcode, union acpi_operand_object **obj_desc);
293 u16 opcode,
294 union acpi_operand_object **obj_desc);
295 230
296acpi_status 231acpi_status
297acpi_ds_create_node ( 232acpi_ds_create_node(struct acpi_walk_state *walk_state,
298 struct acpi_walk_state *walk_state, 233 struct acpi_namespace_node *node,
299 struct acpi_namespace_node *node, 234 union acpi_parse_object *op);
300 union acpi_parse_object *op);
301
302 235
303/* 236/*
304 * dsutils - Parser/Interpreter interface utility routines 237 * dsutils - Parser/Interpreter interface utility routines
305 */ 238 */
306void 239void acpi_ds_clear_implicit_return(struct acpi_walk_state *walk_state);
307acpi_ds_clear_implicit_return (
308 struct acpi_walk_state *walk_state);
309 240
310u8 241u8
311acpi_ds_do_implicit_return ( 242acpi_ds_do_implicit_return(union acpi_operand_object *return_desc,
312 union acpi_operand_object *return_desc, 243 struct acpi_walk_state *walk_state,
313 struct acpi_walk_state *walk_state, 244 u8 add_reference);
314 u8 add_reference);
315 245
316u8 246u8
317acpi_ds_is_result_used ( 247acpi_ds_is_result_used(union acpi_parse_object *op,
318 union acpi_parse_object *op, 248 struct acpi_walk_state *walk_state);
319 struct acpi_walk_state *walk_state);
320 249
321void 250void
322acpi_ds_delete_result_if_not_used ( 251acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
323 union acpi_parse_object *op, 252 union acpi_operand_object *result_obj,
324 union acpi_operand_object *result_obj, 253 struct acpi_walk_state *walk_state);
325 struct acpi_walk_state *walk_state);
326 254
327acpi_status 255acpi_status
328acpi_ds_create_operand ( 256acpi_ds_create_operand(struct acpi_walk_state *walk_state,
329 struct acpi_walk_state *walk_state, 257 union acpi_parse_object *arg, u32 args_remaining);
330 union acpi_parse_object *arg,
331 u32 args_remaining);
332 258
333acpi_status 259acpi_status
334acpi_ds_create_operands ( 260acpi_ds_create_operands(struct acpi_walk_state *walk_state,
335 struct acpi_walk_state *walk_state, 261 union acpi_parse_object *first_arg);
336 union acpi_parse_object *first_arg);
337 262
338acpi_status 263acpi_status acpi_ds_resolve_operands(struct acpi_walk_state *walk_state);
339acpi_ds_resolve_operands (
340 struct acpi_walk_state *walk_state);
341
342void
343acpi_ds_clear_operands (
344 struct acpi_walk_state *walk_state);
345 264
265void acpi_ds_clear_operands(struct acpi_walk_state *walk_state);
346 266
347/* 267/*
348 * dswscope - Scope Stack manipulation 268 * dswscope - Scope Stack manipulation
349 */ 269 */
350acpi_status 270acpi_status
351acpi_ds_scope_stack_push ( 271acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
352 struct acpi_namespace_node *node, 272 acpi_object_type type,
353 acpi_object_type type, 273 struct acpi_walk_state *walk_state);
354 struct acpi_walk_state *walk_state);
355 274
275acpi_status acpi_ds_scope_stack_pop(struct acpi_walk_state *walk_state);
356 276
357acpi_status 277void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state);
358acpi_ds_scope_stack_pop (
359 struct acpi_walk_state *walk_state);
360
361void
362acpi_ds_scope_stack_clear (
363 struct acpi_walk_state *walk_state);
364
365 278
366/* 279/*
367 * dswstate - parser WALK_STATE management routines 280 * dswstate - parser WALK_STATE management routines
368 */ 281 */
369acpi_status 282acpi_status
370acpi_ds_obj_stack_push ( 283acpi_ds_obj_stack_push(void *object, struct acpi_walk_state *walk_state);
371 void *object,
372 struct acpi_walk_state *walk_state);
373 284
374acpi_status 285acpi_status
375acpi_ds_obj_stack_pop ( 286acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state *walk_state);
376 u32 pop_count,
377 struct acpi_walk_state *walk_state);
378 287
379struct acpi_walk_state * 288struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
380acpi_ds_create_walk_state ( 289 union acpi_parse_object
381 acpi_owner_id owner_id, 290 *origin,
382 union acpi_parse_object *origin, 291 union acpi_operand_object
383 union acpi_operand_object *mth_desc, 292 *mth_desc,
384 struct acpi_thread_state *thread); 293 struct acpi_thread_state
294 *thread);
385 295
386acpi_status 296acpi_status
387acpi_ds_init_aml_walk ( 297acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
388 struct acpi_walk_state *walk_state, 298 union acpi_parse_object *op,
389 union acpi_parse_object *op, 299 struct acpi_namespace_node *method_node,
390 struct acpi_namespace_node *method_node, 300 u8 * aml_start,
391 u8 *aml_start, 301 u32 aml_length,
392 u32 aml_length, 302 struct acpi_parameter_info *info, u8 pass_number);
393 struct acpi_parameter_info *info,
394 u32 pass_number);
395 303
396acpi_status 304acpi_status
397acpi_ds_obj_stack_pop_and_delete ( 305acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
398 u32 pop_count, 306 struct acpi_walk_state *walk_state);
399 struct acpi_walk_state *walk_state);
400 307
401void 308void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state);
402acpi_ds_delete_walk_state (
403 struct acpi_walk_state *walk_state);
404 309
405struct acpi_walk_state * 310struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state
406acpi_ds_pop_walk_state ( 311 *thread);
407 struct acpi_thread_state *thread);
408 312
409void 313void
410acpi_ds_push_walk_state ( 314acpi_ds_push_walk_state(struct acpi_walk_state *walk_state,
411 struct acpi_walk_state *walk_state, 315 struct acpi_thread_state *thread);
412 struct acpi_thread_state *thread);
413 316
414acpi_status 317acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state);
415acpi_ds_result_stack_pop (
416 struct acpi_walk_state *walk_state);
417 318
418acpi_status 319acpi_status acpi_ds_result_stack_push(struct acpi_walk_state *walk_state);
419acpi_ds_result_stack_push (
420 struct acpi_walk_state *walk_state);
421 320
422acpi_status 321acpi_status acpi_ds_result_stack_clear(struct acpi_walk_state *walk_state);
423acpi_ds_result_stack_clear (
424 struct acpi_walk_state *walk_state);
425 322
426struct acpi_walk_state * 323struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state
427acpi_ds_get_current_walk_state ( 324 *thread);
428 struct acpi_thread_state *thread);
429 325
430#ifdef ACPI_FUTURE_USAGE 326#ifdef ACPI_FUTURE_USAGE
431acpi_status 327acpi_status
432acpi_ds_result_remove ( 328acpi_ds_result_remove(union acpi_operand_object **object,
433 union acpi_operand_object **object, 329 u32 index, struct acpi_walk_state *walk_state);
434 u32 index,
435 struct acpi_walk_state *walk_state);
436#endif 330#endif
437 331
438acpi_status 332acpi_status
439acpi_ds_result_pop ( 333acpi_ds_result_pop(union acpi_operand_object **object,
440 union acpi_operand_object **object, 334 struct acpi_walk_state *walk_state);
441 struct acpi_walk_state *walk_state);
442 335
443acpi_status 336acpi_status
444acpi_ds_result_push ( 337acpi_ds_result_push(union acpi_operand_object *object,
445 union acpi_operand_object *object, 338 struct acpi_walk_state *walk_state);
446 struct acpi_walk_state *walk_state);
447 339
448acpi_status 340acpi_status
449acpi_ds_result_pop_from_bottom ( 341acpi_ds_result_pop_from_bottom(union acpi_operand_object **object,
450 union acpi_operand_object **object, 342 struct acpi_walk_state *walk_state);
451 struct acpi_walk_state *walk_state);
452
453#ifdef ACPI_ENABLE_OBJECT_CACHE
454void
455acpi_ds_delete_walk_state_cache (
456 void);
457#endif
458 343
459#endif /* _ACDISPAT_H_ */ 344#endif /* _ACDISPAT_H_ */