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.h322
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
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}; 89};
94 90
95typedef 91typedef
96acpi_status (*asl_walk_callback) ( 92acpi_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 */
105void 98void
106acpi_dm_disassemble ( 99acpi_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 */
115void 105void
116acpi_dm_disassemble_one_op ( 106acpi_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
121void 110void acpi_dm_decode_internal_object(union acpi_operand_object *obj_desc);
122acpi_dm_decode_internal_object (
123 union acpi_operand_object *obj_desc);
124 111
125u32 112u32 acpi_dm_list_type(union acpi_parse_object *op);
126acpi_dm_list_type (
127 union acpi_parse_object *op);
128 113
129void 114void acpi_dm_method_flags(union acpi_parse_object *op);
130acpi_dm_method_flags (
131 union acpi_parse_object *op);
132
133void
134acpi_dm_field_flags (
135 union acpi_parse_object *op);
136 115
137void 116void acpi_dm_field_flags(union acpi_parse_object *op);
138acpi_dm_address_space (
139 u8 space_id);
140 117
141void 118void acpi_dm_address_space(u8 space_id);
142acpi_dm_region_flags (
143 union acpi_parse_object *op);
144 119
145void 120void acpi_dm_region_flags(union acpi_parse_object *op);
146acpi_dm_match_op (
147 union acpi_parse_object *op);
148 121
149u8 122void acpi_dm_match_op(union acpi_parse_object *op);
150acpi_dm_comma_if_list_member (
151 union acpi_parse_object *op);
152 123
153void 124u8 acpi_dm_comma_if_list_member(union acpi_parse_object *op);
154acpi_dm_comma_if_field_member (
155 union acpi_parse_object *op);
156 125
126void acpi_dm_comma_if_field_member(union acpi_parse_object *op);
157 127
158/* 128/*
159 * dmnames 129 * dmnames
160 */ 130 */
161u32 131u32 acpi_dm_dump_name(char *name);
162acpi_dm_dump_name (
163 char *name);
164 132
165acpi_status 133acpi_status
166acpi_ps_display_object_pathname ( 134acpi_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
170void
171acpi_dm_namestring (
172 char *name);
173 136
137void acpi_dm_namestring(char *name);
174 138
175/* 139/*
176 * dmobject 140 * dmobject
177 */ 141 */
178void 142void
179acpi_dm_display_internal_object ( 143acpi_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
183void 146void acpi_dm_display_arguments(struct acpi_walk_state *walk_state);
184acpi_dm_display_arguments (
185 struct acpi_walk_state *walk_state);
186 147
187void 148void acpi_dm_display_locals(struct acpi_walk_state *walk_state);
188acpi_dm_display_locals (
189 struct acpi_walk_state *walk_state);
190 149
191void 150void
192acpi_dm_dump_method_info ( 151acpi_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 */
201void 158void acpi_dm_disasm_byte_list(u32 level, u8 * byte_data, u32 byte_count);
202acpi_dm_disasm_byte_list (
203 u32 level,
204 u8 *byte_data,
205 u32 byte_count);
206 159
207void 160void
208acpi_dm_byte_list ( 161acpi_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
212void 163void acpi_dm_is_eisa_id(union acpi_parse_object *op);
213acpi_is_eisa_id (
214 union acpi_parse_object *op);
215 164
216void 165void acpi_dm_eisa_id(u32 encoded_id);
217acpi_dm_eisa_id (
218 u32 encoded_id);
219
220u8
221acpi_dm_is_unicode_buffer (
222 union acpi_parse_object *op);
223 166
224u8 167u8 acpi_dm_is_unicode_buffer(union acpi_parse_object *op);
225acpi_dm_is_string_buffer (
226 union acpi_parse_object *op);
227 168
169u8 acpi_dm_is_string_buffer(union acpi_parse_object *op);
228 170
229/* 171/*
230 * dmresrc 172 * dmresrc
231 */ 173 */
232void 174void
233acpi_dm_resource_descriptor ( 175acpi_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
238u8 178u8 acpi_dm_is_resource_descriptor(union acpi_parse_object *op);
239acpi_dm_is_resource_descriptor (
240 union acpi_parse_object *op);
241 179
242void 180void acpi_dm_indent(u32 level);
243acpi_dm_indent (
244 u32 level);
245 181
246void 182void acpi_dm_bit_list(u16 mask);
247acpi_dm_bit_list (
248 u16 mask);
249
250void
251acpi_dm_decode_attribute (
252 u8 attribute);
253 183
184void acpi_dm_decode_attribute(u8 attribute);
254 185
255/* 186/*
256 * dmresrcl 187 * dmresrcl
257 */ 188 */
258void 189void
259acpi_dm_word_descriptor ( 190acpi_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
264void 193void
265acpi_dm_dword_descriptor ( 194acpi_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
270void 197void
271acpi_dm_extended_descriptor ( 198acpi_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
276void 201void
277acpi_dm_qword_descriptor ( 202acpi_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
282void 205void
283acpi_dm_memory24_descriptor ( 206acpi_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
288void 209void
289acpi_dm_memory32_descriptor ( 210acpi_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
294void 213void
295acpi_dm_fixed_mem32_descriptor ( 214acpi_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
300void 217void
301acpi_dm_generic_register_descriptor ( 218acpi_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
306void 221void
307acpi_dm_interrupt_descriptor ( 222acpi_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
312void 225void
313acpi_dm_vendor_large_descriptor ( 226acpi_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 */
322void 232void
323acpi_dm_irq_descriptor ( 233acpi_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
328void 236void
329acpi_dm_dma_descriptor ( 237acpi_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
334void 240void
335acpi_dm_io_descriptor ( 241acpi_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
340void 243void
341acpi_dm_fixed_io_descriptor ( 244acpi_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
346void 247void
347acpi_dm_start_dependent_descriptor ( 248acpi_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
352void 251void
353acpi_dm_end_dependent_descriptor ( 252acpi_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
358void 255void
359acpi_dm_vendor_small_descriptor ( 256acpi_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 */
368void 262void acpi_dm_add_to_external_list(char *path);
369acpi_dm_add_to_external_list (
370 char *path);
371 263
372#endif /* __ACDISASM_H__ */ 264#endif /* __ACDISASM_H__ */