aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acparser.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-08 10:21:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-08 10:21:59 -0400
commit6a4b170c54289f427645019c52d1b9c871a6661e (patch)
treee129355a1e07a6ee7f24a3df1fdb59906f733bf4 /include/acpi/acparser.h
parenteccdfcd6f8265300380fa14a83aeb14e69830323 (diff)
parent64e47488c913ac704d465a6af86a26786d1412a5 (diff)
Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
Diffstat (limited to 'include/acpi/acparser.h')
-rw-r--r--include/acpi/acparser.h255
1 files changed, 83 insertions, 172 deletions
diff --git a/include/acpi/acparser.h b/include/acpi/acparser.h
index 698276571818..d352d40de1f3 100644
--- a/include/acpi/acparser.h
+++ b/include/acpi/acparser.h
@@ -41,18 +41,15 @@
41 * POSSIBILITY OF SUCH DAMAGES. 41 * POSSIBILITY OF SUCH DAMAGES.
42 */ 42 */
43 43
44
45#ifndef __ACPARSER_H__ 44#ifndef __ACPARSER_H__
46#define __ACPARSER_H__ 45#define __ACPARSER_H__
47 46
48
49#define OP_HAS_RETURN_VALUE 1 47#define OP_HAS_RETURN_VALUE 1
50 48
51/* variable # arguments */ 49/* variable # arguments */
52 50
53#define ACPI_VAR_ARGS ACPI_UINT32_MAX 51#define ACPI_VAR_ARGS ACPI_UINT32_MAX
54 52
55
56#define ACPI_PARSE_DELETE_TREE 0x0001 53#define ACPI_PARSE_DELETE_TREE 0x0001
57#define ACPI_PARSE_NO_TREE_DELETE 0x0000 54#define ACPI_PARSE_NO_TREE_DELETE 0x0000
58#define ACPI_PARSE_TREE_MASK 0x0001 55#define ACPI_PARSE_TREE_MASK 0x0001
@@ -63,7 +60,7 @@
63#define ACPI_PARSE_MODE_MASK 0x0030 60#define ACPI_PARSE_MODE_MASK 0x0030
64 61
65#define ACPI_PARSE_DEFERRED_OP 0x0100 62#define ACPI_PARSE_DEFERRED_OP 0x0100
66 63#define ACPI_PARSE_DISASSEMBLE 0x0200
67 64
68/****************************************************************************** 65/******************************************************************************
69 * 66 *
@@ -71,251 +68,165 @@
71 * 68 *
72 *****************************************************************************/ 69 *****************************************************************************/
73 70
74
75/* 71/*
76 * psxface - Parser external interfaces 72 * psxface - Parser external interfaces
77 */ 73 */
78acpi_status 74acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info);
79acpi_psx_load_table (
80 u8 *pcode_addr,
81 u32 pcode_length);
82
83acpi_status
84acpi_psx_execute (
85 struct acpi_parameter_info *info);
86
87 75
88/* 76/*
89 * psargs - Parse AML opcode arguments 77 * psargs - Parse AML opcode arguments
90 */ 78 */
91u8 * 79u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state);
92acpi_ps_get_next_package_end (
93 struct acpi_parse_state *parser_state);
94 80
95char * 81char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state);
96acpi_ps_get_next_namestring (
97 struct acpi_parse_state *parser_state);
98 82
99void 83void
100acpi_ps_get_next_simple_arg ( 84acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state,
101 struct acpi_parse_state *parser_state, 85 u32 arg_type, union acpi_parse_object *arg);
102 u32 arg_type,
103 union acpi_parse_object *arg);
104 86
105acpi_status 87acpi_status
106acpi_ps_get_next_namepath ( 88acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
107 struct acpi_walk_state *walk_state, 89 struct acpi_parse_state *parser_state,
108 struct acpi_parse_state *parser_state, 90 union acpi_parse_object *arg, u8 method_call);
109 union acpi_parse_object *arg,
110 u8 method_call);
111 91
112acpi_status 92acpi_status
113acpi_ps_get_next_arg ( 93acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
114 struct acpi_walk_state *walk_state, 94 struct acpi_parse_state *parser_state,
115 struct acpi_parse_state *parser_state, 95 u32 arg_type, union acpi_parse_object **return_arg);
116 u32 arg_type,
117 union acpi_parse_object **return_arg);
118
119 96
120/* 97/*
121 * psfind 98 * psfind
122 */ 99 */
123union acpi_parse_object * 100union acpi_parse_object *acpi_ps_find_name(union acpi_parse_object *scope,
124acpi_ps_find_name ( 101 u32 name, u32 opcode);
125 union acpi_parse_object *scope,
126 u32 name,
127 u32 opcode);
128
129union acpi_parse_object*
130acpi_ps_get_parent (
131 union acpi_parse_object *op);
132 102
103union acpi_parse_object *acpi_ps_get_parent(union acpi_parse_object *op);
133 104
134/* 105/*
135 * psopcode - AML Opcode information 106 * psopcode - AML Opcode information
136 */ 107 */
137const struct acpi_opcode_info * 108const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode);
138acpi_ps_get_opcode_info (
139 u16 opcode);
140
141char *
142acpi_ps_get_opcode_name (
143 u16 opcode);
144 109
110char *acpi_ps_get_opcode_name(u16 opcode);
145 111
146/* 112/*
147 * psparse - top level parsing routines 113 * psparse - top level parsing routines
148 */ 114 */
149acpi_status 115acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state);
150acpi_ps_parse_aml (
151 struct acpi_walk_state *walk_state);
152 116
153u32 117u32 acpi_ps_get_opcode_size(u32 opcode);
154acpi_ps_get_opcode_size (
155 u32 opcode);
156 118
157u16 119u16 acpi_ps_peek_opcode(struct acpi_parse_state *state);
158acpi_ps_peek_opcode (
159 struct acpi_parse_state *state);
160 120
121acpi_status
122acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
123 union acpi_parse_object *op);
124
125acpi_status
126acpi_ps_next_parse_state(struct acpi_walk_state *walk_state,
127 union acpi_parse_object *op,
128 acpi_status callback_status);
129
130/*
131 * psloop - main parse loop
132 */
133acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state);
161 134
162/* 135/*
163 * psscope - Scope stack management routines 136 * psscope - Scope stack management routines
164 */ 137 */
165acpi_status 138acpi_status
166acpi_ps_init_scope ( 139acpi_ps_init_scope(struct acpi_parse_state *parser_state,
167 struct acpi_parse_state *parser_state, 140 union acpi_parse_object *root);
168 union acpi_parse_object *root);
169 141
170union acpi_parse_object * 142union acpi_parse_object *acpi_ps_get_parent_scope(struct acpi_parse_state
171acpi_ps_get_parent_scope ( 143 *state);
172 struct acpi_parse_state *state);
173 144
174u8 145u8 acpi_ps_has_completed_scope(struct acpi_parse_state *parser_state);
175acpi_ps_has_completed_scope (
176 struct acpi_parse_state *parser_state);
177 146
178void 147void
179acpi_ps_pop_scope ( 148acpi_ps_pop_scope(struct acpi_parse_state *parser_state,
180 struct acpi_parse_state *parser_state, 149 union acpi_parse_object **op,
181 union acpi_parse_object **op, 150 u32 * arg_list, u32 * arg_count);
182 u32 *arg_list,
183 u32 *arg_count);
184 151
185acpi_status 152acpi_status
186acpi_ps_push_scope ( 153acpi_ps_push_scope(struct acpi_parse_state *parser_state,
187 struct acpi_parse_state *parser_state, 154 union acpi_parse_object *op,
188 union acpi_parse_object *op, 155 u32 remaining_args, u32 arg_count);
189 u32 remaining_args,
190 u32 arg_count);
191
192void
193acpi_ps_cleanup_scope (
194 struct acpi_parse_state *state);
195 156
157void acpi_ps_cleanup_scope(struct acpi_parse_state *state);
196 158
197/* 159/*
198 * pstree - parse tree manipulation routines 160 * pstree - parse tree manipulation routines
199 */ 161 */
200void 162void
201acpi_ps_append_arg( 163acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg);
202 union acpi_parse_object *op,
203 union acpi_parse_object *arg);
204
205union acpi_parse_object*
206acpi_ps_find (
207 union acpi_parse_object *scope,
208 char *path,
209 u16 opcode,
210 u32 create);
211
212union acpi_parse_object *
213acpi_ps_get_arg(
214 union acpi_parse_object *op,
215 u32 argn);
216 164
217#ifdef ACPI_FUTURE_USAGE 165union acpi_parse_object *acpi_ps_find(union acpi_parse_object *scope,
218union acpi_parse_object * 166 char *path, u16 opcode, u32 create);
219acpi_ps_get_depth_next (
220 union acpi_parse_object *origin,
221 union acpi_parse_object *op);
222#endif /* ACPI_FUTURE_USAGE */
223 167
168union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn);
169
170#ifdef ACPI_FUTURE_USAGE
171union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin,
172 union acpi_parse_object *op);
173#endif /* ACPI_FUTURE_USAGE */
224 174
225/* 175/*
226 * pswalk - parse tree walk routines 176 * pswalk - parse tree walk routines
227 */ 177 */
228acpi_status 178acpi_status
229acpi_ps_walk_parsed_aml ( 179acpi_ps_walk_parsed_aml(union acpi_parse_object *start_op,
230 union acpi_parse_object *start_op, 180 union acpi_parse_object *end_op,
231 union acpi_parse_object *end_op, 181 union acpi_operand_object *mth_desc,
232 union acpi_operand_object *mth_desc, 182 struct acpi_namespace_node *start_node,
233 struct acpi_namespace_node *start_node, 183 union acpi_operand_object **params,
234 union acpi_operand_object **params, 184 union acpi_operand_object **caller_return_desc,
235 union acpi_operand_object **caller_return_desc, 185 acpi_owner_id owner_id,
236 acpi_owner_id owner_id, 186 acpi_parse_downwards descending_callback,
237 acpi_parse_downwards descending_callback, 187 acpi_parse_upwards ascending_callback);
238 acpi_parse_upwards ascending_callback);
239
240acpi_status
241acpi_ps_get_next_walk_op (
242 struct acpi_walk_state *walk_state,
243 union acpi_parse_object *op,
244 acpi_parse_upwards ascending_callback);
245 188
246acpi_status 189acpi_status
247acpi_ps_delete_completed_op ( 190acpi_ps_get_next_walk_op(struct acpi_walk_state *walk_state,
248 struct acpi_walk_state *walk_state); 191 union acpi_parse_object *op,
192 acpi_parse_upwards ascending_callback);
249 193
250void 194acpi_status acpi_ps_delete_completed_op(struct acpi_walk_state *walk_state);
251acpi_ps_delete_parse_tree (
252 union acpi_parse_object *root);
253 195
196void acpi_ps_delete_parse_tree(union acpi_parse_object *root);
254 197
255/* 198/*
256 * psutils - parser utilities 199 * psutils - parser utilities
257 */ 200 */
258union acpi_parse_object * 201union acpi_parse_object *acpi_ps_create_scope_op(void);
259acpi_ps_create_scope_op (
260 void);
261 202
262void 203void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode);
263acpi_ps_init_op (
264 union acpi_parse_object *op,
265 u16 opcode);
266 204
267union acpi_parse_object * 205union acpi_parse_object *acpi_ps_alloc_op(u16 opcode);
268acpi_ps_alloc_op (
269 u16 opcode);
270 206
271void 207void acpi_ps_free_op(union acpi_parse_object *op);
272acpi_ps_free_op (
273 union acpi_parse_object *op);
274 208
275u8 209u8 acpi_ps_is_leading_char(u32 c);
276acpi_ps_is_leading_char (
277 u32 c);
278 210
279u8 211u8 acpi_ps_is_prefix_char(u32 c);
280acpi_ps_is_prefix_char (
281 u32 c);
282 212
283#ifdef ACPI_FUTURE_USAGE 213#ifdef ACPI_FUTURE_USAGE
284u32 214u32 acpi_ps_get_name(union acpi_parse_object *op);
285acpi_ps_get_name( 215#endif /* ACPI_FUTURE_USAGE */
286 union acpi_parse_object *op);
287#endif /* ACPI_FUTURE_USAGE */
288
289void
290acpi_ps_set_name(
291 union acpi_parse_object *op,
292 u32 name);
293
294#ifdef ACPI_ENABLE_OBJECT_CACHE
295void
296acpi_ps_delete_parse_cache (
297 void);
298#endif
299 216
217void acpi_ps_set_name(union acpi_parse_object *op, u32 name);
300 218
301/* 219/*
302 * psdump - display parser tree 220 * psdump - display parser tree
303 */ 221 */
304u32 222u32
305acpi_ps_sprint_path ( 223acpi_ps_sprint_path(char *buffer_start,
306 char *buffer_start, 224 u32 buffer_size, union acpi_parse_object *op);
307 u32 buffer_size,
308 union acpi_parse_object *op);
309 225
310u32 226u32
311acpi_ps_sprint_op ( 227acpi_ps_sprint_op(char *buffer_start,
312 char *buffer_start, 228 u32 buffer_size, union acpi_parse_object *op);
313 u32 buffer_size,
314 union acpi_parse_object *op);
315
316void
317acpi_ps_show (
318 union acpi_parse_object *op);
319 229
230void acpi_ps_show(union acpi_parse_object *op);
320 231
321#endif /* __ACPARSER_H__ */ 232#endif /* __ACPARSER_H__ */