[ACPI] whitespace
[deliverable/linux.git] / include / acpi / acdisasm.h
CommitLineData
1da177e4
LT
1/******************************************************************************
2 *
3 * Name: acdisasm.h - AML disassembler
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACDISASM_H__
45#define __ACDISASM_H__
46
47#include "amlresrc.h"
48
49
50#define BLOCK_NONE 0
51#define BLOCK_PAREN 1
52#define BLOCK_BRACE 2
53#define BLOCK_COMMA_LIST 4
54
55struct acpi_external_list
56{
57 char *path;
58 struct acpi_external_list *next;
59};
60
61extern struct acpi_external_list *acpi_gbl_external_list;
62extern const char *acpi_gbl_io_decode[2];
63extern const char *acpi_gbl_word_decode[4];
64extern const char *acpi_gbl_consume_decode[2];
65extern const char *acpi_gbl_min_decode[2];
66extern const char *acpi_gbl_max_decode[2];
67extern const char *acpi_gbl_DECdecode[2];
68extern const char *acpi_gbl_RNGdecode[4];
69extern const char *acpi_gbl_MEMdecode[4];
70extern const char *acpi_gbl_RWdecode[2];
71extern const char *acpi_gbl_irq_decode[2];
72extern const char *acpi_gbl_HEdecode[2];
73extern const char *acpi_gbl_LLdecode[2];
74extern const char *acpi_gbl_SHRdecode[2];
75extern const char *acpi_gbl_TYPdecode[4];
76extern const char *acpi_gbl_BMdecode[2];
77extern const char *acpi_gbl_SIZdecode[4];
78extern const char *acpi_gbl_TTPdecode[2];
79extern const char *acpi_gbl_MTPdecode[4];
80extern const char *acpi_gbl_TRSdecode[2];
81
82
83extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES];
84extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES];
85extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES];
86extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS];
87
88
89struct acpi_op_walk_info
90{
91 u32 level;
92 u32 bit_offset;
73459f73 93 struct acpi_walk_state *walk_state;
1da177e4
LT
94};
95
96typedef
97acpi_status (*asl_walk_callback) (
98 union acpi_parse_object *op,
99 u32 level,
100 void *context);
101
102
103/*
104 * dmwalk
105 */
1da177e4
LT
106void
107acpi_dm_disassemble (
108 struct acpi_walk_state *walk_state,
109 union acpi_parse_object *origin,
110 u32 num_opcodes);
111
1da177e4 112
44f6c012
RM
113/*
114 * dmopcode
115 */
1da177e4
LT
116void
117acpi_dm_disassemble_one_op (
118 struct acpi_walk_state *walk_state,
119 struct acpi_op_walk_info *info,
120 union acpi_parse_object *op);
121
122void
123acpi_dm_decode_internal_object (
124 union acpi_operand_object *obj_desc);
125
1da177e4
LT
126u32
127acpi_dm_list_type (
128 union acpi_parse_object *op);
129
1da177e4
LT
130void
131acpi_dm_method_flags (
132 union acpi_parse_object *op);
133
134void
135acpi_dm_field_flags (
136 union acpi_parse_object *op);
137
138void
139acpi_dm_address_space (
140 u8 space_id);
141
142void
143acpi_dm_region_flags (
144 union acpi_parse_object *op);
145
146void
147acpi_dm_match_op (
148 union acpi_parse_object *op);
149
1da177e4
LT
150u8
151acpi_dm_comma_if_list_member (
152 union acpi_parse_object *op);
153
154void
155acpi_dm_comma_if_field_member (
156 union acpi_parse_object *op);
157
158
159/*
44f6c012 160 * dmnames
1da177e4 161 */
44f6c012
RM
162u32
163acpi_dm_dump_name (
164 char *name);
165
166acpi_status
167acpi_ps_display_object_pathname (
168 struct acpi_walk_state *walk_state,
169 union acpi_parse_object *op);
1da177e4
LT
170
171void
44f6c012
RM
172acpi_dm_namestring (
173 char *name);
174
1da177e4 175
44f6c012
RM
176/*
177 * dmobject
178 */
1da177e4
LT
179void
180acpi_dm_display_internal_object (
181 union acpi_operand_object *obj_desc,
182 struct acpi_walk_state *walk_state);
183
184void
185acpi_dm_display_arguments (
186 struct acpi_walk_state *walk_state);
187
188void
189acpi_dm_display_locals (
190 struct acpi_walk_state *walk_state);
191
192void
193acpi_dm_dump_method_info (
194 acpi_status status,
195 struct acpi_walk_state *walk_state,
196 union acpi_parse_object *op);
197
198
199/*
200 * dmbuffer
201 */
44f6c012
RM
202void
203acpi_dm_disasm_byte_list (
204 u32 level,
205 u8 *byte_data,
206 u32 byte_count);
207
208void
209acpi_dm_byte_list (
210 struct acpi_op_walk_info *info,
211 union acpi_parse_object *op);
1da177e4
LT
212
213void
f9f4601f 214acpi_dm_is_eisa_id (
1da177e4
LT
215 union acpi_parse_object *op);
216
217void
218acpi_dm_eisa_id (
219 u32 encoded_id);
220
221u8
222acpi_dm_is_unicode_buffer (
223 union acpi_parse_object *op);
224
225u8
226acpi_dm_is_string_buffer (
227 union acpi_parse_object *op);
228
229
230/*
231 * dmresrc
232 */
1da177e4
LT
233void
234acpi_dm_resource_descriptor (
235 struct acpi_op_walk_info *info,
236 u8 *byte_data,
237 u32 byte_count);
238
239u8
240acpi_dm_is_resource_descriptor (
241 union acpi_parse_object *op);
242
243void
244acpi_dm_indent (
245 u32 level);
246
247void
248acpi_dm_bit_list (
249 u16 mask);
250
251void
252acpi_dm_decode_attribute (
253 u8 attribute);
254
44f6c012 255
1da177e4
LT
256/*
257 * dmresrcl
258 */
1da177e4
LT
259void
260acpi_dm_word_descriptor (
261 struct asl_word_address_desc *resource,
262 u32 length,
263 u32 level);
264
265void
266acpi_dm_dword_descriptor (
267 struct asl_dword_address_desc *resource,
268 u32 length,
269 u32 level);
270
271void
272acpi_dm_extended_descriptor (
273 struct asl_extended_address_desc *resource,
274 u32 length,
275 u32 level);
276
277void
278acpi_dm_qword_descriptor (
279 struct asl_qword_address_desc *resource,
280 u32 length,
281 u32 level);
282
283void
284acpi_dm_memory24_descriptor (
285 struct asl_memory_24_desc *resource,
286 u32 length,
287 u32 level);
288
289void
290acpi_dm_memory32_descriptor (
291 struct asl_memory_32_desc *resource,
292 u32 length,
293 u32 level);
294
295void
296acpi_dm_fixed_mem32_descriptor (
297 struct asl_fixed_memory_32_desc *resource,
298 u32 length,
299 u32 level);
300
301void
302acpi_dm_generic_register_descriptor (
303 struct asl_general_register_desc *resource,
304 u32 length,
305 u32 level);
306
307void
308acpi_dm_interrupt_descriptor (
309 struct asl_extended_xrupt_desc *resource,
310 u32 length,
311 u32 level);
312
313void
314acpi_dm_vendor_large_descriptor (
315 struct asl_large_vendor_desc *resource,
316 u32 length,
317 u32 level);
318
319
320/*
321 * dmresrcs
322 */
1da177e4
LT
323void
324acpi_dm_irq_descriptor (
325 struct asl_irq_format_desc *resource,
326 u32 length,
327 u32 level);
328
329void
330acpi_dm_dma_descriptor (
331 struct asl_dma_format_desc *resource,
332 u32 length,
333 u32 level);
334
335void
336acpi_dm_io_descriptor (
337 struct asl_io_port_desc *resource,
338 u32 length,
339 u32 level);
340
341void
342acpi_dm_fixed_io_descriptor (
343 struct asl_fixed_io_port_desc *resource,
344 u32 length,
345 u32 level);
346
347void
348acpi_dm_start_dependent_descriptor (
349 struct asl_start_dependent_desc *resource,
350 u32 length,
351 u32 level);
352
353void
354acpi_dm_end_dependent_descriptor (
355 struct asl_start_dependent_desc *resource,
356 u32 length,
357 u32 level);
358
359void
360acpi_dm_vendor_small_descriptor (
361 struct asl_small_vendor_desc *resource,
362 u32 length,
363 u32 level);
364
365
366/*
367 * dmutils
368 */
1da177e4
LT
369void
370acpi_dm_add_to_external_list (
371 char *path);
372
373#endif /* __ACDISASM_H__ */
This page took 0.053977 seconds and 5 git commands to generate.