[SCSI] add missing attribute container function prototype
[wandboard.git] / include / acpi / acdispat.h
blob8f5f2f71b1de9a33d617912e1e5169a3324c9cce
1 /******************************************************************************
3 * Name: acdispat.h - dispatcher (parser to interpreter interface)
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
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 * dsopcode - support for late evaluation
56 acpi_status
57 acpi_ds_get_buffer_field_arguments (
58 union acpi_operand_object *obj_desc);
60 acpi_status
61 acpi_ds_get_region_arguments (
62 union acpi_operand_object *rgn_desc);
64 acpi_status
65 acpi_ds_get_buffer_arguments (
66 union acpi_operand_object *obj_desc);
68 acpi_status
69 acpi_ds_get_package_arguments (
70 union acpi_operand_object *obj_desc);
72 acpi_status
73 acpi_ds_eval_buffer_field_operands (
74 struct acpi_walk_state *walk_state,
75 union acpi_parse_object *op);
77 acpi_status
78 acpi_ds_eval_region_operands (
79 struct acpi_walk_state *walk_state,
80 union acpi_parse_object *op);
82 acpi_status
83 acpi_ds_eval_data_object_operands (
84 struct acpi_walk_state *walk_state,
85 union acpi_parse_object *op,
86 union acpi_operand_object *obj_desc);
88 acpi_status
89 acpi_ds_initialize_region (
90 acpi_handle obj_handle);
94 * dsctrl - Parser/Interpreter interface, control stack routines
96 acpi_status
97 acpi_ds_exec_begin_control_op (
98 struct acpi_walk_state *walk_state,
99 union acpi_parse_object *op);
101 acpi_status
102 acpi_ds_exec_end_control_op (
103 struct acpi_walk_state *walk_state,
104 union acpi_parse_object *op);
108 * dsexec - Parser/Interpreter interface, method execution callbacks
110 acpi_status
111 acpi_ds_get_predicate_value (
112 struct acpi_walk_state *walk_state,
113 union acpi_operand_object *result_obj);
115 acpi_status
116 acpi_ds_exec_begin_op (
117 struct acpi_walk_state *walk_state,
118 union acpi_parse_object **out_op);
120 acpi_status
121 acpi_ds_exec_end_op (
122 struct acpi_walk_state *state);
126 * dsfield - Parser/Interpreter interface for AML fields
128 acpi_status
129 acpi_ds_create_field (
130 union acpi_parse_object *op,
131 struct acpi_namespace_node *region_node,
132 struct acpi_walk_state *walk_state);
134 acpi_status
135 acpi_ds_create_bank_field (
136 union acpi_parse_object *op,
137 struct acpi_namespace_node *region_node,
138 struct acpi_walk_state *walk_state);
140 acpi_status
141 acpi_ds_create_index_field (
142 union acpi_parse_object *op,
143 struct acpi_namespace_node *region_node,
144 struct acpi_walk_state *walk_state);
146 acpi_status
147 acpi_ds_create_buffer_field (
148 union acpi_parse_object *op,
149 struct acpi_walk_state *walk_state);
151 acpi_status
152 acpi_ds_init_field_objects (
153 union acpi_parse_object *op,
154 struct acpi_walk_state *walk_state);
158 * dsload - Parser/Interpreter interface, namespace load callbacks
160 acpi_status
161 acpi_ds_load1_begin_op (
162 struct acpi_walk_state *walk_state,
163 union acpi_parse_object **out_op);
165 acpi_status
166 acpi_ds_load1_end_op (
167 struct acpi_walk_state *walk_state);
169 acpi_status
170 acpi_ds_load2_begin_op (
171 struct acpi_walk_state *walk_state,
172 union acpi_parse_object **out_op);
174 acpi_status
175 acpi_ds_load2_end_op (
176 struct acpi_walk_state *walk_state);
178 acpi_status
179 acpi_ds_init_callbacks (
180 struct acpi_walk_state *walk_state,
181 u32 pass_number);
185 * dsmthdat - method data (locals/args)
187 acpi_status
188 acpi_ds_store_object_to_local (
189 u16 opcode,
190 u32 index,
191 union acpi_operand_object *src_desc,
192 struct acpi_walk_state *walk_state);
194 acpi_status
195 acpi_ds_method_data_get_entry (
196 u16 opcode,
197 u32 index,
198 struct acpi_walk_state *walk_state,
199 union acpi_operand_object ***node);
201 void
202 acpi_ds_method_data_delete_all (
203 struct acpi_walk_state *walk_state);
206 acpi_ds_is_method_value (
207 union acpi_operand_object *obj_desc);
209 acpi_status
210 acpi_ds_method_data_get_value (
211 u16 opcode,
212 u32 index,
213 struct acpi_walk_state *walk_state,
214 union acpi_operand_object **dest_desc);
216 acpi_status
217 acpi_ds_method_data_init_args (
218 union acpi_operand_object **params,
219 u32 max_param_count,
220 struct acpi_walk_state *walk_state);
222 acpi_status
223 acpi_ds_method_data_get_node (
224 u16 opcode,
225 u32 index,
226 struct acpi_walk_state *walk_state,
227 struct acpi_namespace_node **node);
229 void
230 acpi_ds_method_data_init (
231 struct acpi_walk_state *walk_state);
235 * dsmethod - Parser/Interpreter interface - control method parsing
237 acpi_status
238 acpi_ds_parse_method (
239 acpi_handle obj_handle);
241 acpi_status
242 acpi_ds_call_control_method (
243 struct acpi_thread_state *thread,
244 struct acpi_walk_state *walk_state,
245 union acpi_parse_object *op);
247 acpi_status
248 acpi_ds_restart_control_method (
249 struct acpi_walk_state *walk_state,
250 union acpi_operand_object *return_desc);
252 acpi_status
253 acpi_ds_terminate_control_method (
254 struct acpi_walk_state *walk_state);
256 acpi_status
257 acpi_ds_begin_method_execution (
258 struct acpi_namespace_node *method_node,
259 union acpi_operand_object *obj_desc,
260 struct acpi_namespace_node *calling_method_node);
264 * dsinit
266 acpi_status
267 acpi_ds_initialize_objects (
268 struct acpi_table_desc *table_desc,
269 struct acpi_namespace_node *start_node);
273 * dsobject - Parser/Interpreter interface - object initialization and conversion
275 acpi_status
276 acpi_ds_build_internal_buffer_obj (
277 struct acpi_walk_state *walk_state,
278 union acpi_parse_object *op,
279 u32 buffer_length,
280 union acpi_operand_object **obj_desc_ptr);
282 acpi_status
283 acpi_ds_build_internal_package_obj (
284 struct acpi_walk_state *walk_state,
285 union acpi_parse_object *op,
286 u32 package_length,
287 union acpi_operand_object **obj_desc);
289 acpi_status
290 acpi_ds_init_object_from_op (
291 struct acpi_walk_state *walk_state,
292 union acpi_parse_object *op,
293 u16 opcode,
294 union acpi_operand_object **obj_desc);
296 acpi_status
297 acpi_ds_create_node (
298 struct acpi_walk_state *walk_state,
299 struct acpi_namespace_node *node,
300 union acpi_parse_object *op);
304 * dsutils - Parser/Interpreter interface utility routines
306 void
307 acpi_ds_clear_implicit_return (
308 struct acpi_walk_state *walk_state);
311 acpi_ds_do_implicit_return (
312 union acpi_operand_object *return_desc,
313 struct acpi_walk_state *walk_state,
314 u8 add_reference);
317 acpi_ds_is_result_used (
318 union acpi_parse_object *op,
319 struct acpi_walk_state *walk_state);
321 void
322 acpi_ds_delete_result_if_not_used (
323 union acpi_parse_object *op,
324 union acpi_operand_object *result_obj,
325 struct acpi_walk_state *walk_state);
327 acpi_status
328 acpi_ds_create_operand (
329 struct acpi_walk_state *walk_state,
330 union acpi_parse_object *arg,
331 u32 args_remaining);
333 acpi_status
334 acpi_ds_create_operands (
335 struct acpi_walk_state *walk_state,
336 union acpi_parse_object *first_arg);
338 acpi_status
339 acpi_ds_resolve_operands (
340 struct acpi_walk_state *walk_state);
342 void
343 acpi_ds_clear_operands (
344 struct acpi_walk_state *walk_state);
348 * dswscope - Scope Stack manipulation
350 acpi_status
351 acpi_ds_scope_stack_push (
352 struct acpi_namespace_node *node,
353 acpi_object_type type,
354 struct acpi_walk_state *walk_state);
357 acpi_status
358 acpi_ds_scope_stack_pop (
359 struct acpi_walk_state *walk_state);
361 void
362 acpi_ds_scope_stack_clear (
363 struct acpi_walk_state *walk_state);
367 * dswstate - parser WALK_STATE management routines
369 acpi_status
370 acpi_ds_obj_stack_push (
371 void *object,
372 struct acpi_walk_state *walk_state);
374 acpi_status
375 acpi_ds_obj_stack_pop (
376 u32 pop_count,
377 struct acpi_walk_state *walk_state);
379 struct acpi_walk_state *
380 acpi_ds_create_walk_state (
381 acpi_owner_id owner_id,
382 union acpi_parse_object *origin,
383 union acpi_operand_object *mth_desc,
384 struct acpi_thread_state *thread);
386 acpi_status
387 acpi_ds_init_aml_walk (
388 struct acpi_walk_state *walk_state,
389 union acpi_parse_object *op,
390 struct acpi_namespace_node *method_node,
391 u8 *aml_start,
392 u32 aml_length,
393 struct acpi_parameter_info *info,
394 u32 pass_number);
396 acpi_status
397 acpi_ds_obj_stack_pop_and_delete (
398 u32 pop_count,
399 struct acpi_walk_state *walk_state);
401 void
402 acpi_ds_delete_walk_state (
403 struct acpi_walk_state *walk_state);
405 struct acpi_walk_state *
406 acpi_ds_pop_walk_state (
407 struct acpi_thread_state *thread);
409 void
410 acpi_ds_push_walk_state (
411 struct acpi_walk_state *walk_state,
412 struct acpi_thread_state *thread);
414 acpi_status
415 acpi_ds_result_stack_pop (
416 struct acpi_walk_state *walk_state);
418 acpi_status
419 acpi_ds_result_stack_push (
420 struct acpi_walk_state *walk_state);
422 acpi_status
423 acpi_ds_result_stack_clear (
424 struct acpi_walk_state *walk_state);
426 struct acpi_walk_state *
427 acpi_ds_get_current_walk_state (
428 struct acpi_thread_state *thread);
430 #ifdef ACPI_FUTURE_USAGE
431 acpi_status
432 acpi_ds_result_remove (
433 union acpi_operand_object **object,
434 u32 index,
435 struct acpi_walk_state *walk_state);
436 #endif
438 acpi_status
439 acpi_ds_result_pop (
440 union acpi_operand_object **object,
441 struct acpi_walk_state *walk_state);
443 acpi_status
444 acpi_ds_result_push (
445 union acpi_operand_object *object,
446 struct acpi_walk_state *walk_state);
448 acpi_status
449 acpi_ds_result_pop_from_bottom (
450 union acpi_operand_object **object,
451 struct acpi_walk_state *walk_state);
453 #ifdef ACPI_ENABLE_OBJECT_CACHE
454 void
455 acpi_ds_delete_walk_state_cache (
456 void);
457 #endif
459 #endif /* _ACDISPAT_H_ */