[TG3]: Add tagged status support.
[linux-2.6/verdex.git] / include / acpi / acdebug.h
blob223b2a506e49140500a0e8bcacc15b9d409f33f3
1 /******************************************************************************
3 * Name: acdebug.h - ACPI/AML debugger
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.
44 #ifndef __ACDEBUG_H__
45 #define __ACDEBUG_H__
48 #define ACPI_DEBUG_BUFFER_SIZE 4196
50 struct command_info
52 char *name; /* Command Name */
53 u8 min_args; /* Minimum arguments required */
57 struct argument_info
59 char *name; /* Argument Name */
63 #define PARAM_LIST(pl) pl
65 #define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
67 #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
68 acpi_os_printf PARAM_LIST(fp);}
70 #define EX_NO_SINGLE_STEP 1
71 #define EX_SINGLE_STEP 2
74 /* Prototypes */
78 * dbxface - external debugger interfaces
81 acpi_status
82 acpi_db_initialize (
83 void);
85 void
86 acpi_db_terminate (
87 void);
89 acpi_status
90 acpi_db_single_step (
91 struct acpi_walk_state *walk_state,
92 union acpi_parse_object *op,
93 u32 op_type);
95 acpi_status
96 acpi_db_start_command (
97 struct acpi_walk_state *walk_state,
98 union acpi_parse_object *op);
100 void
101 acpi_db_method_end (
102 struct acpi_walk_state *walk_state);
106 * dbcmds - debug commands and output routines
109 acpi_status
110 acpi_db_disassemble_method (
111 char *name);
113 void
114 acpi_db_display_table_info (
115 char *table_arg);
117 void
118 acpi_db_unload_acpi_table (
119 char *table_arg,
120 char *instance_arg);
122 void
123 acpi_db_set_method_breakpoint (
124 char *location,
125 struct acpi_walk_state *walk_state,
126 union acpi_parse_object *op);
128 void
129 acpi_db_set_method_call_breakpoint (
130 union acpi_parse_object *op);
132 void
133 acpi_db_disassemble_aml (
134 char *statements,
135 union acpi_parse_object *op);
137 void
138 acpi_db_dump_namespace (
139 char *start_arg,
140 char *depth_arg);
142 void
143 acpi_db_dump_namespace_by_owner (
144 char *owner_arg,
145 char *depth_arg);
147 void
148 acpi_db_send_notify (
149 char *name,
150 u32 value);
152 void
153 acpi_db_set_method_data (
154 char *type_arg,
155 char *index_arg,
156 char *value_arg);
158 acpi_status
159 acpi_db_display_objects (
160 char *obj_type_arg,
161 char *display_count_arg);
163 acpi_status
164 acpi_db_find_name_in_namespace (
165 char *name_arg);
167 void
168 acpi_db_set_scope (
169 char *name);
171 acpi_status
172 acpi_db_sleep (
173 char *object_arg);
175 void
176 acpi_db_find_references (
177 char *object_arg);
179 void
180 acpi_db_display_locks (void);
183 void
184 acpi_db_display_resources (
185 char *object_arg);
187 void
188 acpi_db_display_gpes (void);
190 void
191 acpi_db_check_integrity (
192 void);
194 acpi_status
195 acpi_db_integrity_walk (
196 acpi_handle obj_handle,
197 u32 nesting_level,
198 void *context,
199 void **return_value);
201 acpi_status
202 acpi_db_walk_and_match_name (
203 acpi_handle obj_handle,
204 u32 nesting_level,
205 void *context,
206 void **return_value);
208 acpi_status
209 acpi_db_walk_for_references (
210 acpi_handle obj_handle,
211 u32 nesting_level,
212 void *context,
213 void **return_value);
215 acpi_status
216 acpi_db_walk_for_specific_objects (
217 acpi_handle obj_handle,
218 u32 nesting_level,
219 void *context,
220 void **return_value);
222 void
223 acpi_db_generate_gpe (
224 char *gpe_arg,
225 char *block_arg);
228 * dbdisply - debug display commands
231 void
232 acpi_db_display_method_info (
233 union acpi_parse_object *op);
235 void
236 acpi_db_decode_and_display_object (
237 char *target,
238 char *output_type);
240 void
241 acpi_db_display_result_object (
242 union acpi_operand_object *obj_desc,
243 struct acpi_walk_state *walk_state);
245 acpi_status
246 acpi_db_display_all_methods (
247 char *display_count_arg);
249 void
250 acpi_db_display_arguments (
251 void);
253 void
254 acpi_db_display_locals (
255 void);
257 void
258 acpi_db_display_results (
259 void);
261 void
262 acpi_db_display_calling_tree (
263 void);
265 void
266 acpi_db_display_object_type (
267 char *object_arg);
269 void
270 acpi_db_display_argument_object (
271 union acpi_operand_object *obj_desc,
272 struct acpi_walk_state *walk_state);
274 void
275 acpi_db_dump_parser_descriptor (
276 union acpi_parse_object *op);
278 void *
279 acpi_db_get_pointer (
280 void *target);
284 * dbexec - debugger control method execution
287 void
288 acpi_db_execute (
289 char *name,
290 char **args,
291 u32 flags);
293 void
294 acpi_db_create_execution_threads (
295 char *num_threads_arg,
296 char *num_loops_arg,
297 char *method_name_arg);
299 acpi_status
300 acpi_db_execute_method (
301 struct acpi_db_method_info *info,
302 struct acpi_buffer *return_obj);
304 void
305 acpi_db_execute_setup (
306 struct acpi_db_method_info *info);
309 acpi_db_get_outstanding_allocations (
310 void);
312 void ACPI_SYSTEM_XFACE
313 acpi_db_method_thread (
314 void *context);
316 acpi_status
317 acpi_db_execution_walk (
318 acpi_handle obj_handle,
319 u32 nesting_level,
320 void *context,
321 void **return_value);
325 * dbfileio - Debugger file I/O commands
328 acpi_object_type
329 acpi_db_match_argument (
330 char *user_argument,
331 struct argument_info *arguments);
333 acpi_status
334 ae_local_load_table (
335 struct acpi_table_header *table_ptr);
337 void
338 acpi_db_close_debug_file (
339 void);
341 void
342 acpi_db_open_debug_file (
343 char *name);
345 acpi_status
346 acpi_db_load_acpi_table (
347 char *filename);
349 acpi_status
350 acpi_db_get_table_from_file (
351 char *filename,
352 struct acpi_table_header **table);
354 acpi_status
355 acpi_db_read_table_from_file (
356 char *filename,
357 struct acpi_table_header **table);
360 * dbhistry - debugger HISTORY command
363 void
364 acpi_db_add_to_history (
365 char *command_line);
367 void
368 acpi_db_display_history (void);
370 char *
371 acpi_db_get_from_history (
372 char *command_num_arg);
376 * dbinput - user front-end to the AML debugger
379 acpi_status
380 acpi_db_command_dispatch (
381 char *input_buffer,
382 struct acpi_walk_state *walk_state,
383 union acpi_parse_object *op);
385 void ACPI_SYSTEM_XFACE
386 acpi_db_execute_thread (
387 void *context);
389 void
390 acpi_db_display_help (
391 char *help_type);
393 char *
394 acpi_db_get_next_token (
395 char *string,
396 char **next);
399 acpi_db_get_line (
400 char *input_buffer);
403 acpi_db_match_command (
404 char *user_command);
406 void
407 acpi_db_single_thread (
408 void);
412 * dbstats - Generation and display of ACPI table statistics
415 void
416 acpi_db_generate_statistics (
417 union acpi_parse_object *root,
418 u8 is_method);
421 acpi_status
422 acpi_db_display_statistics (
423 char *type_arg);
425 acpi_status
426 acpi_db_classify_one_object (
427 acpi_handle obj_handle,
428 u32 nesting_level,
429 void *context,
430 void **return_value);
432 void
433 acpi_db_count_namespace_objects (
434 void);
436 void
437 acpi_db_enumerate_object (
438 union acpi_operand_object *obj_desc);
442 * dbutils - AML debugger utilities
445 void
446 acpi_db_set_output_destination (
447 u32 where);
449 void
450 acpi_db_dump_buffer (
451 u32 address);
453 void
454 acpi_db_dump_object (
455 union acpi_object *obj_desc,
456 u32 level);
458 void
459 acpi_db_prep_namestring (
460 char *name);
463 acpi_status
464 acpi_db_second_pass_parse (
465 union acpi_parse_object *root);
467 struct acpi_namespace_node *
468 acpi_db_local_ns_lookup (
469 char *name);
472 #endif /* __ACDEBUG_H__ */