aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/acparser.h')
-rw-r--r--include/acpi/acparser.h134
1 files changed, 52 insertions, 82 deletions
diff --git a/include/acpi/acparser.h b/include/acpi/acparser.h
index c0395ef2b0d0..698276571818 100644
--- a/include/acpi/acparser.h
+++ b/include/acpi/acparser.h
@@ -64,8 +64,17 @@
64 64
65#define ACPI_PARSE_DEFERRED_OP 0x0100 65#define ACPI_PARSE_DEFERRED_OP 0x0100
66 66
67/* Parser external interfaces */
68 67
68/******************************************************************************
69 *
70 * Parser interfaces
71 *
72 *****************************************************************************/
73
74
75/*
76 * psxface - Parser external interfaces
77 */
69acpi_status 78acpi_status
70acpi_psx_load_table ( 79acpi_psx_load_table (
71 u8 *pcode_addr, 80 u8 *pcode_addr,
@@ -76,23 +85,13 @@ acpi_psx_execute (
76 struct acpi_parameter_info *info); 85 struct acpi_parameter_info *info);
77 86
78 87
79/****************************************************************************** 88/*
80 * 89 * psargs - Parse AML opcode arguments
81 * Parser interfaces 90 */
82 *
83 *****************************************************************************/
84
85
86/* psargs - Parse AML opcode arguments */
87
88u8 * 91u8 *
89acpi_ps_get_next_package_end ( 92acpi_ps_get_next_package_end (
90 struct acpi_parse_state *parser_state); 93 struct acpi_parse_state *parser_state);
91 94
92u32
93acpi_ps_get_next_package_length (
94 struct acpi_parse_state *parser_state);
95
96char * 95char *
97acpi_ps_get_next_namestring ( 96acpi_ps_get_next_namestring (
98 struct acpi_parse_state *parser_state); 97 struct acpi_parse_state *parser_state);
@@ -110,10 +109,6 @@ acpi_ps_get_next_namepath (
110 union acpi_parse_object *arg, 109 union acpi_parse_object *arg,
111 u8 method_call); 110 u8 method_call);
112 111
113union acpi_parse_object *
114acpi_ps_get_next_field (
115 struct acpi_parse_state *parser_state);
116
117acpi_status 112acpi_status
118acpi_ps_get_next_arg ( 113acpi_ps_get_next_arg (
119 struct acpi_walk_state *walk_state, 114 struct acpi_walk_state *walk_state,
@@ -122,8 +117,9 @@ acpi_ps_get_next_arg (
122 union acpi_parse_object **return_arg); 117 union acpi_parse_object **return_arg);
123 118
124 119
125/* psfind */ 120/*
126 121 * psfind
122 */
127union acpi_parse_object * 123union acpi_parse_object *
128acpi_ps_find_name ( 124acpi_ps_find_name (
129 union acpi_parse_object *scope, 125 union acpi_parse_object *scope,
@@ -135,8 +131,9 @@ acpi_ps_get_parent (
135 union acpi_parse_object *op); 131 union acpi_parse_object *op);
136 132
137 133
138/* psopcode - AML Opcode information */ 134/*
139 135 * psopcode - AML Opcode information
136 */
140const struct acpi_opcode_info * 137const struct acpi_opcode_info *
141acpi_ps_get_opcode_info ( 138acpi_ps_get_opcode_info (
142 u16 opcode); 139 u16 opcode);
@@ -146,56 +143,25 @@ acpi_ps_get_opcode_name (
146 u16 opcode); 143 u16 opcode);
147 144
148 145
149/* psparse - top level parsing routines */ 146/*
150 147 * psparse - top level parsing routines
151u32 148 */
152acpi_ps_get_opcode_size (
153 u32 opcode);
154
155void
156acpi_ps_complete_this_op (
157 struct acpi_walk_state *walk_state,
158 union acpi_parse_object *op);
159
160acpi_status
161acpi_ps_next_parse_state (
162 struct acpi_walk_state *walk_state,
163 union acpi_parse_object *op,
164 acpi_status callback_status);
165
166acpi_status
167acpi_ps_find_object (
168 struct acpi_walk_state *walk_state,
169 union acpi_parse_object **out_op);
170
171void
172acpi_ps_delete_parse_tree (
173 union acpi_parse_object *root);
174
175acpi_status
176acpi_ps_parse_loop (
177 struct acpi_walk_state *walk_state);
178
179acpi_status 149acpi_status
180acpi_ps_parse_aml ( 150acpi_ps_parse_aml (
181 struct acpi_walk_state *walk_state); 151 struct acpi_walk_state *walk_state);
182 152
183acpi_status 153u32
184acpi_ps_parse_table ( 154acpi_ps_get_opcode_size (
185 u8 *aml, 155 u32 opcode);
186 u32 aml_size,
187 acpi_parse_downwards descending_callback,
188 acpi_parse_upwards ascending_callback,
189 union acpi_parse_object **root_object);
190 156
191u16 157u16
192acpi_ps_peek_opcode ( 158acpi_ps_peek_opcode (
193 struct acpi_parse_state *state); 159 struct acpi_parse_state *state);
194 160
195 161
196/* psscope - Scope stack management routines */ 162/*
197 163 * psscope - Scope stack management routines
198 164 */
199acpi_status 165acpi_status
200acpi_ps_init_scope ( 166acpi_ps_init_scope (
201 struct acpi_parse_state *parser_state, 167 struct acpi_parse_state *parser_state,
@@ -228,8 +194,9 @@ acpi_ps_cleanup_scope (
228 struct acpi_parse_state *state); 194 struct acpi_parse_state *state);
229 195
230 196
231/* pstree - parse tree manipulation routines */ 197/*
232 198 * pstree - parse tree manipulation routines
199 */
233void 200void
234acpi_ps_append_arg( 201acpi_ps_append_arg(
235 union acpi_parse_object *op, 202 union acpi_parse_object *op,
@@ -247,20 +214,17 @@ acpi_ps_get_arg(
247 union acpi_parse_object *op, 214 union acpi_parse_object *op,
248 u32 argn); 215 u32 argn);
249 216
250#ifdef ACPI_FUTURE_USAGE 217#ifdef ACPI_FUTURE_USAGE
251union acpi_parse_object *
252acpi_ps_get_child (
253 union acpi_parse_object *op);
254
255union acpi_parse_object * 218union acpi_parse_object *
256acpi_ps_get_depth_next ( 219acpi_ps_get_depth_next (
257 union acpi_parse_object *origin, 220 union acpi_parse_object *origin,
258 union acpi_parse_object *op); 221 union acpi_parse_object *op);
259#endif /* ACPI_FUTURE_USAGE */ 222#endif /* ACPI_FUTURE_USAGE */
260
261 223
262/* pswalk - parse tree walk routines */
263 224
225/*
226 * pswalk - parse tree walk routines
227 */
264acpi_status 228acpi_status
265acpi_ps_walk_parsed_aml ( 229acpi_ps_walk_parsed_aml (
266 union acpi_parse_object *start_op, 230 union acpi_parse_object *start_op,
@@ -283,9 +247,14 @@ acpi_status
283acpi_ps_delete_completed_op ( 247acpi_ps_delete_completed_op (
284 struct acpi_walk_state *walk_state); 248 struct acpi_walk_state *walk_state);
285 249
250void
251acpi_ps_delete_parse_tree (
252 union acpi_parse_object *root);
286 253
287/* psutils - parser utilities */
288 254
255/*
256 * psutils - parser utilities
257 */
289union acpi_parse_object * 258union acpi_parse_object *
290acpi_ps_create_scope_op ( 259acpi_ps_create_scope_op (
291 void); 260 void);
@@ -303,12 +272,6 @@ void
303acpi_ps_free_op ( 272acpi_ps_free_op (
304 union acpi_parse_object *op); 273 union acpi_parse_object *op);
305 274
306#ifdef ACPI_ENABLE_OBJECT_CACHE
307void
308acpi_ps_delete_parse_cache (
309 void);
310#endif
311
312u8 275u8
313acpi_ps_is_leading_char ( 276acpi_ps_is_leading_char (
314 u32 c); 277 u32 c);
@@ -317,20 +280,27 @@ u8
317acpi_ps_is_prefix_char ( 280acpi_ps_is_prefix_char (
318 u32 c); 281 u32 c);
319 282
320#ifdef ACPI_FUTURE_USAGE 283#ifdef ACPI_FUTURE_USAGE
321u32 284u32
322acpi_ps_get_name( 285acpi_ps_get_name(
323 union acpi_parse_object *op); 286 union acpi_parse_object *op);
324#endif 287#endif /* ACPI_FUTURE_USAGE */
325 288
326void 289void
327acpi_ps_set_name( 290acpi_ps_set_name(
328 union acpi_parse_object *op, 291 union acpi_parse_object *op,
329 u32 name); 292 u32 name);
330 293
294#ifdef ACPI_ENABLE_OBJECT_CACHE
295void
296acpi_ps_delete_parse_cache (
297 void);
298#endif
331 299
332/* psdump - display parser tree */
333 300
301/*
302 * psdump - display parser tree
303 */
334u32 304u32
335acpi_ps_sprint_path ( 305acpi_ps_sprint_path (
336 char *buffer_start, 306 char *buffer_start,