diff options
Diffstat (limited to 'include/acpi/acdisasm.h')
-rw-r--r-- | include/acpi/acdisasm.h | 322 |
1 files changed, 107 insertions, 215 deletions
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index dbfa877121ba..3d96dcb1bb4b 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h | |||
@@ -46,327 +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 | }; | 89 | }; |
94 | 90 | ||
95 | typedef | 91 | typedef |
96 | acpi_status (*asl_walk_callback) ( | 92 | acpi_status(*asl_walk_callback) (union acpi_parse_object * op, |
97 | union acpi_parse_object *op, | 93 | u32 level, void *context); |
98 | u32 level, | ||
99 | void *context); | ||
100 | |||
101 | 94 | ||
102 | /* | 95 | /* |
103 | * dmwalk | 96 | * dmwalk |
104 | */ | 97 | */ |
105 | void | 98 | void |
106 | acpi_dm_disassemble ( | 99 | acpi_dm_disassemble(struct acpi_walk_state *walk_state, |
107 | struct acpi_walk_state *walk_state, | 100 | union acpi_parse_object *origin, u32 num_opcodes); |
108 | union acpi_parse_object *origin, | ||
109 | u32 num_opcodes); | ||
110 | |||
111 | 101 | ||
112 | /* | 102 | /* |
113 | * dmopcode | 103 | * dmopcode |
114 | */ | 104 | */ |
115 | void | 105 | void |
116 | acpi_dm_disassemble_one_op ( | 106 | acpi_dm_disassemble_one_op(struct acpi_walk_state *walk_state, |
117 | struct acpi_walk_state *walk_state, | 107 | struct acpi_op_walk_info *info, |
118 | struct acpi_op_walk_info *info, | 108 | union acpi_parse_object *op); |
119 | union acpi_parse_object *op); | ||
120 | 109 | ||
121 | void | 110 | void acpi_dm_decode_internal_object(union acpi_operand_object *obj_desc); |
122 | acpi_dm_decode_internal_object ( | ||
123 | union acpi_operand_object *obj_desc); | ||
124 | 111 | ||
125 | u32 | 112 | u32 acpi_dm_list_type(union acpi_parse_object *op); |
126 | acpi_dm_list_type ( | ||
127 | union acpi_parse_object *op); | ||
128 | 113 | ||
129 | void | 114 | void acpi_dm_method_flags(union acpi_parse_object *op); |
130 | acpi_dm_method_flags ( | ||
131 | union acpi_parse_object *op); | ||
132 | |||
133 | void | ||
134 | acpi_dm_field_flags ( | ||
135 | union acpi_parse_object *op); | ||
136 | 115 | ||
137 | void | 116 | void acpi_dm_field_flags(union acpi_parse_object *op); |
138 | acpi_dm_address_space ( | ||
139 | u8 space_id); | ||
140 | 117 | ||
141 | void | 118 | void acpi_dm_address_space(u8 space_id); |
142 | acpi_dm_region_flags ( | ||
143 | union acpi_parse_object *op); | ||
144 | 119 | ||
145 | void | 120 | void acpi_dm_region_flags(union acpi_parse_object *op); |
146 | acpi_dm_match_op ( | ||
147 | union acpi_parse_object *op); | ||
148 | 121 | ||
149 | u8 | 122 | void acpi_dm_match_op(union acpi_parse_object *op); |
150 | acpi_dm_comma_if_list_member ( | ||
151 | union acpi_parse_object *op); | ||
152 | 123 | ||
153 | void | 124 | u8 acpi_dm_comma_if_list_member(union acpi_parse_object *op); |
154 | acpi_dm_comma_if_field_member ( | ||
155 | union acpi_parse_object *op); | ||
156 | 125 | ||
126 | void acpi_dm_comma_if_field_member(union acpi_parse_object *op); | ||
157 | 127 | ||
158 | /* | 128 | /* |
159 | * dmnames | 129 | * dmnames |
160 | */ | 130 | */ |
161 | u32 | 131 | u32 acpi_dm_dump_name(char *name); |
162 | acpi_dm_dump_name ( | ||
163 | char *name); | ||
164 | 132 | ||
165 | acpi_status | 133 | acpi_status |
166 | acpi_ps_display_object_pathname ( | 134 | acpi_ps_display_object_pathname(struct acpi_walk_state *walk_state, |
167 | struct acpi_walk_state *walk_state, | 135 | union acpi_parse_object *op); |
168 | union acpi_parse_object *op); | ||
169 | |||
170 | void | ||
171 | acpi_dm_namestring ( | ||
172 | char *name); | ||
173 | 136 | ||
137 | void acpi_dm_namestring(char *name); | ||
174 | 138 | ||
175 | /* | 139 | /* |
176 | * dmobject | 140 | * dmobject |
177 | */ | 141 | */ |
178 | void | 142 | void |
179 | acpi_dm_display_internal_object ( | 143 | acpi_dm_display_internal_object(union acpi_operand_object *obj_desc, |
180 | union acpi_operand_object *obj_desc, | 144 | struct acpi_walk_state *walk_state); |
181 | struct acpi_walk_state *walk_state); | ||
182 | 145 | ||
183 | void | 146 | void acpi_dm_display_arguments(struct acpi_walk_state *walk_state); |
184 | acpi_dm_display_arguments ( | ||
185 | struct acpi_walk_state *walk_state); | ||
186 | 147 | ||
187 | void | 148 | void acpi_dm_display_locals(struct acpi_walk_state *walk_state); |
188 | acpi_dm_display_locals ( | ||
189 | struct acpi_walk_state *walk_state); | ||
190 | 149 | ||
191 | void | 150 | void |
192 | acpi_dm_dump_method_info ( | 151 | acpi_dm_dump_method_info(acpi_status status, |
193 | acpi_status status, | 152 | struct acpi_walk_state *walk_state, |
194 | struct acpi_walk_state *walk_state, | 153 | union acpi_parse_object *op); |
195 | union acpi_parse_object *op); | ||
196 | |||
197 | 154 | ||
198 | /* | 155 | /* |
199 | * dmbuffer | 156 | * dmbuffer |
200 | */ | 157 | */ |
201 | void | 158 | void acpi_dm_disasm_byte_list(u32 level, u8 * byte_data, u32 byte_count); |
202 | acpi_dm_disasm_byte_list ( | ||
203 | u32 level, | ||
204 | u8 *byte_data, | ||
205 | u32 byte_count); | ||
206 | 159 | ||
207 | void | 160 | void |
208 | acpi_dm_byte_list ( | 161 | acpi_dm_byte_list(struct acpi_op_walk_info *info, union acpi_parse_object *op); |
209 | struct acpi_op_walk_info *info, | ||
210 | union acpi_parse_object *op); | ||
211 | 162 | ||
212 | void | 163 | void acpi_dm_is_eisa_id(union acpi_parse_object *op); |
213 | acpi_is_eisa_id ( | ||
214 | union acpi_parse_object *op); | ||
215 | 164 | ||
216 | void | 165 | void acpi_dm_eisa_id(u32 encoded_id); |
217 | acpi_dm_eisa_id ( | ||
218 | u32 encoded_id); | ||
219 | |||
220 | u8 | ||
221 | acpi_dm_is_unicode_buffer ( | ||
222 | union acpi_parse_object *op); | ||
223 | 166 | ||
224 | u8 | 167 | u8 acpi_dm_is_unicode_buffer(union acpi_parse_object *op); |
225 | acpi_dm_is_string_buffer ( | ||
226 | union acpi_parse_object *op); | ||
227 | 168 | ||
169 | u8 acpi_dm_is_string_buffer(union acpi_parse_object *op); | ||
228 | 170 | ||
229 | /* | 171 | /* |
230 | * dmresrc | 172 | * dmresrc |
231 | */ | 173 | */ |
232 | void | 174 | void |
233 | acpi_dm_resource_descriptor ( | 175 | acpi_dm_resource_descriptor(struct acpi_op_walk_info *info, |
234 | struct acpi_op_walk_info *info, | 176 | u8 * byte_data, u32 byte_count); |
235 | u8 *byte_data, | ||
236 | u32 byte_count); | ||
237 | 177 | ||
238 | u8 | 178 | u8 acpi_dm_is_resource_descriptor(union acpi_parse_object *op); |
239 | acpi_dm_is_resource_descriptor ( | ||
240 | union acpi_parse_object *op); | ||
241 | 179 | ||
242 | void | 180 | void acpi_dm_indent(u32 level); |
243 | acpi_dm_indent ( | ||
244 | u32 level); | ||
245 | 181 | ||
246 | void | 182 | void acpi_dm_bit_list(u16 mask); |
247 | acpi_dm_bit_list ( | ||
248 | u16 mask); | ||
249 | |||
250 | void | ||
251 | acpi_dm_decode_attribute ( | ||
252 | u8 attribute); | ||
253 | 183 | ||
184 | void acpi_dm_decode_attribute(u8 attribute); | ||
254 | 185 | ||
255 | /* | 186 | /* |
256 | * dmresrcl | 187 | * dmresrcl |
257 | */ | 188 | */ |
258 | void | 189 | void |
259 | acpi_dm_word_descriptor ( | 190 | acpi_dm_word_descriptor(struct asl_word_address_desc *resource, |
260 | struct asl_word_address_desc *resource, | 191 | u32 length, u32 level); |
261 | u32 length, | ||
262 | u32 level); | ||
263 | 192 | ||
264 | void | 193 | void |
265 | acpi_dm_dword_descriptor ( | 194 | acpi_dm_dword_descriptor(struct asl_dword_address_desc *resource, |
266 | struct asl_dword_address_desc *resource, | 195 | u32 length, u32 level); |
267 | u32 length, | ||
268 | u32 level); | ||
269 | 196 | ||
270 | void | 197 | void |
271 | acpi_dm_extended_descriptor ( | 198 | acpi_dm_extended_descriptor(struct asl_extended_address_desc *resource, |
272 | struct asl_extended_address_desc *resource, | 199 | u32 length, u32 level); |
273 | u32 length, | ||
274 | u32 level); | ||
275 | 200 | ||
276 | void | 201 | void |
277 | acpi_dm_qword_descriptor ( | 202 | acpi_dm_qword_descriptor(struct asl_qword_address_desc *resource, |
278 | struct asl_qword_address_desc *resource, | 203 | u32 length, u32 level); |
279 | u32 length, | ||
280 | u32 level); | ||
281 | 204 | ||
282 | void | 205 | void |
283 | acpi_dm_memory24_descriptor ( | 206 | acpi_dm_memory24_descriptor(struct asl_memory_24_desc *resource, |
284 | struct asl_memory_24_desc *resource, | 207 | u32 length, u32 level); |
285 | u32 length, | ||
286 | u32 level); | ||
287 | 208 | ||
288 | void | 209 | void |
289 | acpi_dm_memory32_descriptor ( | 210 | acpi_dm_memory32_descriptor(struct asl_memory_32_desc *resource, |
290 | struct asl_memory_32_desc *resource, | 211 | u32 length, u32 level); |
291 | u32 length, | ||
292 | u32 level); | ||
293 | 212 | ||
294 | void | 213 | void |
295 | acpi_dm_fixed_mem32_descriptor ( | 214 | acpi_dm_fixed_mem32_descriptor(struct asl_fixed_memory_32_desc *resource, |
296 | struct asl_fixed_memory_32_desc *resource, | 215 | u32 length, u32 level); |
297 | u32 length, | ||
298 | u32 level); | ||
299 | 216 | ||
300 | void | 217 | void |
301 | acpi_dm_generic_register_descriptor ( | 218 | acpi_dm_generic_register_descriptor(struct asl_general_register_desc *resource, |
302 | struct asl_general_register_desc *resource, | 219 | u32 length, u32 level); |
303 | u32 length, | ||
304 | u32 level); | ||
305 | 220 | ||
306 | void | 221 | void |
307 | acpi_dm_interrupt_descriptor ( | 222 | acpi_dm_interrupt_descriptor(struct asl_extended_xrupt_desc *resource, |
308 | struct asl_extended_xrupt_desc *resource, | 223 | u32 length, u32 level); |
309 | u32 length, | ||
310 | u32 level); | ||
311 | 224 | ||
312 | void | 225 | void |
313 | acpi_dm_vendor_large_descriptor ( | 226 | acpi_dm_vendor_large_descriptor(struct asl_large_vendor_desc *resource, |
314 | struct asl_large_vendor_desc *resource, | 227 | u32 length, u32 level); |
315 | u32 length, | ||
316 | u32 level); | ||
317 | |||
318 | 228 | ||
319 | /* | 229 | /* |
320 | * dmresrcs | 230 | * dmresrcs |
321 | */ | 231 | */ |
322 | void | 232 | void |
323 | acpi_dm_irq_descriptor ( | 233 | acpi_dm_irq_descriptor(struct asl_irq_format_desc *resource, |
324 | struct asl_irq_format_desc *resource, | 234 | u32 length, u32 level); |
325 | u32 length, | ||
326 | u32 level); | ||
327 | 235 | ||
328 | void | 236 | void |
329 | acpi_dm_dma_descriptor ( | 237 | acpi_dm_dma_descriptor(struct asl_dma_format_desc *resource, |
330 | struct asl_dma_format_desc *resource, | 238 | u32 length, u32 level); |
331 | u32 length, | ||
332 | u32 level); | ||
333 | 239 | ||
334 | void | 240 | void |
335 | acpi_dm_io_descriptor ( | 241 | acpi_dm_io_descriptor(struct asl_io_port_desc *resource, u32 length, u32 level); |
336 | struct asl_io_port_desc *resource, | ||
337 | u32 length, | ||
338 | u32 level); | ||
339 | 242 | ||
340 | void | 243 | void |
341 | acpi_dm_fixed_io_descriptor ( | 244 | acpi_dm_fixed_io_descriptor(struct asl_fixed_io_port_desc *resource, |
342 | struct asl_fixed_io_port_desc *resource, | 245 | u32 length, u32 level); |
343 | u32 length, | ||
344 | u32 level); | ||
345 | 246 | ||
346 | void | 247 | void |
347 | acpi_dm_start_dependent_descriptor ( | 248 | acpi_dm_start_dependent_descriptor(struct asl_start_dependent_desc *resource, |
348 | struct asl_start_dependent_desc *resource, | 249 | u32 length, u32 level); |
349 | u32 length, | ||
350 | u32 level); | ||
351 | 250 | ||
352 | void | 251 | void |
353 | acpi_dm_end_dependent_descriptor ( | 252 | acpi_dm_end_dependent_descriptor(struct asl_start_dependent_desc *resource, |
354 | struct asl_start_dependent_desc *resource, | 253 | u32 length, u32 level); |
355 | u32 length, | ||
356 | u32 level); | ||
357 | 254 | ||
358 | void | 255 | void |
359 | acpi_dm_vendor_small_descriptor ( | 256 | acpi_dm_vendor_small_descriptor(struct asl_small_vendor_desc *resource, |
360 | struct asl_small_vendor_desc *resource, | 257 | u32 length, u32 level); |
361 | u32 length, | ||
362 | u32 level); | ||
363 | |||
364 | 258 | ||
365 | /* | 259 | /* |
366 | * dmutils | 260 | * dmutils |
367 | */ | 261 | */ |
368 | void | 262 | void acpi_dm_add_to_external_list(char *path); |
369 | acpi_dm_add_to_external_list ( | ||
370 | char *path); | ||
371 | 263 | ||
372 | #endif /* __ACDISASM_H__ */ | 264 | #endif /* __ACDISASM_H__ */ |