diff options
Diffstat (limited to 'include/acpi/acdisasm.h')
-rw-r--r-- | include/acpi/acdisasm.h | 323 |
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 | ||
55 | struct acpi_external_list | 54 | struct 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 | ||
61 | extern struct acpi_external_list *acpi_gbl_external_list; | 59 | extern struct acpi_external_list *acpi_gbl_external_list; |
62 | extern const char *acpi_gbl_io_decode[2]; | 60 | extern const char *acpi_gbl_io_decode[2]; |
63 | extern const char *acpi_gbl_word_decode[4]; | 61 | extern const char *acpi_gbl_word_decode[4]; |
64 | extern const char *acpi_gbl_consume_decode[2]; | 62 | extern const char *acpi_gbl_consume_decode[2]; |
65 | extern const char *acpi_gbl_min_decode[2]; | 63 | extern const char *acpi_gbl_min_decode[2]; |
66 | extern const char *acpi_gbl_max_decode[2]; | 64 | extern const char *acpi_gbl_max_decode[2]; |
67 | extern const char *acpi_gbl_DECdecode[2]; | 65 | extern const char *acpi_gbl_DECdecode[2]; |
68 | extern const char *acpi_gbl_RNGdecode[4]; | 66 | extern const char *acpi_gbl_RNGdecode[4]; |
69 | extern const char *acpi_gbl_MEMdecode[4]; | 67 | extern const char *acpi_gbl_MEMdecode[4]; |
70 | extern const char *acpi_gbl_RWdecode[2]; | 68 | extern const char *acpi_gbl_RWdecode[2]; |
71 | extern const char *acpi_gbl_irq_decode[2]; | 69 | extern const char *acpi_gbl_irq_decode[2]; |
72 | extern const char *acpi_gbl_HEdecode[2]; | 70 | extern const char *acpi_gbl_HEdecode[2]; |
73 | extern const char *acpi_gbl_LLdecode[2]; | 71 | extern const char *acpi_gbl_LLdecode[2]; |
74 | extern const char *acpi_gbl_SHRdecode[2]; | 72 | extern const char *acpi_gbl_SHRdecode[2]; |
75 | extern const char *acpi_gbl_TYPdecode[4]; | 73 | extern const char *acpi_gbl_TYPdecode[4]; |
76 | extern const char *acpi_gbl_BMdecode[2]; | 74 | extern const char *acpi_gbl_BMdecode[2]; |
77 | extern const char *acpi_gbl_SIZdecode[4]; | 75 | extern const char *acpi_gbl_SIZdecode[4]; |
78 | extern const char *acpi_gbl_TTPdecode[2]; | 76 | extern const char *acpi_gbl_TTPdecode[2]; |
79 | extern const char *acpi_gbl_MTPdecode[4]; | 77 | extern const char *acpi_gbl_MTPdecode[4]; |
80 | extern const char *acpi_gbl_TRSdecode[2]; | 78 | extern const char *acpi_gbl_TRSdecode[2]; |
81 | 79 | ||
82 | 80 | extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; | |
83 | extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; | 81 | extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; |
84 | extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; | 82 | extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; |
85 | extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; | 83 | extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS]; |
86 | extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS]; | 84 | |
87 | 85 | struct acpi_op_walk_info { | |
88 | 86 | u32 level; | |
89 | struct 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 | ||
96 | typedef | 91 | typedef |
97 | acpi_status (*asl_walk_callback) ( | 92 | acpi_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 | */ |
106 | void | 98 | void |
107 | acpi_dm_disassemble ( | 99 | acpi_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 | */ |
116 | void | 105 | void |
117 | acpi_dm_disassemble_one_op ( | 106 | acpi_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 | ||
122 | void | 110 | void acpi_dm_decode_internal_object(union acpi_operand_object *obj_desc); |
123 | acpi_dm_decode_internal_object ( | ||
124 | union acpi_operand_object *obj_desc); | ||
125 | 111 | ||
126 | u32 | 112 | u32 acpi_dm_list_type(union acpi_parse_object *op); |
127 | acpi_dm_list_type ( | ||
128 | union acpi_parse_object *op); | ||
129 | 113 | ||
130 | void | 114 | void acpi_dm_method_flags(union acpi_parse_object *op); |
131 | acpi_dm_method_flags ( | ||
132 | union acpi_parse_object *op); | ||
133 | |||
134 | void | ||
135 | acpi_dm_field_flags ( | ||
136 | union acpi_parse_object *op); | ||
137 | 115 | ||
138 | void | 116 | void acpi_dm_field_flags(union acpi_parse_object *op); |
139 | acpi_dm_address_space ( | ||
140 | u8 space_id); | ||
141 | 117 | ||
142 | void | 118 | void acpi_dm_address_space(u8 space_id); |
143 | acpi_dm_region_flags ( | ||
144 | union acpi_parse_object *op); | ||
145 | 119 | ||
146 | void | 120 | void acpi_dm_region_flags(union acpi_parse_object *op); |
147 | acpi_dm_match_op ( | ||
148 | union acpi_parse_object *op); | ||
149 | 121 | ||
150 | u8 | 122 | void acpi_dm_match_op(union acpi_parse_object *op); |
151 | acpi_dm_comma_if_list_member ( | ||
152 | union acpi_parse_object *op); | ||
153 | 123 | ||
154 | void | 124 | u8 acpi_dm_comma_if_list_member(union acpi_parse_object *op); |
155 | acpi_dm_comma_if_field_member ( | ||
156 | union acpi_parse_object *op); | ||
157 | 125 | ||
126 | void acpi_dm_comma_if_field_member(union acpi_parse_object *op); | ||
158 | 127 | ||
159 | /* | 128 | /* |
160 | * dmnames | 129 | * dmnames |
161 | */ | 130 | */ |
162 | u32 | 131 | u32 acpi_dm_dump_name(char *name); |
163 | acpi_dm_dump_name ( | ||
164 | char *name); | ||
165 | 132 | ||
166 | acpi_status | 133 | acpi_status |
167 | acpi_ps_display_object_pathname ( | 134 | acpi_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 | |||
171 | void | ||
172 | acpi_dm_namestring ( | ||
173 | char *name); | ||
174 | 136 | ||
137 | void acpi_dm_namestring(char *name); | ||
175 | 138 | ||
176 | /* | 139 | /* |
177 | * dmobject | 140 | * dmobject |
178 | */ | 141 | */ |
179 | void | 142 | void |
180 | acpi_dm_display_internal_object ( | 143 | acpi_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 | ||
184 | void | 146 | void acpi_dm_display_arguments(struct acpi_walk_state *walk_state); |
185 | acpi_dm_display_arguments ( | ||
186 | struct acpi_walk_state *walk_state); | ||
187 | 147 | ||
188 | void | 148 | void acpi_dm_display_locals(struct acpi_walk_state *walk_state); |
189 | acpi_dm_display_locals ( | ||
190 | struct acpi_walk_state *walk_state); | ||
191 | 149 | ||
192 | void | 150 | void |
193 | acpi_dm_dump_method_info ( | 151 | acpi_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 | */ |
202 | void | 158 | void acpi_dm_disasm_byte_list(u32 level, u8 * byte_data, u32 byte_count); |
203 | acpi_dm_disasm_byte_list ( | ||
204 | u32 level, | ||
205 | u8 *byte_data, | ||
206 | u32 byte_count); | ||
207 | 159 | ||
208 | void | 160 | void |
209 | acpi_dm_byte_list ( | 161 | acpi_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 | ||
213 | void | 163 | void acpi_dm_is_eisa_id(union acpi_parse_object *op); |
214 | acpi_dm_is_eisa_id ( | ||
215 | union acpi_parse_object *op); | ||
216 | 164 | ||
217 | void | 165 | void acpi_dm_eisa_id(u32 encoded_id); |
218 | acpi_dm_eisa_id ( | ||
219 | u32 encoded_id); | ||
220 | |||
221 | u8 | ||
222 | acpi_dm_is_unicode_buffer ( | ||
223 | union acpi_parse_object *op); | ||
224 | 166 | ||
225 | u8 | 167 | u8 acpi_dm_is_unicode_buffer(union acpi_parse_object *op); |
226 | acpi_dm_is_string_buffer ( | ||
227 | union acpi_parse_object *op); | ||
228 | 168 | ||
169 | u8 acpi_dm_is_string_buffer(union acpi_parse_object *op); | ||
229 | 170 | ||
230 | /* | 171 | /* |
231 | * dmresrc | 172 | * dmresrc |
232 | */ | 173 | */ |
233 | void | 174 | void |
234 | acpi_dm_resource_descriptor ( | 175 | acpi_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 | ||
239 | u8 | 178 | u8 acpi_dm_is_resource_descriptor(union acpi_parse_object *op); |
240 | acpi_dm_is_resource_descriptor ( | ||
241 | union acpi_parse_object *op); | ||
242 | 179 | ||
243 | void | 180 | void acpi_dm_indent(u32 level); |
244 | acpi_dm_indent ( | ||
245 | u32 level); | ||
246 | 181 | ||
247 | void | 182 | void acpi_dm_bit_list(u16 mask); |
248 | acpi_dm_bit_list ( | ||
249 | u16 mask); | ||
250 | |||
251 | void | ||
252 | acpi_dm_decode_attribute ( | ||
253 | u8 attribute); | ||
254 | 183 | ||
184 | void acpi_dm_decode_attribute(u8 attribute); | ||
255 | 185 | ||
256 | /* | 186 | /* |
257 | * dmresrcl | 187 | * dmresrcl |
258 | */ | 188 | */ |
259 | void | 189 | void |
260 | acpi_dm_word_descriptor ( | 190 | acpi_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 | ||
265 | void | 193 | void |
266 | acpi_dm_dword_descriptor ( | 194 | acpi_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 | ||
271 | void | 197 | void |
272 | acpi_dm_extended_descriptor ( | 198 | acpi_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 | ||
277 | void | 201 | void |
278 | acpi_dm_qword_descriptor ( | 202 | acpi_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 | ||
283 | void | 205 | void |
284 | acpi_dm_memory24_descriptor ( | 206 | acpi_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 | ||
289 | void | 209 | void |
290 | acpi_dm_memory32_descriptor ( | 210 | acpi_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 | ||
295 | void | 213 | void |
296 | acpi_dm_fixed_mem32_descriptor ( | 214 | acpi_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 | ||
301 | void | 217 | void |
302 | acpi_dm_generic_register_descriptor ( | 218 | acpi_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 | ||
307 | void | 221 | void |
308 | acpi_dm_interrupt_descriptor ( | 222 | acpi_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 | ||
313 | void | 225 | void |
314 | acpi_dm_vendor_large_descriptor ( | 226 | acpi_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 | */ |
323 | void | 232 | void |
324 | acpi_dm_irq_descriptor ( | 233 | acpi_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 | ||
329 | void | 236 | void |
330 | acpi_dm_dma_descriptor ( | 237 | acpi_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 | ||
335 | void | 240 | void |
336 | acpi_dm_io_descriptor ( | 241 | acpi_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 | ||
341 | void | 243 | void |
342 | acpi_dm_fixed_io_descriptor ( | 244 | acpi_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 | ||
347 | void | 247 | void |
348 | acpi_dm_start_dependent_descriptor ( | 248 | acpi_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 | ||
353 | void | 251 | void |
354 | acpi_dm_end_dependent_descriptor ( | 252 | acpi_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 | ||
359 | void | 255 | void |
360 | acpi_dm_vendor_small_descriptor ( | 256 | acpi_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 | */ |
369 | void | 262 | void acpi_dm_add_to_external_list(char *path); |
370 | acpi_dm_add_to_external_list ( | ||
371 | char *path); | ||
372 | 263 | ||
373 | #endif /* __ACDISASM_H__ */ | 264 | #endif /* __ACDISASM_H__ */ |