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