ACPICA 20050526 from Bob Moore <robert.moore@intel.com>
[deliverable/linux.git] / include / acpi / acdebug.h
CommitLineData
1da177e4
LT
1/******************************************************************************
2 *
3 * Name: acdebug.h - ACPI/AML debugger
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
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 __ACDEBUG_H__
45#define __ACDEBUG_H__
46
47
48#define ACPI_DEBUG_BUFFER_SIZE 4196
49
50struct command_info
51{
52 char *name; /* Command Name */
53 u8 min_args; /* Minimum arguments required */
54};
55
56
57struct argument_info
58{
59 char *name; /* Argument Name */
60};
61
62
63#define PARAM_LIST(pl) pl
1da177e4 64#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
1da177e4
LT
65#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
66 acpi_os_printf PARAM_LIST(fp);}
67
68#define EX_NO_SINGLE_STEP 1
69#define EX_SINGLE_STEP 2
70
71
1da177e4
LT
72/*
73 * dbxface - external debugger interfaces
74 */
1da177e4
LT
75acpi_status
76acpi_db_initialize (
77 void);
78
79void
80acpi_db_terminate (
81 void);
82
83acpi_status
84acpi_db_single_step (
85 struct acpi_walk_state *walk_state,
86 union acpi_parse_object *op,
87 u32 op_type);
88
1da177e4
LT
89
90/*
91 * dbcmds - debug commands and output routines
92 */
1da177e4
LT
93acpi_status
94acpi_db_disassemble_method (
95 char *name);
96
97void
98acpi_db_display_table_info (
99 char *table_arg);
100
101void
102acpi_db_unload_acpi_table (
103 char *table_arg,
104 char *instance_arg);
105
106void
107acpi_db_set_method_breakpoint (
108 char *location,
109 struct acpi_walk_state *walk_state,
110 union acpi_parse_object *op);
111
112void
113acpi_db_set_method_call_breakpoint (
114 union acpi_parse_object *op);
115
116void
117acpi_db_disassemble_aml (
118 char *statements,
119 union acpi_parse_object *op);
120
121void
122acpi_db_dump_namespace (
123 char *start_arg,
124 char *depth_arg);
125
126void
127acpi_db_dump_namespace_by_owner (
128 char *owner_arg,
129 char *depth_arg);
130
131void
132acpi_db_send_notify (
133 char *name,
134 u32 value);
135
136void
137acpi_db_set_method_data (
138 char *type_arg,
139 char *index_arg,
140 char *value_arg);
141
142acpi_status
143acpi_db_display_objects (
144 char *obj_type_arg,
145 char *display_count_arg);
146
147acpi_status
148acpi_db_find_name_in_namespace (
149 char *name_arg);
150
151void
152acpi_db_set_scope (
153 char *name);
154
155acpi_status
156acpi_db_sleep (
157 char *object_arg);
158
159void
160acpi_db_find_references (
161 char *object_arg);
162
163void
44f6c012
RM
164acpi_db_display_locks (
165 void);
1da177e4
LT
166
167void
168acpi_db_display_resources (
169 char *object_arg);
170
171void
44f6c012
RM
172acpi_db_display_gpes (
173 void);
1da177e4
LT
174
175void
176acpi_db_check_integrity (
177 void);
178
1da177e4
LT
179void
180acpi_db_generate_gpe (
181 char *gpe_arg,
182 char *block_arg);
183
44f6c012 184
1da177e4
LT
185/*
186 * dbdisply - debug display commands
187 */
1da177e4
LT
188void
189acpi_db_display_method_info (
190 union acpi_parse_object *op);
191
192void
193acpi_db_decode_and_display_object (
194 char *target,
195 char *output_type);
196
197void
198acpi_db_display_result_object (
199 union acpi_operand_object *obj_desc,
200 struct acpi_walk_state *walk_state);
201
202acpi_status
203acpi_db_display_all_methods (
204 char *display_count_arg);
205
206void
207acpi_db_display_arguments (
208 void);
209
210void
211acpi_db_display_locals (
212 void);
213
214void
215acpi_db_display_results (
216 void);
217
218void
219acpi_db_display_calling_tree (
220 void);
221
222void
223acpi_db_display_object_type (
224 char *object_arg);
225
226void
227acpi_db_display_argument_object (
228 union acpi_operand_object *obj_desc,
229 struct acpi_walk_state *walk_state);
230
1da177e4
LT
231
232/*
233 * dbexec - debugger control method execution
234 */
1da177e4
LT
235void
236acpi_db_execute (
237 char *name,
238 char **args,
239 u32 flags);
240
241void
242acpi_db_create_execution_threads (
243 char *num_threads_arg,
244 char *num_loops_arg,
245 char *method_name_arg);
246
1da177e4
LT
247
248/*
249 * dbfileio - Debugger file I/O commands
250 */
1da177e4
LT
251acpi_object_type
252acpi_db_match_argument (
253 char *user_argument,
254 struct argument_info *arguments);
255
1da177e4
LT
256void
257acpi_db_close_debug_file (
258 void);
259
260void
261acpi_db_open_debug_file (
262 char *name);
263
264acpi_status
265acpi_db_load_acpi_table (
266 char *filename);
267
268acpi_status
269acpi_db_get_table_from_file (
270 char *filename,
271 struct acpi_table_header **table);
272
273acpi_status
274acpi_db_read_table_from_file (
275 char *filename,
276 struct acpi_table_header **table);
277
44f6c012 278
1da177e4
LT
279/*
280 * dbhistry - debugger HISTORY command
281 */
1da177e4
LT
282void
283acpi_db_add_to_history (
284 char *command_line);
285
286void
44f6c012
RM
287acpi_db_display_history (
288 void);
1da177e4
LT
289
290char *
291acpi_db_get_from_history (
292 char *command_num_arg);
293
294
295/*
296 * dbinput - user front-end to the AML debugger
297 */
1da177e4
LT
298acpi_status
299acpi_db_command_dispatch (
300 char *input_buffer,
301 struct acpi_walk_state *walk_state,
302 union acpi_parse_object *op);
303
304void ACPI_SYSTEM_XFACE
305acpi_db_execute_thread (
306 void *context);
307
1da177e4
LT
308
309/*
310 * dbstats - Generation and display of ACPI table statistics
311 */
1da177e4
LT
312void
313acpi_db_generate_statistics (
314 union acpi_parse_object *root,
315 u8 is_method);
316
1da177e4
LT
317acpi_status
318acpi_db_display_statistics (
319 char *type_arg);
320
1da177e4
LT
321
322/*
323 * dbutils - AML debugger utilities
324 */
1da177e4
LT
325void
326acpi_db_set_output_destination (
327 u32 where);
328
1da177e4
LT
329void
330acpi_db_dump_object (
331 union acpi_object *obj_desc,
332 u32 level);
333
334void
335acpi_db_prep_namestring (
336 char *name);
337
1da177e4
LT
338struct acpi_namespace_node *
339acpi_db_local_ns_lookup (
340 char *name);
341
1da177e4 342#endif /* __ACDEBUG_H__ */
This page took 0.050725 seconds and 5 git commands to generate.