diff options
| author | Tony Luck <tony.luck@intel.com> | 2005-07-13 15:15:43 -0400 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2005-07-13 15:15:43 -0400 |
| commit | 99ad25a313bda566a346b46a6015afa65bc0a02b (patch) | |
| tree | b9443fed1ab74f320c4ee0791864ee96d7c069df /include/acpi/acparser.h | |
| parent | f62c4a96f74d6c6dd56d1742697e94a5c2085e87 (diff) | |
| parent | 9a556e89081b0c1c2f83cee915363b15a68a6f2d (diff) | |
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'include/acpi/acparser.h')
| -rw-r--r-- | include/acpi/acparser.h | 134 |
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 | */ | ||
| 69 | acpi_status | 78 | acpi_status |
| 70 | acpi_psx_load_table ( | 79 | acpi_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 | |||
| 88 | u8 * | 91 | u8 * |
| 89 | acpi_ps_get_next_package_end ( | 92 | acpi_ps_get_next_package_end ( |
| 90 | struct acpi_parse_state *parser_state); | 93 | struct acpi_parse_state *parser_state); |
| 91 | 94 | ||
| 92 | u32 | ||
| 93 | acpi_ps_get_next_package_length ( | ||
| 94 | struct acpi_parse_state *parser_state); | ||
| 95 | |||
| 96 | char * | 95 | char * |
| 97 | acpi_ps_get_next_namestring ( | 96 | acpi_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 | ||
| 113 | union acpi_parse_object * | ||
| 114 | acpi_ps_get_next_field ( | ||
| 115 | struct acpi_parse_state *parser_state); | ||
| 116 | |||
| 117 | acpi_status | 112 | acpi_status |
| 118 | acpi_ps_get_next_arg ( | 113 | acpi_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 | */ | ||
| 127 | union acpi_parse_object * | 123 | union acpi_parse_object * |
| 128 | acpi_ps_find_name ( | 124 | acpi_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 | */ | ||
| 140 | const struct acpi_opcode_info * | 137 | const struct acpi_opcode_info * |
| 141 | acpi_ps_get_opcode_info ( | 138 | acpi_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 | |
| 151 | u32 | 148 | */ |
| 152 | acpi_ps_get_opcode_size ( | ||
| 153 | u32 opcode); | ||
| 154 | |||
| 155 | void | ||
| 156 | acpi_ps_complete_this_op ( | ||
| 157 | struct acpi_walk_state *walk_state, | ||
| 158 | union acpi_parse_object *op); | ||
| 159 | |||
| 160 | acpi_status | ||
| 161 | acpi_ps_next_parse_state ( | ||
| 162 | struct acpi_walk_state *walk_state, | ||
| 163 | union acpi_parse_object *op, | ||
| 164 | acpi_status callback_status); | ||
| 165 | |||
| 166 | acpi_status | ||
| 167 | acpi_ps_find_object ( | ||
| 168 | struct acpi_walk_state *walk_state, | ||
| 169 | union acpi_parse_object **out_op); | ||
| 170 | |||
| 171 | void | ||
| 172 | acpi_ps_delete_parse_tree ( | ||
| 173 | union acpi_parse_object *root); | ||
| 174 | |||
| 175 | acpi_status | ||
| 176 | acpi_ps_parse_loop ( | ||
| 177 | struct acpi_walk_state *walk_state); | ||
| 178 | |||
| 179 | acpi_status | 149 | acpi_status |
| 180 | acpi_ps_parse_aml ( | 150 | acpi_ps_parse_aml ( |
| 181 | struct acpi_walk_state *walk_state); | 151 | struct acpi_walk_state *walk_state); |
| 182 | 152 | ||
| 183 | acpi_status | 153 | u32 |
| 184 | acpi_ps_parse_table ( | 154 | acpi_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 | ||
| 191 | u16 | 157 | u16 |
| 192 | acpi_ps_peek_opcode ( | 158 | acpi_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 | */ | |
| 199 | acpi_status | 165 | acpi_status |
| 200 | acpi_ps_init_scope ( | 166 | acpi_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 | */ | ||
| 233 | void | 200 | void |
| 234 | acpi_ps_append_arg( | 201 | acpi_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 |
| 251 | union acpi_parse_object * | ||
| 252 | acpi_ps_get_child ( | ||
| 253 | union acpi_parse_object *op); | ||
| 254 | |||
| 255 | union acpi_parse_object * | 218 | union acpi_parse_object * |
| 256 | acpi_ps_get_depth_next ( | 219 | acpi_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 | */ | ||
| 264 | acpi_status | 228 | acpi_status |
| 265 | acpi_ps_walk_parsed_aml ( | 229 | acpi_ps_walk_parsed_aml ( |
| 266 | union acpi_parse_object *start_op, | 230 | union acpi_parse_object *start_op, |
| @@ -283,9 +247,14 @@ acpi_status | |||
| 283 | acpi_ps_delete_completed_op ( | 247 | acpi_ps_delete_completed_op ( |
| 284 | struct acpi_walk_state *walk_state); | 248 | struct acpi_walk_state *walk_state); |
| 285 | 249 | ||
| 250 | void | ||
| 251 | acpi_ps_delete_parse_tree ( | ||
| 252 | union acpi_parse_object *root); | ||
| 286 | 253 | ||
| 287 | /* psutils - parser utilities */ | ||
| 288 | 254 | ||
| 255 | /* | ||
| 256 | * psutils - parser utilities | ||
| 257 | */ | ||
| 289 | union acpi_parse_object * | 258 | union acpi_parse_object * |
| 290 | acpi_ps_create_scope_op ( | 259 | acpi_ps_create_scope_op ( |
| 291 | void); | 260 | void); |
| @@ -303,12 +272,6 @@ void | |||
| 303 | acpi_ps_free_op ( | 272 | acpi_ps_free_op ( |
| 304 | union acpi_parse_object *op); | 273 | union acpi_parse_object *op); |
| 305 | 274 | ||
| 306 | #ifdef ACPI_ENABLE_OBJECT_CACHE | ||
| 307 | void | ||
| 308 | acpi_ps_delete_parse_cache ( | ||
| 309 | void); | ||
| 310 | #endif | ||
| 311 | |||
| 312 | u8 | 275 | u8 |
| 313 | acpi_ps_is_leading_char ( | 276 | acpi_ps_is_leading_char ( |
| 314 | u32 c); | 277 | u32 c); |
| @@ -317,20 +280,27 @@ u8 | |||
| 317 | acpi_ps_is_prefix_char ( | 280 | acpi_ps_is_prefix_char ( |
| 318 | u32 c); | 281 | u32 c); |
| 319 | 282 | ||
| 320 | #ifdef ACPI_FUTURE_USAGE | 283 | #ifdef ACPI_FUTURE_USAGE |
| 321 | u32 | 284 | u32 |
| 322 | acpi_ps_get_name( | 285 | acpi_ps_get_name( |
| 323 | union acpi_parse_object *op); | 286 | union acpi_parse_object *op); |
| 324 | #endif | 287 | #endif /* ACPI_FUTURE_USAGE */ |
| 325 | 288 | ||
| 326 | void | 289 | void |
| 327 | acpi_ps_set_name( | 290 | acpi_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 | ||
| 295 | void | ||
| 296 | acpi_ps_delete_parse_cache ( | ||
| 297 | void); | ||
| 298 | #endif | ||
| 331 | 299 | ||
| 332 | /* psdump - display parser tree */ | ||
| 333 | 300 | ||
| 301 | /* | ||
| 302 | * psdump - display parser tree | ||
| 303 | */ | ||
| 334 | u32 | 304 | u32 |
| 335 | acpi_ps_sprint_path ( | 305 | acpi_ps_sprint_path ( |
| 336 | char *buffer_start, | 306 | char *buffer_start, |
