aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acdisasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/acdisasm.h')
-rw-r--r--include/acpi/acdisasm.h323
1 files changed, 107 insertions, 216 deletions
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h
index 26325430db8..3d96dcb1bb4 100644
--- a/include/acpi/acdisasm.h
+++ b/include/acpi/acdisasm.h
@@ -46,328 +46,219 @@
46 46
47#include "amlresrc.h" 47#include "amlresrc.h"
48 48
49
50#define BLOCK_NONE 0 49#define BLOCK_NONE 0
51#define BLOCK_PAREN 1 50#define BLOCK_PAREN 1
52#define BLOCK_BRACE 2 51#define BLOCK_BRACE 2
53#define BLOCK_COMMA_LIST 4 52#define BLOCK_COMMA_LIST 4
54 53
55struct acpi_external_list 54struct acpi_external_list {
56{ 55 char *path;
57 char *path; 56 struct acpi_external_list *next;
58 struct acpi_external_list *next;
59}; 57};
60 58
61extern struct acpi_external_list *acpi_gbl_external_list; 59extern struct acpi_external_list *acpi_gbl_external_list;
62extern const char *acpi_gbl_io_decode[2]; 60extern const char *acpi_gbl_io_decode[2];
63extern const char *acpi_gbl_word_decode[4]; 61extern const char *acpi_gbl_word_decode[4];
64extern const char *acpi_gbl_consume_decode[2]; 62extern const char *acpi_gbl_consume_decode[2];
65extern const char *acpi_gbl_min_decode[2]; 63extern const char *acpi_gbl_min_decode[2];
66extern const char *acpi_gbl_max_decode[2]; 64extern const char *acpi_gbl_max_decode[2];
67extern const char *acpi_gbl_DECdecode[2]; 65extern const char *acpi_gbl_DECdecode[2];
68extern const char *acpi_gbl_RNGdecode[4]; 66extern const char *acpi_gbl_RNGdecode[4];
69extern const char *acpi_gbl_MEMdecode[4]; 67extern const char *acpi_gbl_MEMdecode[4];
70extern const char *acpi_gbl_RWdecode[2]; 68extern const char *acpi_gbl_RWdecode[2];
71extern const char *acpi_gbl_irq_decode[2]; 69extern const char *acpi_gbl_irq_decode[2];
72extern const char *acpi_gbl_HEdecode[2]; 70extern const char *acpi_gbl_HEdecode[2];
73extern const char *acpi_gbl_LLdecode[2]; 71extern const char *acpi_gbl_LLdecode[2];
74extern const char *acpi_gbl_SHRdecode[2]; 72extern const char *acpi_gbl_SHRdecode[2];
75extern const char *acpi_gbl_TYPdecode[4]; 73extern const char *acpi_gbl_TYPdecode[4];
76extern const char *acpi_gbl_BMdecode[2]; 74extern const char *acpi_gbl_BMdecode[2];
77extern const char *acpi_gbl_SIZdecode[4]; 75extern const char *acpi_gbl_SIZdecode[4];
78extern const char *acpi_gbl_TTPdecode[2]; 76extern const char *acpi_gbl_TTPdecode[2];
79extern const char *acpi_gbl_MTPdecode[4]; 77extern const char *acpi_gbl_MTPdecode[4];
80extern const char *acpi_gbl_TRSdecode[2]; 78extern const char *acpi_gbl_TRSdecode[2];
81 79
82 80extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES];
83extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; 81extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES];
84extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; 82extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES];
85extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; 83extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS];
86extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS]; 84
87 85struct acpi_op_walk_info {
88 86 u32 level;
89struct acpi_op_walk_info 87 u32 bit_offset;
90{ 88 struct acpi_walk_state *walk_state;
91 u32 level;
92 u32 bit_offset;
93 struct acpi_walk_state *walk_state;
94}; 89};
95 90
96typedef 91typedef
97acpi_status (*asl_walk_callback) ( 92acpi_status(*asl_walk_callback) (union acpi_parse_object * op,
98 union acpi_parse_object *op, 93 u32 level, void *context);
99 u32 level,
100 void *context);
101
102 94
103/* 95/*
104 * dmwalk 96 * dmwalk
105 */ 97 */
106void 98void
107acpi_dm_disassemble ( 99acpi_dm_disassemble(struct acpi_walk_state *walk_state,
108 struct acpi_walk_state *walk_state, 100 union acpi_parse_object *origin, u32 num_opcodes);
109 union acpi_parse_object *origin,
110 u32 num_opcodes);
111
112 101
113/* 102/*
114 * dmopcode 103 * dmopcode
115 */ 104 */
116void 105void
117acpi_dm_disassemble_one_op ( 106acpi_dm_disassemble_one_op(struct acpi_walk_state *walk_state,
118 struct acpi_walk_state *walk_state, 107 struct acpi_op_walk_info *info,
119 struct acpi_op_walk_info *info, 108 union acpi_parse_object *op);
120 union acpi_parse_object *op);
121 109
122void 110void acpi_dm_decode_internal_object(union acpi_operand_object *obj_desc);
123acpi_dm_decode_internal_object (
124 union acpi_operand_object *obj_desc);
125 111
126u32 112u32 acpi_dm_list_type(union acpi_parse_object *op);
127acpi_dm_list_type (
128 union acpi_parse_object *op);
129 113
130void 114void acpi_dm_method_flags(union acpi_parse_object *op);
131acpi_dm_method_flags (
132 union acpi_parse_object *op);
133
134void
135acpi_dm_field_flags (
136 union acpi_parse_object *op);
137 115
138void 116void acpi_dm_field_flags(union acpi_parse_object *op);
139acpi_dm_address_space (
140 u8 space_id);
141 117
142void 118void acpi_dm_address_space(u8 space_id);
143acpi_dm_region_flags (
144 union acpi_parse_object *op);
145 119
146void 120void acpi_dm_region_flags(union acpi_parse_object *op);
147acpi_dm_match_op (
148 union acpi_parse_object *op);
149 121
150u8 122void acpi_dm_match_op(union acpi_parse_object *op);
151acpi_dm_comma_if_list_member (
152 union acpi_parse_object *op);
153 123
154void 124u8 acpi_dm_comma_if_list_member(union acpi_parse_object *op);
155acpi_dm_comma_if_field_member (
156 union acpi_parse_object *op);
157 125
126void acpi_dm_comma_if_field_member(union acpi_parse_object *op);
158 127
159/* 128/*
160 * dmnames 129 * dmnames
161 */ 130 */
162u32 131u32 acpi_dm_dump_name(char *name);
163acpi_dm_dump_name (
164 char *name);
165 132
166acpi_status 133acpi_status
167acpi_ps_display_object_pathname ( 134acpi_ps_display_object_pathname(struct acpi_walk_state *walk_state,
168 struct acpi_walk_state *walk_state, 135 union acpi_parse_object *op);
169 union acpi_parse_object *op);
170
171void
172acpi_dm_namestring (
173 char *name);
174 136
137void acpi_dm_namestring(char *name);
175 138
176/* 139/*
177 * dmobject 140 * dmobject
178 */ 141 */
179void 142void
180acpi_dm_display_internal_object ( 143acpi_dm_display_internal_object(union acpi_operand_object *obj_desc,
181 union acpi_operand_object *obj_desc, 144 struct acpi_walk_state *walk_state);
182 struct acpi_walk_state *walk_state);
183 145
184void 146void acpi_dm_display_arguments(struct acpi_walk_state *walk_state);
185acpi_dm_display_arguments (
186 struct acpi_walk_state *walk_state);
187 147
188void 148void acpi_dm_display_locals(struct acpi_walk_state *walk_state);
189acpi_dm_display_locals (
190 struct acpi_walk_state *walk_state);
191 149
192void 150void
193acpi_dm_dump_method_info ( 151acpi_dm_dump_method_info(acpi_status status,
194 acpi_status status, 152 struct acpi_walk_state *walk_state,
195 struct acpi_walk_state *walk_state, 153 union acpi_parse_object *op);
196 union acpi_parse_object *op);
197
198 154
199/* 155/*
200 * dmbuffer 156 * dmbuffer
201 */ 157 */
202void 158void acpi_dm_disasm_byte_list(u32 level, u8 * byte_data, u32 byte_count);
203acpi_dm_disasm_byte_list (
204 u32 level,
205 u8 *byte_data,
206 u32 byte_count);
207 159
208void 160void
209acpi_dm_byte_list ( 161acpi_dm_byte_list(struct acpi_op_walk_info *info, union acpi_parse_object *op);
210 struct acpi_op_walk_info *info,
211 union acpi_parse_object *op);
212 162
213void 163void acpi_dm_is_eisa_id(union acpi_parse_object *op);
214acpi_dm_is_eisa_id (
215 union acpi_parse_object *op);
216 164
217void 165void acpi_dm_eisa_id(u32 encoded_id);
218acpi_dm_eisa_id (
219 u32 encoded_id);
220
221u8
222acpi_dm_is_unicode_buffer (
223 union acpi_parse_object *op);
224 166
225u8 167u8 acpi_dm_is_unicode_buffer(union acpi_parse_object *op);
226acpi_dm_is_string_buffer (
227 union acpi_parse_object *op);
228 168
169u8 acpi_dm_is_string_buffer(union acpi_parse_object *op);
229 170
230/* 171/*
231 * dmresrc 172 * dmresrc
232 */ 173 */
233void 174void
234acpi_dm_resource_descriptor ( 175acpi_dm_resource_descriptor(struct acpi_op_walk_info *info,
235 struct acpi_op_walk_info *info, 176 u8 * byte_data, u32 byte_count);
236 u8 *byte_data,
237 u32 byte_count);
238 177
239u8 178u8 acpi_dm_is_resource_descriptor(union acpi_parse_object *op);
240acpi_dm_is_resource_descriptor (
241 union acpi_parse_object *op);
242 179
243void 180void acpi_dm_indent(u32 level);
244acpi_dm_indent (
245 u32 level);
246 181
247void 182void acpi_dm_bit_list(u16 mask);
248acpi_dm_bit_list (
249 u16 mask);
250
251void
252acpi_dm_decode_attribute (
253 u8 attribute);
254 183
184void acpi_dm_decode_attribute(u8 attribute);
255 185
256/* 186/*
257 * dmresrcl 187 * dmresrcl
258 */ 188 */
259void 189void
260acpi_dm_word_descriptor ( 190acpi_dm_word_descriptor(struct asl_word_address_desc *resource,
261 struct asl_word_address_desc *resource, 191 u32 length, u32 level);
262 u32 length,
263 u32 level);
264 192
265void 193void
266acpi_dm_dword_descriptor ( 194acpi_dm_dword_descriptor(struct asl_dword_address_desc *resource,
267 struct asl_dword_address_desc *resource, 195 u32 length, u32 level);
268 u32 length,
269 u32 level);
270 196
271void 197void
272acpi_dm_extended_descriptor ( 198acpi_dm_extended_descriptor(struct asl_extended_address_desc *resource,
273 struct asl_extended_address_desc *resource, 199 u32 length, u32 level);
274 u32 length,
275 u32 level);
276 200
277void 201void
278acpi_dm_qword_descriptor ( 202acpi_dm_qword_descriptor(struct asl_qword_address_desc *resource,
279 struct asl_qword_address_desc *resource, 203 u32 length, u32 level);
280 u32 length,
281 u32 level);
282 204
283void 205void
284acpi_dm_memory24_descriptor ( 206acpi_dm_memory24_descriptor(struct asl_memory_24_desc *resource,
285 struct asl_memory_24_desc *resource, 207 u32 length, u32 level);
286 u32 length,
287 u32 level);
288 208
289void 209void
290acpi_dm_memory32_descriptor ( 210acpi_dm_memory32_descriptor(struct asl_memory_32_desc *resource,
291 struct asl_memory_32_desc *resource, 211 u32 length, u32 level);
292 u32 length,
293 u32 level);
294 212
295void 213void
296acpi_dm_fixed_mem32_descriptor ( 214acpi_dm_fixed_mem32_descriptor(struct asl_fixed_memory_32_desc *resource,
297 struct asl_fixed_memory_32_desc *resource, 215 u32 length, u32 level);
298 u32 length,
299 u32 level);
300 216
301void 217void
302acpi_dm_generic_register_descriptor ( 218acpi_dm_generic_register_descriptor(struct asl_general_register_desc *resource,
303 struct asl_general_register_desc *resource, 219 u32 length, u32 level);
304 u32 length,
305 u32 level);
306 220
307void 221void
308acpi_dm_interrupt_descriptor ( 222acpi_dm_interrupt_descriptor(struct asl_extended_xrupt_desc *resource,
309 struct asl_extended_xrupt_desc *resource, 223 u32 length, u32 level);
310 u32 length,
311 u32 level);
312 224
313void 225void
314acpi_dm_vendor_large_descriptor ( 226acpi_dm_vendor_large_descriptor(struct asl_large_vendor_desc *resource,
315 struct asl_large_vendor_desc *resource, 227 u32 length, u32 level);
316 u32 length,
317 u32 level);
318
319 228
320/* 229/*
321 * dmresrcs 230 * dmresrcs
322 */ 231 */
323void 232void
324acpi_dm_irq_descriptor ( 233acpi_dm_irq_descriptor(struct asl_irq_format_desc *resource,
325 struct asl_irq_format_desc *resource, 234 u32 length, u32 level);
326 u32 length,
327 u32 level);
328 235
329void 236void
330acpi_dm_dma_descriptor ( 237acpi_dm_dma_descriptor(struct asl_dma_format_desc *resource,
331 struct asl_dma_format_desc *resource, 238 u32 length, u32 level);
332 u32 length,
333 u32 level);
334 239
335void 240void
336acpi_dm_io_descriptor ( 241acpi_dm_io_descriptor(struct asl_io_port_desc *resource, u32 length, u32 level);
337 struct asl_io_port_desc *resource,
338 u32 length,
339 u32 level);
340 242
341void 243void
342acpi_dm_fixed_io_descriptor ( 244acpi_dm_fixed_io_descriptor(struct asl_fixed_io_port_desc *resource,
343 struct asl_fixed_io_port_desc *resource, 245 u32 length, u32 level);
344 u32 length,
345 u32 level);
346 246
347void 247void
348acpi_dm_start_dependent_descriptor ( 248acpi_dm_start_dependent_descriptor(struct asl_start_dependent_desc *resource,
349 struct asl_start_dependent_desc *resource, 249 u32 length, u32 level);
350 u32 length,
351 u32 level);
352 250
353void 251void
354acpi_dm_end_dependent_descriptor ( 252acpi_dm_end_dependent_descriptor(struct asl_start_dependent_desc *resource,
355 struct asl_start_dependent_desc *resource, 253 u32 length, u32 level);
356 u32 length,
357 u32 level);
358 254
359void 255void
360acpi_dm_vendor_small_descriptor ( 256acpi_dm_vendor_small_descriptor(struct asl_small_vendor_desc *resource,
361 struct asl_small_vendor_desc *resource, 257 u32 length, u32 level);
362 u32 length,
363 u32 level);
364
365 258
366/* 259/*
367 * dmutils 260 * dmutils
368 */ 261 */
369void 262void acpi_dm_add_to_external_list(char *path);
370acpi_dm_add_to_external_list (
371 char *path);
372 263
373#endif /* __ACDISASM_H__ */ 264#endif /* __ACDISASM_H__ */