perf python: Do not force closing original perf descriptor in evlist.get_pollfd()
[linux/fpc-iii.git] / drivers / acpi / acpica / acdebug.h
blob57d9495e5933a1c410c696249c936466b64e0325
1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /******************************************************************************
4 * Name: acdebug.h - ACPI/AML debugger
6 * Copyright (C) 2000 - 2018, Intel Corp.
8 *****************************************************************************/
10 #ifndef __ACDEBUG_H__
11 #define __ACDEBUG_H__
13 /* The debugger is used in conjunction with the disassembler most of time */
15 #ifdef ACPI_DISASSEMBLER
16 #include "acdisasm.h"
17 #endif
19 #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */
21 struct acpi_db_command_info {
22 const char *name; /* Command Name */
23 u8 min_args; /* Minimum arguments required */
26 struct acpi_db_command_help {
27 u8 line_count; /* Number of help lines */
28 char *invocation; /* Command Invocation */
29 char *description; /* Command Description */
32 struct acpi_db_argument_info {
33 const char *name; /* Argument Name */
36 struct acpi_db_execute_walk {
37 u32 count;
38 u32 max_count;
41 #define PARAM_LIST(pl) pl
43 #define EX_NO_SINGLE_STEP 1
44 #define EX_SINGLE_STEP 2
47 * dbxface - external debugger interfaces
49 ACPI_DBR_DEPENDENT_RETURN_OK(acpi_status
50 acpi_db_single_step(struct acpi_walk_state
51 *walk_state,
52 union acpi_parse_object *op,
53 u32 op_type))
54 ACPI_DBR_DEPENDENT_RETURN_VOID(void
55 acpi_db_signal_break_point(struct
56 acpi_walk_state
57 *walk_state))
60 * dbcmds - debug commands and output routines
62 struct acpi_namespace_node *acpi_db_convert_to_node(char *in_string);
64 void acpi_db_display_table_info(char *table_arg);
66 void acpi_db_display_template(char *buffer_arg);
68 void acpi_db_unload_acpi_table(char *name);
70 void acpi_db_send_notify(char *name, u32 value);
72 void acpi_db_display_interfaces(char *action_arg, char *interface_name_arg);
74 acpi_status acpi_db_sleep(char *object_arg);
76 void acpi_db_trace(char *enable_arg, char *method_arg, char *once_arg);
78 void acpi_db_display_locks(void);
80 void acpi_db_display_resources(char *object_arg);
82 ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_display_gpes(void))
84 void acpi_db_display_handlers(void);
86 ACPI_HW_DEPENDENT_RETURN_VOID(void
87 acpi_db_generate_gpe(char *gpe_arg,
88 char *block_arg))
89 ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_generate_sci(void))
91 void acpi_db_execute_test(char *type_arg);
94 * dbconvert - miscellaneous conversion routines
96 acpi_status acpi_db_hex_char_to_value(int hex_char, u8 *return_value);
98 acpi_status acpi_db_convert_to_package(char *string, union acpi_object *object);
100 acpi_status
101 acpi_db_convert_to_object(acpi_object_type type,
102 char *string, union acpi_object *object);
104 u8 *acpi_db_encode_pld_buffer(struct acpi_pld_info *pld_info);
106 void acpi_db_dump_pld_buffer(union acpi_object *obj_desc);
109 * dbmethod - control method commands
111 void
112 acpi_db_set_method_breakpoint(char *location,
113 struct acpi_walk_state *walk_state,
114 union acpi_parse_object *op);
116 void acpi_db_set_method_call_breakpoint(union acpi_parse_object *op);
118 void acpi_db_set_method_data(char *type_arg, char *index_arg, char *value_arg);
120 acpi_status acpi_db_disassemble_method(char *name);
122 void acpi_db_disassemble_aml(char *statements, union acpi_parse_object *op);
124 void acpi_db_evaluate_predefined_names(void);
127 * dbnames - namespace commands
129 void acpi_db_set_scope(char *name);
131 void acpi_db_dump_namespace(char *start_arg, char *depth_arg);
133 void acpi_db_dump_namespace_paths(void);
135 void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg);
137 acpi_status acpi_db_find_name_in_namespace(char *name_arg);
139 void acpi_db_check_predefined_names(void);
141 acpi_status
142 acpi_db_display_objects(char *obj_type_arg, char *display_count_arg);
144 void acpi_db_check_integrity(void);
146 void acpi_db_find_references(char *object_arg);
148 void acpi_db_get_bus_info(void);
151 * dbdisply - debug display commands
153 void acpi_db_display_method_info(union acpi_parse_object *op);
155 void acpi_db_decode_and_display_object(char *target, char *output_type);
157 ACPI_DBR_DEPENDENT_RETURN_VOID(void
158 acpi_db_display_result_object(union
159 acpi_operand_object
160 *obj_desc,
161 struct
162 acpi_walk_state
163 *walk_state))
165 acpi_status acpi_db_display_all_methods(char *display_count_arg);
167 void acpi_db_display_arguments(void);
169 void acpi_db_display_locals(void);
171 void acpi_db_display_results(void);
173 void acpi_db_display_calling_tree(void);
175 void acpi_db_display_object_type(char *object_arg);
177 ACPI_DBR_DEPENDENT_RETURN_VOID(void
178 acpi_db_display_argument_object(union
179 acpi_operand_object
180 *obj_desc,
181 struct
182 acpi_walk_state
183 *walk_state))
186 * dbexec - debugger control method execution
188 void
189 acpi_db_execute(char *name, char **args, acpi_object_type *types, u32 flags);
191 void
192 acpi_db_create_execution_thread(char *method_name_arg,
193 char **arguments, acpi_object_type *types);
195 void
196 acpi_db_create_execution_threads(char *num_threads_arg,
197 char *num_loops_arg, char *method_name_arg);
199 void acpi_db_delete_objects(u32 count, union acpi_object *objects);
201 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
202 u32 acpi_db_get_cache_info(struct acpi_memory_list *cache);
203 #endif
206 * dbfileio - Debugger file I/O commands
208 acpi_object_type
209 acpi_db_match_argument(char *user_argument,
210 struct acpi_db_argument_info *arguments);
212 void acpi_db_close_debug_file(void);
214 void acpi_db_open_debug_file(char *name);
216 acpi_status acpi_db_load_acpi_table(char *filename);
218 acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head);
221 * dbhistry - debugger HISTORY command
223 void acpi_db_add_to_history(char *command_line);
225 void acpi_db_display_history(void);
227 char *acpi_db_get_from_history(char *command_num_arg);
229 char *acpi_db_get_history_by_index(u32 commandd_num);
232 * dbinput - user front-end to the AML debugger
234 acpi_status
235 acpi_db_command_dispatch(char *input_buffer,
236 struct acpi_walk_state *walk_state,
237 union acpi_parse_object *op);
239 void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context);
241 acpi_status acpi_db_user_commands(void);
243 char *acpi_db_get_next_token(char *string,
244 char **next, acpi_object_type *return_type);
247 * dbobject
249 void acpi_db_decode_internal_object(union acpi_operand_object *obj_desc);
251 void
252 acpi_db_display_internal_object(union acpi_operand_object *obj_desc,
253 struct acpi_walk_state *walk_state);
255 void acpi_db_decode_arguments(struct acpi_walk_state *walk_state);
257 void acpi_db_decode_locals(struct acpi_walk_state *walk_state);
259 void
260 acpi_db_dump_method_info(acpi_status status,
261 struct acpi_walk_state *walk_state);
264 * dbstats - Generation and display of ACPI table statistics
266 void acpi_db_generate_statistics(union acpi_parse_object *root, u8 is_method);
268 acpi_status acpi_db_display_statistics(char *type_arg);
271 * dbutils - AML debugger utilities
273 void acpi_db_set_output_destination(u32 where);
275 void acpi_db_dump_external_object(union acpi_object *obj_desc, u32 level);
277 void acpi_db_prep_namestring(char *name);
279 struct acpi_namespace_node *acpi_db_local_ns_lookup(char *name);
281 void acpi_db_uint32_to_hex_string(u32 value, char *buffer);
283 #endif /* __ACDEBUG_H__ */