aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /include/acpi
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acconfig.h7
-rw-r--r--include/acpi/acdebug.h146
-rw-r--r--include/acpi/acdisasm.h114
-rw-r--r--include/acpi/acdispat.h171
-rw-r--r--include/acpi/acevents.h85
-rw-r--r--include/acpi/acexcep.h5
-rw-r--r--include/acpi/acglobal.h12
-rw-r--r--include/acpi/achware.h52
-rw-r--r--include/acpi/acinterp.h243
-rw-r--r--include/acpi/aclocal.h10
-rw-r--r--include/acpi/acmacros.h10
-rw-r--r--include/acpi/acnames.h84
-rw-r--r--include/acpi/acnamesp.h163
-rw-r--r--include/acpi/acobject.h2
-rw-r--r--include/acpi/acopcode.h325
-rw-r--r--include/acpi/acparser.h134
-rw-r--r--include/acpi/acpi.h1
-rw-r--r--include/acpi/acpiosxf.h18
-rw-r--r--include/acpi/acpixf.h13
-rw-r--r--include/acpi/acresrc.h67
-rw-r--r--include/acpi/acstruct.h1
-rw-r--r--include/acpi/actables.h70
-rw-r--r--include/acpi/actbl.h2
-rw-r--r--include/acpi/actypes.h2
-rw-r--r--include/acpi/acutils.h274
-rw-r--r--include/acpi/amlcode.h12
-rw-r--r--include/acpi/platform/acenv.h20
27 files changed, 830 insertions, 1213 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 2b41e47b7d80..2f6ab189fc6f 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -64,7 +64,7 @@
64 64
65/* Version string */ 65/* Version string */
66 66
67#define ACPI_CA_VERSION 0x20050309 67#define ACPI_CA_VERSION 0x20050408
68 68
69/* 69/*
70 * OS name, used for the _OS object. The _OS object is essentially obsolete, 70 * OS name, used for the _OS object. The _OS object is essentially obsolete,
@@ -130,9 +130,8 @@
130#define ACPI_MAX_GPE_BLOCKS 2 130#define ACPI_MAX_GPE_BLOCKS 2
131#define ACPI_GPE_REGISTER_WIDTH 8 131#define ACPI_GPE_REGISTER_WIDTH 8
132 132
133/* 133/* Method info (in WALK_STATE), containing local variables and argumetns */
134 * Method info (in WALK_STATE), containing local variables and argumetns 134
135 */
136#define ACPI_METHOD_NUM_LOCALS 8 135#define ACPI_METHOD_NUM_LOCALS 8
137#define ACPI_METHOD_MAX_LOCAL 7 136#define ACPI_METHOD_MAX_LOCAL 7
138 137
diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h
index 223b2a506e49..8ba372b0f245 100644
--- a/include/acpi/acdebug.h
+++ b/include/acpi/acdebug.h
@@ -61,9 +61,7 @@ struct argument_info
61 61
62 62
63#define PARAM_LIST(pl) pl 63#define PARAM_LIST(pl) pl
64
65#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose) 64#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
66
67#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\ 65#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
68 acpi_os_printf PARAM_LIST(fp);} 66 acpi_os_printf PARAM_LIST(fp);}
69 67
@@ -71,13 +69,9 @@ struct argument_info
71#define EX_SINGLE_STEP 2 69#define EX_SINGLE_STEP 2
72 70
73 71
74/* Prototypes */
75
76
77/* 72/*
78 * dbxface - external debugger interfaces 73 * dbxface - external debugger interfaces
79 */ 74 */
80
81acpi_status 75acpi_status
82acpi_db_initialize ( 76acpi_db_initialize (
83 void); 77 void);
@@ -92,20 +86,10 @@ acpi_db_single_step (
92 union acpi_parse_object *op, 86 union acpi_parse_object *op,
93 u32 op_type); 87 u32 op_type);
94 88
95acpi_status
96acpi_db_start_command (
97 struct acpi_walk_state *walk_state,
98 union acpi_parse_object *op);
99
100void
101acpi_db_method_end (
102 struct acpi_walk_state *walk_state);
103
104 89
105/* 90/*
106 * dbcmds - debug commands and output routines 91 * dbcmds - debug commands and output routines
107 */ 92 */
108
109acpi_status 93acpi_status
110acpi_db_disassemble_method ( 94acpi_db_disassemble_method (
111 char *name); 95 char *name);
@@ -177,57 +161,30 @@ acpi_db_find_references (
177 char *object_arg); 161 char *object_arg);
178 162
179void 163void
180acpi_db_display_locks (void); 164acpi_db_display_locks (
181 165 void);
182 166
183void 167void
184acpi_db_display_resources ( 168acpi_db_display_resources (
185 char *object_arg); 169 char *object_arg);
186 170
187void 171void
188acpi_db_display_gpes (void); 172acpi_db_display_gpes (
173 void);
189 174
190void 175void
191acpi_db_check_integrity ( 176acpi_db_check_integrity (
192 void); 177 void);
193 178
194acpi_status
195acpi_db_integrity_walk (
196 acpi_handle obj_handle,
197 u32 nesting_level,
198 void *context,
199 void **return_value);
200
201acpi_status
202acpi_db_walk_and_match_name (
203 acpi_handle obj_handle,
204 u32 nesting_level,
205 void *context,
206 void **return_value);
207
208acpi_status
209acpi_db_walk_for_references (
210 acpi_handle obj_handle,
211 u32 nesting_level,
212 void *context,
213 void **return_value);
214
215acpi_status
216acpi_db_walk_for_specific_objects (
217 acpi_handle obj_handle,
218 u32 nesting_level,
219 void *context,
220 void **return_value);
221
222void 179void
223acpi_db_generate_gpe ( 180acpi_db_generate_gpe (
224 char *gpe_arg, 181 char *gpe_arg,
225 char *block_arg); 182 char *block_arg);
226 183
184
227/* 185/*
228 * dbdisply - debug display commands 186 * dbdisply - debug display commands
229 */ 187 */
230
231void 188void
232acpi_db_display_method_info ( 189acpi_db_display_method_info (
233 union acpi_parse_object *op); 190 union acpi_parse_object *op);
@@ -271,19 +228,10 @@ acpi_db_display_argument_object (
271 union acpi_operand_object *obj_desc, 228 union acpi_operand_object *obj_desc,
272 struct acpi_walk_state *walk_state); 229 struct acpi_walk_state *walk_state);
273 230
274void
275acpi_db_dump_parser_descriptor (
276 union acpi_parse_object *op);
277
278void *
279acpi_db_get_pointer (
280 void *target);
281
282 231
283/* 232/*
284 * dbexec - debugger control method execution 233 * dbexec - debugger control method execution
285 */ 234 */
286
287void 235void
288acpi_db_execute ( 236acpi_db_execute (
289 char *name, 237 char *name,
@@ -296,44 +244,15 @@ acpi_db_create_execution_threads (
296 char *num_loops_arg, 244 char *num_loops_arg,
297 char *method_name_arg); 245 char *method_name_arg);
298 246
299acpi_status
300acpi_db_execute_method (
301 struct acpi_db_method_info *info,
302 struct acpi_buffer *return_obj);
303
304void
305acpi_db_execute_setup (
306 struct acpi_db_method_info *info);
307
308u32
309acpi_db_get_outstanding_allocations (
310 void);
311
312void ACPI_SYSTEM_XFACE
313acpi_db_method_thread (
314 void *context);
315
316acpi_status
317acpi_db_execution_walk (
318 acpi_handle obj_handle,
319 u32 nesting_level,
320 void *context,
321 void **return_value);
322
323 247
324/* 248/*
325 * dbfileio - Debugger file I/O commands 249 * dbfileio - Debugger file I/O commands
326 */ 250 */
327
328acpi_object_type 251acpi_object_type
329acpi_db_match_argument ( 252acpi_db_match_argument (
330 char *user_argument, 253 char *user_argument,
331 struct argument_info *arguments); 254 struct argument_info *arguments);
332 255
333acpi_status
334ae_local_load_table (
335 struct acpi_table_header *table_ptr);
336
337void 256void
338acpi_db_close_debug_file ( 257acpi_db_close_debug_file (
339 void); 258 void);
@@ -356,16 +275,17 @@ acpi_db_read_table_from_file (
356 char *filename, 275 char *filename,
357 struct acpi_table_header **table); 276 struct acpi_table_header **table);
358 277
278
359/* 279/*
360 * dbhistry - debugger HISTORY command 280 * dbhistry - debugger HISTORY command
361 */ 281 */
362
363void 282void
364acpi_db_add_to_history ( 283acpi_db_add_to_history (
365 char *command_line); 284 char *command_line);
366 285
367void 286void
368acpi_db_display_history (void); 287acpi_db_display_history (
288 void);
369 289
370char * 290char *
371acpi_db_get_from_history ( 291acpi_db_get_from_history (
@@ -375,7 +295,6 @@ acpi_db_get_from_history (
375/* 295/*
376 * dbinput - user front-end to the AML debugger 296 * dbinput - user front-end to the AML debugger
377 */ 297 */
378
379acpi_status 298acpi_status
380acpi_db_command_dispatch ( 299acpi_db_command_dispatch (
381 char *input_buffer, 300 char *input_buffer,
@@ -386,71 +305,28 @@ void ACPI_SYSTEM_XFACE
386acpi_db_execute_thread ( 305acpi_db_execute_thread (
387 void *context); 306 void *context);
388 307
389void
390acpi_db_display_help (
391 char *help_type);
392
393char *
394acpi_db_get_next_token (
395 char *string,
396 char **next);
397
398u32
399acpi_db_get_line (
400 char *input_buffer);
401
402u32
403acpi_db_match_command (
404 char *user_command);
405
406void
407acpi_db_single_thread (
408 void);
409
410 308
411/* 309/*
412 * dbstats - Generation and display of ACPI table statistics 310 * dbstats - Generation and display of ACPI table statistics
413 */ 311 */
414
415void 312void
416acpi_db_generate_statistics ( 313acpi_db_generate_statistics (
417 union acpi_parse_object *root, 314 union acpi_parse_object *root,
418 u8 is_method); 315 u8 is_method);
419 316
420
421acpi_status 317acpi_status
422acpi_db_display_statistics ( 318acpi_db_display_statistics (
423 char *type_arg); 319 char *type_arg);
424 320
425acpi_status
426acpi_db_classify_one_object (
427 acpi_handle obj_handle,
428 u32 nesting_level,
429 void *context,
430 void **return_value);
431
432void
433acpi_db_count_namespace_objects (
434 void);
435
436void
437acpi_db_enumerate_object (
438 union acpi_operand_object *obj_desc);
439
440 321
441/* 322/*
442 * dbutils - AML debugger utilities 323 * dbutils - AML debugger utilities
443 */ 324 */
444
445void 325void
446acpi_db_set_output_destination ( 326acpi_db_set_output_destination (
447 u32 where); 327 u32 where);
448 328
449void 329void
450acpi_db_dump_buffer (
451 u32 address);
452
453void
454acpi_db_dump_object ( 330acpi_db_dump_object (
455 union acpi_object *obj_desc, 331 union acpi_object *obj_desc,
456 u32 level); 332 u32 level);
@@ -459,14 +335,8 @@ void
459acpi_db_prep_namestring ( 335acpi_db_prep_namestring (
460 char *name); 336 char *name);
461 337
462
463acpi_status
464acpi_db_second_pass_parse (
465 union acpi_parse_object *root);
466
467struct acpi_namespace_node * 338struct acpi_namespace_node *
468acpi_db_local_ns_lookup ( 339acpi_db_local_ns_lookup (
469 char *name); 340 char *name);
470 341
471
472#endif /* __ACDEBUG_H__ */ 342#endif /* __ACDEBUG_H__ */
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h
index 26d907eae6fe..dbfa877121ba 100644
--- a/include/acpi/acdisasm.h
+++ b/include/acpi/acdisasm.h
@@ -102,58 +102,16 @@ acpi_status (*asl_walk_callback) (
102/* 102/*
103 * dmwalk 103 * dmwalk
104 */ 104 */
105
106void
107acpi_dm_walk_parse_tree (
108 union acpi_parse_object *op,
109 asl_walk_callback descending_callback,
110 asl_walk_callback ascending_callback,
111 void *context);
112
113acpi_status
114acpi_dm_descending_op (
115 union acpi_parse_object *op,
116 u32 level,
117 void *context);
118
119acpi_status
120acpi_dm_ascending_op (
121 union acpi_parse_object *op,
122 u32 level,
123 void *context);
124
125
126/*
127 * dmopcode
128 */
129
130void
131acpi_dm_validate_name (
132 char *name,
133 union acpi_parse_object *op);
134
135u32
136acpi_dm_dump_name (
137 char *name);
138
139void
140acpi_dm_unicode (
141 union acpi_parse_object *op);
142
143void 105void
144acpi_dm_disassemble ( 106acpi_dm_disassemble (
145 struct acpi_walk_state *walk_state, 107 struct acpi_walk_state *walk_state,
146 union acpi_parse_object *origin, 108 union acpi_parse_object *origin,
147 u32 num_opcodes); 109 u32 num_opcodes);
148 110
149void
150acpi_dm_namestring (
151 char *name);
152
153void
154acpi_dm_display_path (
155 union acpi_parse_object *op);
156 111
112/*
113 * dmopcode
114 */
157void 115void
158acpi_dm_disassemble_one_op ( 116acpi_dm_disassemble_one_op (
159 struct acpi_walk_state *walk_state, 117 struct acpi_walk_state *walk_state,
@@ -165,18 +123,9 @@ acpi_dm_decode_internal_object (
165 union acpi_operand_object *obj_desc); 123 union acpi_operand_object *obj_desc);
166 124
167u32 125u32
168acpi_dm_block_type (
169 union acpi_parse_object *op);
170
171u32
172acpi_dm_list_type ( 126acpi_dm_list_type (
173 union acpi_parse_object *op); 127 union acpi_parse_object *op);
174 128
175acpi_status
176acpi_ps_display_object_pathname (
177 struct acpi_walk_state *walk_state,
178 union acpi_parse_object *op);
179
180void 129void
181acpi_dm_method_flags ( 130acpi_dm_method_flags (
182 union acpi_parse_object *op); 131 union acpi_parse_object *op);
@@ -197,10 +146,6 @@ void
197acpi_dm_match_op ( 146acpi_dm_match_op (
198 union acpi_parse_object *op); 147 union acpi_parse_object *op);
199 148
200void
201acpi_dm_match_keyword (
202 union acpi_parse_object *op);
203
204u8 149u8
205acpi_dm_comma_if_list_member ( 150acpi_dm_comma_if_list_member (
206 union acpi_parse_object *op); 151 union acpi_parse_object *op);
@@ -211,13 +156,25 @@ acpi_dm_comma_if_field_member (
211 156
212 157
213/* 158/*
214 * dmobject 159 * dmnames
215 */ 160 */
161u32
162acpi_dm_dump_name (
163 char *name);
164
165acpi_status
166acpi_ps_display_object_pathname (
167 struct acpi_walk_state *walk_state,
168 union acpi_parse_object *op);
216 169
217void 170void
218acpi_dm_decode_node ( 171acpi_dm_namestring (
219 struct acpi_namespace_node *node); 172 char *name);
173
220 174
175/*
176 * dmobject
177 */
221void 178void
222acpi_dm_display_internal_object ( 179acpi_dm_display_internal_object (
223 union acpi_operand_object *obj_desc, 180 union acpi_operand_object *obj_desc,
@@ -241,6 +198,16 @@ acpi_dm_dump_method_info (
241/* 198/*
242 * dmbuffer 199 * dmbuffer
243 */ 200 */
201void
202acpi_dm_disasm_byte_list (
203 u32 level,
204 u8 *byte_data,
205 u32 byte_count);
206
207void
208acpi_dm_byte_list (
209 struct acpi_op_walk_info *info,
210 union acpi_parse_object *op);
244 211
245void 212void
246acpi_is_eisa_id ( 213acpi_is_eisa_id (
@@ -262,18 +229,6 @@ acpi_dm_is_string_buffer (
262/* 229/*
263 * dmresrc 230 * dmresrc
264 */ 231 */
265
266void
267acpi_dm_disasm_byte_list (
268 u32 level,
269 u8 *byte_data,
270 u32 byte_count);
271
272void
273acpi_dm_byte_list (
274 struct acpi_op_walk_info *info,
275 union acpi_parse_object *op);
276
277void 232void
278acpi_dm_resource_descriptor ( 233acpi_dm_resource_descriptor (
279 struct acpi_op_walk_info *info, 234 struct acpi_op_walk_info *info,
@@ -296,19 +251,10 @@ void
296acpi_dm_decode_attribute ( 251acpi_dm_decode_attribute (
297 u8 attribute); 252 u8 attribute);
298 253
254
299/* 255/*
300 * dmresrcl 256 * dmresrcl
301 */ 257 */
302
303void
304acpi_dm_io_flags (
305 u8 flags);
306
307void
308acpi_dm_memory_flags (
309 u8 flags,
310 u8 specific_flags);
311
312void 258void
313acpi_dm_word_descriptor ( 259acpi_dm_word_descriptor (
314 struct asl_word_address_desc *resource, 260 struct asl_word_address_desc *resource,
@@ -373,7 +319,6 @@ acpi_dm_vendor_large_descriptor (
373/* 319/*
374 * dmresrcs 320 * dmresrcs
375 */ 321 */
376
377void 322void
378acpi_dm_irq_descriptor ( 323acpi_dm_irq_descriptor (
379 struct asl_irq_format_desc *resource, 324 struct asl_irq_format_desc *resource,
@@ -420,7 +365,6 @@ acpi_dm_vendor_small_descriptor (
420/* 365/*
421 * dmutils 366 * dmutils
422 */ 367 */
423
424void 368void
425acpi_dm_add_to_external_list ( 369acpi_dm_add_to_external_list (
426 char *path); 370 char *path);
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 237d63433581..8f5f2f71b1de 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -50,40 +50,9 @@
50#define NAMEOF_ARG_NTE "__A0" 50#define NAMEOF_ARG_NTE "__A0"
51 51
52 52
53/* Common interfaces */ 53/*
54 54 * dsopcode - support for late evaluation
55acpi_status 55 */
56acpi_ds_obj_stack_push (
57 void *object,
58 struct acpi_walk_state *walk_state);
59
60acpi_status
61acpi_ds_obj_stack_pop (
62 u32 pop_count,
63 struct acpi_walk_state *walk_state);
64
65#ifdef ACPI_FUTURE_USAGE
66void *
67acpi_ds_obj_stack_get_value (
68 u32 index,
69 struct acpi_walk_state *walk_state);
70#endif
71
72acpi_status
73acpi_ds_obj_stack_pop_object (
74 union acpi_operand_object **object,
75 struct acpi_walk_state *walk_state);
76
77
78/* dsopcode - support for late evaluation */
79
80acpi_status
81acpi_ds_execute_arguments (
82 struct acpi_namespace_node *node,
83 struct acpi_namespace_node *scope_node,
84 u32 aml_length,
85 u8 *aml_start);
86
87acpi_status 56acpi_status
88acpi_ds_get_buffer_field_arguments ( 57acpi_ds_get_buffer_field_arguments (
89 union acpi_operand_object *obj_desc); 58 union acpi_operand_object *obj_desc);
@@ -101,15 +70,6 @@ acpi_ds_get_package_arguments (
101 union acpi_operand_object *obj_desc); 70 union acpi_operand_object *obj_desc);
102 71
103acpi_status 72acpi_status
104acpi_ds_init_buffer_field (
105 u16 aml_opcode,
106 union acpi_operand_object *obj_desc,
107 union acpi_operand_object *buffer_desc,
108 union acpi_operand_object *offset_desc,
109 union acpi_operand_object *length_desc,
110 union acpi_operand_object *result_desc);
111
112acpi_status
113acpi_ds_eval_buffer_field_operands ( 73acpi_ds_eval_buffer_field_operands (
114 struct acpi_walk_state *walk_state, 74 struct acpi_walk_state *walk_state,
115 union acpi_parse_object *op); 75 union acpi_parse_object *op);
@@ -130,9 +90,9 @@ acpi_ds_initialize_region (
130 acpi_handle obj_handle); 90 acpi_handle obj_handle);
131 91
132 92
133/* dsctrl - Parser/Interpreter interface, control stack routines */ 93/*
134 94 * dsctrl - Parser/Interpreter interface, control stack routines
135 95 */
136acpi_status 96acpi_status
137acpi_ds_exec_begin_control_op ( 97acpi_ds_exec_begin_control_op (
138 struct acpi_walk_state *walk_state, 98 struct acpi_walk_state *walk_state,
@@ -144,9 +104,9 @@ acpi_ds_exec_end_control_op (
144 union acpi_parse_object *op); 104 union acpi_parse_object *op);
145 105
146 106
147/* dsexec - Parser/Interpreter interface, method execution callbacks */ 107/*
148 108 * dsexec - Parser/Interpreter interface, method execution callbacks
149 109 */
150acpi_status 110acpi_status
151acpi_ds_get_predicate_value ( 111acpi_ds_get_predicate_value (
152 struct acpi_walk_state *walk_state, 112 struct acpi_walk_state *walk_state,
@@ -162,14 +122,9 @@ acpi_ds_exec_end_op (
162 struct acpi_walk_state *state); 122 struct acpi_walk_state *state);
163 123
164 124
165/* dsfield - Parser/Interpreter interface for AML fields */ 125/*
166 126 * dsfield - Parser/Interpreter interface for AML fields
167acpi_status 127 */
168acpi_ds_get_field_names (
169 struct acpi_create_field_info *info,
170 struct acpi_walk_state *walk_state,
171 union acpi_parse_object *arg);
172
173acpi_status 128acpi_status
174acpi_ds_create_field ( 129acpi_ds_create_field (
175 union acpi_parse_object *op, 130 union acpi_parse_object *op,
@@ -199,8 +154,9 @@ acpi_ds_init_field_objects (
199 struct acpi_walk_state *walk_state); 154 struct acpi_walk_state *walk_state);
200 155
201 156
202/* dsload - Parser/Interpreter interface, namespace load callbacks */ 157/*
203 158 * dsload - Parser/Interpreter interface, namespace load callbacks
159 */
204acpi_status 160acpi_status
205acpi_ds_load1_begin_op ( 161acpi_ds_load1_begin_op (
206 struct acpi_walk_state *walk_state, 162 struct acpi_walk_state *walk_state,
@@ -225,9 +181,9 @@ acpi_ds_init_callbacks (
225 u32 pass_number); 181 u32 pass_number);
226 182
227 183
228/* dsmthdat - method data (locals/args) */ 184/*
229 185 * dsmthdat - method data (locals/args)
230 186 */
231acpi_status 187acpi_status
232acpi_ds_store_object_to_local ( 188acpi_ds_store_object_to_local (
233 u16 opcode, 189 u16 opcode,
@@ -250,14 +206,6 @@ u8
250acpi_ds_is_method_value ( 206acpi_ds_is_method_value (
251 union acpi_operand_object *obj_desc); 207 union acpi_operand_object *obj_desc);
252 208
253#ifdef ACPI_FUTURE_USAGE
254acpi_object_type
255acpi_ds_method_data_get_type (
256 u16 opcode,
257 u32 index,
258 struct acpi_walk_state *walk_state);
259#endif
260
261acpi_status 209acpi_status
262acpi_ds_method_data_get_value ( 210acpi_ds_method_data_get_value (
263 u16 opcode, 211 u16 opcode,
@@ -265,12 +213,6 @@ acpi_ds_method_data_get_value (
265 struct acpi_walk_state *walk_state, 213 struct acpi_walk_state *walk_state,
266 union acpi_operand_object **dest_desc); 214 union acpi_operand_object **dest_desc);
267 215
268void
269acpi_ds_method_data_delete_value (
270 u16 opcode,
271 u32 index,
272 struct acpi_walk_state *walk_state);
273
274acpi_status 216acpi_status
275acpi_ds_method_data_init_args ( 217acpi_ds_method_data_init_args (
276 union acpi_operand_object **params, 218 union acpi_operand_object **params,
@@ -288,16 +230,10 @@ void
288acpi_ds_method_data_init ( 230acpi_ds_method_data_init (
289 struct acpi_walk_state *walk_state); 231 struct acpi_walk_state *walk_state);
290 232
291acpi_status
292acpi_ds_method_data_set_value (
293 u16 opcode,
294 u32 index,
295 union acpi_operand_object *object,
296 struct acpi_walk_state *walk_state);
297
298
299/* dsmethod - Parser/Interpreter interface - control method parsing */
300 233
234/*
235 * dsmethod - Parser/Interpreter interface - control method parsing
236 */
301acpi_status 237acpi_status
302acpi_ds_parse_method ( 238acpi_ds_parse_method (
303 acpi_handle obj_handle); 239 acpi_handle obj_handle);
@@ -324,20 +260,18 @@ acpi_ds_begin_method_execution (
324 struct acpi_namespace_node *calling_method_node); 260 struct acpi_namespace_node *calling_method_node);
325 261
326 262
327/* dsobj - Parser/Interpreter interface - object initialization and conversion */ 263/*
328 264 * dsinit
329acpi_status 265 */
330acpi_ds_init_one_object (
331 acpi_handle obj_handle,
332 u32 level,
333 void *context,
334 void **return_value);
335
336acpi_status 266acpi_status
337acpi_ds_initialize_objects ( 267acpi_ds_initialize_objects (
338 struct acpi_table_desc *table_desc, 268 struct acpi_table_desc *table_desc,
339 struct acpi_namespace_node *start_node); 269 struct acpi_namespace_node *start_node);
340 270
271
272/*
273 * dsobject - Parser/Interpreter interface - object initialization and conversion
274 */
341acpi_status 275acpi_status
342acpi_ds_build_internal_buffer_obj ( 276acpi_ds_build_internal_buffer_obj (
343 struct acpi_walk_state *walk_state, 277 struct acpi_walk_state *walk_state,
@@ -353,12 +287,6 @@ acpi_ds_build_internal_package_obj (
353 union acpi_operand_object **obj_desc); 287 union acpi_operand_object **obj_desc);
354 288
355acpi_status 289acpi_status
356acpi_ds_build_internal_object (
357 struct acpi_walk_state *walk_state,
358 union acpi_parse_object *op,
359 union acpi_operand_object **obj_desc_ptr);
360
361acpi_status
362acpi_ds_init_object_from_op ( 290acpi_ds_init_object_from_op (
363 struct acpi_walk_state *walk_state, 291 struct acpi_walk_state *walk_state,
364 union acpi_parse_object *op, 292 union acpi_parse_object *op,
@@ -372,8 +300,9 @@ acpi_ds_create_node (
372 union acpi_parse_object *op); 300 union acpi_parse_object *op);
373 301
374 302
375/* dsutils - Parser/Interpreter interface utility routines */ 303/*
376 304 * dsutils - Parser/Interpreter interface utility routines
305 */
377void 306void
378acpi_ds_clear_implicit_return ( 307acpi_ds_clear_implicit_return (
379 struct acpi_walk_state *walk_state); 308 struct acpi_walk_state *walk_state);
@@ -418,7 +347,6 @@ acpi_ds_clear_operands (
418/* 347/*
419 * dswscope - Scope Stack manipulation 348 * dswscope - Scope Stack manipulation
420 */ 349 */
421
422acpi_status 350acpi_status
423acpi_ds_scope_stack_push ( 351acpi_ds_scope_stack_push (
424 struct acpi_namespace_node *node, 352 struct acpi_namespace_node *node,
@@ -435,7 +363,18 @@ acpi_ds_scope_stack_clear (
435 struct acpi_walk_state *walk_state); 363 struct acpi_walk_state *walk_state);
436 364
437 365
438/* dswstate - parser WALK_STATE management routines */ 366/*
367 * dswstate - parser WALK_STATE management routines
368 */
369acpi_status
370acpi_ds_obj_stack_push (
371 void *object,
372 struct acpi_walk_state *walk_state);
373
374acpi_status
375acpi_ds_obj_stack_pop (
376 u32 pop_count,
377 struct acpi_walk_state *walk_state);
439 378
440struct acpi_walk_state * 379struct acpi_walk_state *
441acpi_ds_create_walk_state ( 380acpi_ds_create_walk_state (
@@ -454,12 +393,6 @@ acpi_ds_init_aml_walk (
454 struct acpi_parameter_info *info, 393 struct acpi_parameter_info *info,
455 u32 pass_number); 394 u32 pass_number);
456 395
457#ifdef ACPI_FUTURE_USAGE
458acpi_status
459acpi_ds_obj_stack_delete_all (
460 struct acpi_walk_state *walk_state);
461#endif
462
463acpi_status 396acpi_status
464acpi_ds_obj_stack_pop_and_delete ( 397acpi_ds_obj_stack_pop_and_delete (
465 u32 pop_count, 398 u32 pop_count,
@@ -494,20 +427,8 @@ struct acpi_walk_state *
494acpi_ds_get_current_walk_state ( 427acpi_ds_get_current_walk_state (
495 struct acpi_thread_state *thread); 428 struct acpi_thread_state *thread);
496 429
497#ifdef ACPI_ENABLE_OBJECT_CACHE
498void
499acpi_ds_delete_walk_state_cache (
500 void);
501#endif
502
503#ifdef ACPI_FUTURE_USAGE 430#ifdef ACPI_FUTURE_USAGE
504acpi_status 431acpi_status
505acpi_ds_result_insert (
506 void *object,
507 u32 index,
508 struct acpi_walk_state *walk_state);
509
510acpi_status
511acpi_ds_result_remove ( 432acpi_ds_result_remove (
512 union acpi_operand_object **object, 433 union acpi_operand_object **object,
513 u32 index, 434 u32 index,
@@ -529,4 +450,10 @@ acpi_ds_result_pop_from_bottom (
529 union acpi_operand_object **object, 450 union acpi_operand_object **object,
530 struct acpi_walk_state *walk_state); 451 struct acpi_walk_state *walk_state);
531 452
453#ifdef ACPI_ENABLE_OBJECT_CACHE
454void
455acpi_ds_delete_walk_state_cache (
456 void);
457#endif
458
532#endif /* _ACDISPAT_H_ */ 459#endif /* _ACDISPAT_H_ */
diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h
index 2dec083ba1cd..61a27c8c5079 100644
--- a/include/acpi/acevents.h
+++ b/include/acpi/acevents.h
@@ -45,6 +45,9 @@
45#define __ACEVENTS_H__ 45#define __ACEVENTS_H__
46 46
47 47
48/*
49 * evevent
50 */
48acpi_status 51acpi_status
49acpi_ev_initialize_events ( 52acpi_ev_initialize_events (
50 void); 53 void);
@@ -53,28 +56,14 @@ acpi_status
53acpi_ev_install_xrupt_handlers ( 56acpi_ev_install_xrupt_handlers (
54 void); 57 void);
55 58
56
57/*
58 * Evfixed - Fixed event handling
59 */
60
61acpi_status
62acpi_ev_fixed_event_initialize (
63 void);
64
65u32 59u32
66acpi_ev_fixed_event_detect ( 60acpi_ev_fixed_event_detect (
67 void); 61 void);
68 62
69u32
70acpi_ev_fixed_event_dispatch (
71 u32 event);
72
73 63
74/* 64/*
75 * Evmisc 65 * evmisc
76 */ 66 */
77
78u8 67u8
79acpi_ev_is_notify_object ( 68acpi_ev_is_notify_object (
80 struct acpi_namespace_node *node); 69 struct acpi_namespace_node *node);
@@ -100,24 +89,10 @@ acpi_ev_queue_notify_request (
100 struct acpi_namespace_node *node, 89 struct acpi_namespace_node *node,
101 u32 notify_value); 90 u32 notify_value);
102 91
103void ACPI_SYSTEM_XFACE
104acpi_ev_notify_dispatch (
105 void *context);
106
107 92
108/* 93/*
109 * Evgpe - GPE handling and dispatch 94 * evgpe - GPE handling and dispatch
110 */ 95 */
111
112acpi_status
113acpi_ev_walk_gpe_list (
114 ACPI_GPE_CALLBACK gpe_walk_callback,
115 u32 flags);
116
117u8
118acpi_ev_valid_gpe_event (
119 struct acpi_gpe_event_info *gpe_event_info);
120
121acpi_status 96acpi_status
122acpi_ev_update_gpe_enable_masks ( 97acpi_ev_update_gpe_enable_masks (
123 struct acpi_gpe_event_info *gpe_event_info, 98 struct acpi_gpe_event_info *gpe_event_info,
@@ -137,9 +112,23 @@ acpi_ev_get_gpe_event_info (
137 acpi_handle gpe_device, 112 acpi_handle gpe_device,
138 u32 gpe_number); 113 u32 gpe_number);
139 114
115
116/*
117 * evgpeblk
118 */
119u8
120acpi_ev_valid_gpe_event (
121 struct acpi_gpe_event_info *gpe_event_info);
122
140acpi_status 123acpi_status
141acpi_ev_gpe_initialize ( 124acpi_ev_walk_gpe_list (
142 void); 125 ACPI_GPE_CALLBACK gpe_walk_callback,
126 u32 flags);
127
128acpi_status
129acpi_ev_delete_gpe_handlers (
130 struct acpi_gpe_xrupt_info *gpe_xrupt_info,
131 struct acpi_gpe_block_info *gpe_block);
143 132
144acpi_status 133acpi_status
145acpi_ev_create_gpe_block ( 134acpi_ev_create_gpe_block (
@@ -154,11 +143,6 @@ acpi_status
154acpi_ev_delete_gpe_block ( 143acpi_ev_delete_gpe_block (
155 struct acpi_gpe_block_info *gpe_block); 144 struct acpi_gpe_block_info *gpe_block);
156 145
157acpi_status
158acpi_ev_delete_gpe_handlers (
159 struct acpi_gpe_xrupt_info *gpe_xrupt_info,
160 struct acpi_gpe_block_info *gpe_block);
161
162u32 146u32
163acpi_ev_gpe_dispatch ( 147acpi_ev_gpe_dispatch (
164 struct acpi_gpe_event_info *gpe_event_info, 148 struct acpi_gpe_event_info *gpe_event_info,
@@ -177,10 +161,14 @@ acpi_status
177acpi_ev_check_for_wake_only_gpe ( 161acpi_ev_check_for_wake_only_gpe (
178 struct acpi_gpe_event_info *gpe_event_info); 162 struct acpi_gpe_event_info *gpe_event_info);
179 163
164acpi_status
165acpi_ev_gpe_initialize (
166 void);
167
168
180/* 169/*
181 * Evregion - Address Space handling 170 * evregion - Address Space handling
182 */ 171 */
183
184acpi_status 172acpi_status
185acpi_ev_install_region_handlers ( 173acpi_ev_install_region_handlers (
186 void); 174 void);
@@ -198,13 +186,6 @@ acpi_ev_address_space_dispatch (
198 void *value); 186 void *value);
199 187
200acpi_status 188acpi_status
201acpi_ev_install_handler (
202 acpi_handle obj_handle,
203 u32 level,
204 void *context,
205 void **return_value);
206
207acpi_status
208acpi_ev_attach_region ( 189acpi_ev_attach_region (
209 union acpi_operand_object *handler_obj, 190 union acpi_operand_object *handler_obj,
210 union acpi_operand_object *region_obj, 191 union acpi_operand_object *region_obj,
@@ -233,17 +214,10 @@ acpi_ev_execute_reg_method (
233 union acpi_operand_object *region_obj, 214 union acpi_operand_object *region_obj,
234 u32 function); 215 u32 function);
235 216
236acpi_status
237acpi_ev_reg_run (
238 acpi_handle obj_handle,
239 u32 level,
240 void *context,
241 void **return_value);
242 217
243/* 218/*
244 * Evregini - Region initialization and setup 219 * evregini - Region initialization and setup
245 */ 220 */
246
247acpi_status 221acpi_status
248acpi_ev_system_memory_region_setup ( 222acpi_ev_system_memory_region_setup (
249 acpi_handle handle, 223 acpi_handle handle,
@@ -293,9 +267,8 @@ acpi_ev_initialize_region (
293 267
294 268
295/* 269/*
296 * Evsci - SCI (System Control Interrupt) handling/dispatch 270 * evsci - SCI (System Control Interrupt) handling/dispatch
297 */ 271 */
298
299u32 ACPI_SYSTEM_XFACE 272u32 ACPI_SYSTEM_XFACE
300acpi_ev_gpe_xrupt_handler ( 273acpi_ev_gpe_xrupt_handler (
301 void *context); 274 void *context);
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index 53f8b50fac1a..60d737b2d70f 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -48,7 +48,6 @@
48/* 48/*
49 * Exceptions returned by external ACPI interfaces 49 * Exceptions returned by external ACPI interfaces
50 */ 50 */
51
52#define AE_CODE_ENVIRONMENTAL 0x0000 51#define AE_CODE_ENVIRONMENTAL 0x0000
53#define AE_CODE_PROGRAMMER 0x1000 52#define AE_CODE_PROGRAMMER 0x1000
54#define AE_CODE_ACPI_TABLES 0x2000 53#define AE_CODE_ACPI_TABLES 0x2000
@@ -99,6 +98,7 @@
99 98
100#define AE_CODE_ENV_MAX 0x001E 99#define AE_CODE_ENV_MAX 0x001E
101 100
101
102/* 102/*
103 * Programmer exceptions 103 * Programmer exceptions
104 */ 104 */
@@ -168,6 +168,7 @@
168 168
169#define AE_CODE_AML_MAX 0x0021 169#define AE_CODE_AML_MAX 0x0021
170 170
171
171/* 172/*
172 * Internal exceptions used for control 173 * Internal exceptions used for control
173 */ 174 */
@@ -188,6 +189,7 @@
188 189
189#ifdef DEFINE_ACPI_GLOBALS 190#ifdef DEFINE_ACPI_GLOBALS
190 191
192
191/* 193/*
192 * String versions of the exception codes above 194 * String versions of the exception codes above
193 * These strings must match the corresponding defines exactly 195 * These strings must match the corresponding defines exactly
@@ -304,5 +306,4 @@ char const *acpi_gbl_exception_names_ctrl[] =
304 306
305#endif /* ACPI GLOBALS */ 307#endif /* ACPI GLOBALS */
306 308
307
308#endif /* __ACEXCEP_H__ */ 309#endif /* __ACEXCEP_H__ */
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h
index c7f387a972cb..4946696088c3 100644
--- a/include/acpi/acglobal.h
+++ b/include/acpi/acglobal.h
@@ -146,15 +146,15 @@ ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
146ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS; 146ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS;
147ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS; 147ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;
148/* 148/*
149 * Since there may be multiple SSDTs and PSDTS, a single pointer is not 149 * Since there may be multiple SSDTs and PSDTs, a single pointer is not
150 * sufficient; Therefore, there isn't one! 150 * sufficient; Therefore, there isn't one!
151 */ 151 */
152 152
153 153
154/* 154/*
155 * Handle both ACPI 1.0 and ACPI 2.0 Integer widths 155 * Handle both ACPI 1.0 and ACPI 2.0 Integer widths:
156 * If we are running a method that exists in a 32-bit ACPI table. 156 * If we are executing a method that exists in a 32-bit ACPI table,
157 * Use only 32 bits of the Integer for conversion. 157 * use only the lower 32 bits of the (internal) 64-bit Integer.
158 */ 158 */
159ACPI_EXTERN u8 acpi_gbl_integer_bit_width; 159ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
160ACPI_EXTERN u8 acpi_gbl_integer_byte_width; 160ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
@@ -246,6 +246,7 @@ ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer;
246ACPI_EXTERN u32 acpi_gbl_deepest_nesting; 246ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
247#endif 247#endif
248 248
249
249/***************************************************************************** 250/*****************************************************************************
250 * 251 *
251 * Interpreter globals 252 * Interpreter globals
@@ -268,6 +269,7 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step;
268 269
269ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root; 270ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
270 271
272
271/***************************************************************************** 273/*****************************************************************************
272 * 274 *
273 * Hardware globals 275 * Hardware globals
@@ -298,7 +300,6 @@ ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock;
298 * 300 *
299 ****************************************************************************/ 301 ****************************************************************************/
300 302
301
302ACPI_EXTERN u8 acpi_gbl_db_output_flags; 303ACPI_EXTERN u8 acpi_gbl_db_output_flags;
303 304
304#ifdef ACPI_DISASSEMBLER 305#ifdef ACPI_DISASSEMBLER
@@ -353,5 +354,4 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
353 354
354#endif /* ACPI_DEBUGGER */ 355#endif /* ACPI_DEBUGGER */
355 356
356
357#endif /* __ACGLOBAL_H__ */ 357#endif /* __ACGLOBAL_H__ */
diff --git a/include/acpi/achware.h b/include/acpi/achware.h
index 28ad1398c159..9d63641b8e7d 100644
--- a/include/acpi/achware.h
+++ b/include/acpi/achware.h
@@ -46,22 +46,26 @@
46 46
47 47
48/* PM Timer ticks per second (HZ) */ 48/* PM Timer ticks per second (HZ) */
49
49#define PM_TIMER_FREQUENCY 3579545 50#define PM_TIMER_FREQUENCY 3579545
50 51
52/* Values for the _SST reserved method */
51 53
52/* Prototypes */ 54#define ACPI_SST_INDICATOR_OFF 0
55#define ACPI_SST_WORKING 1
56#define ACPI_SST_WAKING 2
57#define ACPI_SST_SLEEPING 3
58#define ACPI_SST_SLEEP_CONTEXT 4
53 59
54 60
55acpi_status 61/* Prototypes */
56acpi_hw_initialize (
57 void);
58 62
59acpi_status
60acpi_hw_shutdown (
61 void);
62 63
64/*
65 * hwacpi - high level functions
66 */
63acpi_status 67acpi_status
64acpi_hw_initialize_system_info ( 68acpi_hw_initialize (
65 void); 69 void);
66 70
67acpi_status 71acpi_status
@@ -72,12 +76,10 @@ u32
72acpi_hw_get_mode ( 76acpi_hw_get_mode (
73 void); 77 void);
74 78
75u32
76acpi_hw_get_mode_capabilities (
77 void);
78
79/* Register I/O Prototypes */
80 79
80/*
81 * hwregs - ACPI Register I/O
82 */
81struct acpi_bit_register_info * 83struct acpi_bit_register_info *
82acpi_hw_get_bit_register_info ( 84acpi_hw_get_bit_register_info (
83 u32 register_id); 85 u32 register_id);
@@ -111,8 +113,9 @@ acpi_hw_clear_acpi_status (
111 u32 flags); 113 u32 flags);
112 114
113 115
114/* GPE support */ 116/*
115 117 * hwgpe - GPE support
118 */
116acpi_status 119acpi_status
117acpi_hw_write_gpe_enable_reg ( 120acpi_hw_write_gpe_enable_reg (
118 struct acpi_gpe_event_info *gpe_event_info); 121 struct acpi_gpe_event_info *gpe_event_info);
@@ -131,12 +134,12 @@ acpi_hw_clear_gpe_block (
131 struct acpi_gpe_xrupt_info *gpe_xrupt_info, 134 struct acpi_gpe_xrupt_info *gpe_xrupt_info,
132 struct acpi_gpe_block_info *gpe_block); 135 struct acpi_gpe_block_info *gpe_block);
133 136
134#ifdef ACPI_FUTURE_USAGE 137#ifdef ACPI_FUTURE_USAGE
135acpi_status 138acpi_status
136acpi_hw_get_gpe_status ( 139acpi_hw_get_gpe_status (
137 struct acpi_gpe_event_info *gpe_event_info, 140 struct acpi_gpe_event_info *gpe_event_info,
138 acpi_event_status *event_status); 141 acpi_event_status *event_status);
139#endif 142#endif /* ACPI_FUTURE_USAGE */
140 143
141acpi_status 144acpi_status
142acpi_hw_disable_all_gpes ( 145acpi_hw_disable_all_gpes (
@@ -155,15 +158,11 @@ acpi_hw_enable_runtime_gpe_block (
155 struct acpi_gpe_xrupt_info *gpe_xrupt_info, 158 struct acpi_gpe_xrupt_info *gpe_xrupt_info,
156 struct acpi_gpe_block_info *gpe_block); 159 struct acpi_gpe_block_info *gpe_block);
157 160
158acpi_status
159acpi_hw_enable_wakeup_gpe_block (
160 struct acpi_gpe_xrupt_info *gpe_xrupt_info,
161 struct acpi_gpe_block_info *gpe_block);
162
163
164/* ACPI Timer prototypes */
165 161
166#ifdef ACPI_FUTURE_USAGE 162#ifdef ACPI_FUTURE_USAGE
163/*
164 * hwtimer - ACPI Timer prototypes
165 */
167acpi_status 166acpi_status
168acpi_get_timer_resolution ( 167acpi_get_timer_resolution (
169 u32 *resolution); 168 u32 *resolution);
@@ -177,6 +176,7 @@ acpi_get_timer_duration (
177 u32 start_ticks, 176 u32 start_ticks,
178 u32 end_ticks, 177 u32 end_ticks,
179 u32 *time_elapsed); 178 u32 *time_elapsed);
180#endif /* ACPI_FUTURE_USAGE */ 179#endif /* ACPI_FUTURE_USAGE */
180
181 181
182#endif /* __ACHWARE_H__ */ 182#endif /* __ACHWARE_H__ */
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h
index c5301f5ffaf4..5c7172477a0f 100644
--- a/include/acpi/acinterp.h
+++ b/include/acpi/acinterp.h
@@ -48,37 +48,9 @@
48#define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1])) 48#define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1]))
49 49
50 50
51acpi_status
52acpi_ex_resolve_operands (
53 u16 opcode,
54 union acpi_operand_object **stack_ptr,
55 struct acpi_walk_state *walk_state);
56
57acpi_status
58acpi_ex_check_object_type (
59 acpi_object_type type_needed,
60 acpi_object_type this_type,
61 void *object);
62
63/*
64 * exxface - External interpreter interfaces
65 */
66
67acpi_status
68acpi_ex_load_table (
69 acpi_table_type table_id);
70
71acpi_status
72acpi_ex_execute_method (
73 struct acpi_namespace_node *method_node,
74 union acpi_operand_object **params,
75 union acpi_operand_object **return_obj_desc);
76
77
78/* 51/*
79 * exconvrt - object conversion 52 * exconvrt - object conversion
80 */ 53 */
81
82acpi_status 54acpi_status
83acpi_ex_convert_to_integer ( 55acpi_ex_convert_to_integer (
84 union acpi_operand_object *obj_desc, 56 union acpi_operand_object *obj_desc,
@@ -110,17 +82,10 @@ acpi_ex_convert_to_target_type (
110 union acpi_operand_object **result_desc, 82 union acpi_operand_object **result_desc,
111 struct acpi_walk_state *walk_state); 83 struct acpi_walk_state *walk_state);
112 84
113u32
114acpi_ex_convert_to_ascii (
115 acpi_integer integer,
116 u16 base,
117 u8 *string,
118 u8 max_length);
119 85
120/* 86/*
121 * exfield - ACPI AML (p-code) execution - field manipulation 87 * exfield - ACPI AML (p-code) execution - field manipulation
122 */ 88 */
123
124acpi_status 89acpi_status
125acpi_ex_common_buffer_setup ( 90acpi_ex_common_buffer_setup (
126 union acpi_operand_object *obj_desc, 91 union acpi_operand_object *obj_desc,
@@ -128,42 +93,6 @@ acpi_ex_common_buffer_setup (
128 u32 *datum_count); 93 u32 *datum_count);
129 94
130acpi_status 95acpi_status
131acpi_ex_extract_from_field (
132 union acpi_operand_object *obj_desc,
133 void *buffer,
134 u32 buffer_length);
135
136acpi_status
137acpi_ex_insert_into_field (
138 union acpi_operand_object *obj_desc,
139 void *buffer,
140 u32 buffer_length);
141
142acpi_status
143acpi_ex_setup_region (
144 union acpi_operand_object *obj_desc,
145 u32 field_datum_byte_offset);
146
147acpi_status
148acpi_ex_access_region (
149 union acpi_operand_object *obj_desc,
150 u32 field_datum_byte_offset,
151 acpi_integer *value,
152 u32 read_write);
153
154u8
155acpi_ex_register_overflow (
156 union acpi_operand_object *obj_desc,
157 acpi_integer value);
158
159acpi_status
160acpi_ex_field_datum_io (
161 union acpi_operand_object *obj_desc,
162 u32 field_datum_byte_offset,
163 acpi_integer *value,
164 u32 read_write);
165
166acpi_status
167acpi_ex_write_with_update_rule ( 96acpi_ex_write_with_update_rule (
168 union acpi_operand_object *obj_desc, 97 union acpi_operand_object *obj_desc,
169 acpi_integer mask, 98 acpi_integer mask,
@@ -198,28 +127,33 @@ acpi_ex_write_data_to_field (
198 union acpi_operand_object *obj_desc, 127 union acpi_operand_object *obj_desc,
199 union acpi_operand_object **result_desc); 128 union acpi_operand_object **result_desc);
200 129
130
201/* 131/*
202 * exmisc - ACPI AML (p-code) execution - specific opcodes 132 * exfldio - low level field I/O
203 */ 133 */
204
205acpi_status 134acpi_status
206acpi_ex_opcode_3A_0T_0R ( 135acpi_ex_extract_from_field (
207 struct acpi_walk_state *walk_state); 136 union acpi_operand_object *obj_desc,
137 void *buffer,
138 u32 buffer_length);
208 139
209acpi_status 140acpi_status
210acpi_ex_opcode_3A_1T_1R ( 141acpi_ex_insert_into_field (
211 struct acpi_walk_state *walk_state); 142 union acpi_operand_object *obj_desc,
143 void *buffer,
144 u32 buffer_length);
212 145
213acpi_status 146acpi_status
214acpi_ex_opcode_6A_0T_1R ( 147acpi_ex_access_region (
215 struct acpi_walk_state *walk_state); 148 union acpi_operand_object *obj_desc,
149 u32 field_datum_byte_offset,
150 acpi_integer *value,
151 u32 read_write);
216 152
217u8
218acpi_ex_do_match (
219 u32 match_op,
220 union acpi_operand_object *package_obj,
221 union acpi_operand_object *match_obj);
222 153
154/*
155 * exmisc - misc support routines
156 */
223acpi_status 157acpi_status
224acpi_ex_get_object_reference ( 158acpi_ex_get_object_reference (
225 union acpi_operand_object *obj_desc, 159 union acpi_operand_object *obj_desc,
@@ -227,13 +161,6 @@ acpi_ex_get_object_reference (
227 struct acpi_walk_state *walk_state); 161 struct acpi_walk_state *walk_state);
228 162
229acpi_status 163acpi_status
230acpi_ex_resolve_multiple (
231 struct acpi_walk_state *walk_state,
232 union acpi_operand_object *operand,
233 acpi_object_type *return_type,
234 union acpi_operand_object **return_desc);
235
236acpi_status
237acpi_ex_concat_template ( 164acpi_ex_concat_template (
238 union acpi_operand_object *obj_desc, 165 union acpi_operand_object *obj_desc,
239 union acpi_operand_object *obj_desc2, 166 union acpi_operand_object *obj_desc2,
@@ -308,13 +235,6 @@ acpi_ex_create_method (
308/* 235/*
309 * exconfig - dynamic table load/unload 236 * exconfig - dynamic table load/unload
310 */ 237 */
311
312acpi_status
313acpi_ex_add_table (
314 struct acpi_table_header *table,
315 struct acpi_namespace_node *parent_node,
316 union acpi_operand_object **ddb_handle);
317
318acpi_status 238acpi_status
319acpi_ex_load_op ( 239acpi_ex_load_op (
320 union acpi_operand_object *obj_desc, 240 union acpi_operand_object *obj_desc,
@@ -334,7 +254,6 @@ acpi_ex_unload_table (
334/* 254/*
335 * exmutex - mutex support 255 * exmutex - mutex support
336 */ 256 */
337
338acpi_status 257acpi_status
339acpi_ex_acquire_mutex ( 258acpi_ex_acquire_mutex (
340 union acpi_operand_object *time_desc, 259 union acpi_operand_object *time_desc,
@@ -354,15 +273,10 @@ void
354acpi_ex_unlink_mutex ( 273acpi_ex_unlink_mutex (
355 union acpi_operand_object *obj_desc); 274 union acpi_operand_object *obj_desc);
356 275
357void
358acpi_ex_link_mutex (
359 union acpi_operand_object *obj_desc,
360 struct acpi_thread_state *thread);
361 276
362/* 277/*
363 * exprep - ACPI AML (p-code) execution - prep utilities 278 * exprep - ACPI AML execution - prep utilities
364 */ 279 */
365
366acpi_status 280acpi_status
367acpi_ex_prep_common_field_object ( 281acpi_ex_prep_common_field_object (
368 union acpi_operand_object *obj_desc, 282 union acpi_operand_object *obj_desc,
@@ -375,10 +289,10 @@ acpi_status
375acpi_ex_prep_field_value ( 289acpi_ex_prep_field_value (
376 struct acpi_create_field_info *info); 290 struct acpi_create_field_info *info);
377 291
292
378/* 293/*
379 * exsystem - Interface to OS services 294 * exsystem - Interface to OS services
380 */ 295 */
381
382acpi_status 296acpi_status
383acpi_ex_system_do_notify_op ( 297acpi_ex_system_do_notify_op (
384 union acpi_operand_object *value, 298 union acpi_operand_object *value,
@@ -421,9 +335,8 @@ acpi_ex_system_wait_semaphore (
421 335
422 336
423/* 337/*
424 * exmonadic - ACPI AML (p-code) execution, monadic operators 338 * exoparg1 - ACPI AML execution, 1 operand
425 */ 339 */
426
427acpi_status 340acpi_status
428acpi_ex_opcode_0A_0T_1R ( 341acpi_ex_opcode_0A_0T_1R (
429 struct acpi_walk_state *walk_state); 342 struct acpi_walk_state *walk_state);
@@ -445,9 +358,8 @@ acpi_ex_opcode_1A_1T_0R (
445 struct acpi_walk_state *walk_state); 358 struct acpi_walk_state *walk_state);
446 359
447/* 360/*
448 * exdyadic - ACPI AML (p-code) execution, dyadic operators 361 * exoparg2 - ACPI AML execution, 2 operands
449 */ 362 */
450
451acpi_status 363acpi_status
452acpi_ex_opcode_2A_0T_0R ( 364acpi_ex_opcode_2A_0T_0R (
453 struct acpi_walk_state *walk_state); 365 struct acpi_walk_state *walk_state);
@@ -466,21 +378,56 @@ acpi_ex_opcode_2A_2T_1R (
466 378
467 379
468/* 380/*
469 * exresolv - Object resolution and get value functions 381 * exoparg3 - ACPI AML execution, 3 operands
382 */
383acpi_status
384acpi_ex_opcode_3A_0T_0R (
385 struct acpi_walk_state *walk_state);
386
387acpi_status
388acpi_ex_opcode_3A_1T_1R (
389 struct acpi_walk_state *walk_state);
390
391
392/*
393 * exoparg6 - ACPI AML execution, 6 operands
470 */ 394 */
395acpi_status
396acpi_ex_opcode_6A_0T_1R (
397 struct acpi_walk_state *walk_state);
398
471 399
400/*
401 * exresolv - Object resolution and get value functions
402 */
472acpi_status 403acpi_status
473acpi_ex_resolve_to_value ( 404acpi_ex_resolve_to_value (
474 union acpi_operand_object **stack_ptr, 405 union acpi_operand_object **stack_ptr,
475 struct acpi_walk_state *walk_state); 406 struct acpi_walk_state *walk_state);
476 407
477acpi_status 408acpi_status
409acpi_ex_resolve_multiple (
410 struct acpi_walk_state *walk_state,
411 union acpi_operand_object *operand,
412 acpi_object_type *return_type,
413 union acpi_operand_object **return_desc);
414
415
416/*
417 * exresnte - resolve namespace node
418 */
419acpi_status
478acpi_ex_resolve_node_to_value ( 420acpi_ex_resolve_node_to_value (
479 struct acpi_namespace_node **stack_ptr, 421 struct acpi_namespace_node **stack_ptr,
480 struct acpi_walk_state *walk_state); 422 struct acpi_walk_state *walk_state);
481 423
424
425/*
426 * exresop - resolve operand to value
427 */
482acpi_status 428acpi_status
483acpi_ex_resolve_object_to_value ( 429acpi_ex_resolve_operands (
430 u16 opcode,
484 union acpi_operand_object **stack_ptr, 431 union acpi_operand_object **stack_ptr,
485 struct acpi_walk_state *walk_state); 432 struct acpi_walk_state *walk_state);
486 433
@@ -488,7 +435,6 @@ acpi_ex_resolve_object_to_value (
488/* 435/*
489 * exdump - Interpreter debug output routines 436 * exdump - Interpreter debug output routines
490 */ 437 */
491
492void 438void
493acpi_ex_dump_operand ( 439acpi_ex_dump_operand (
494 union acpi_operand_object *obj_desc, 440 union acpi_operand_object *obj_desc,
@@ -504,7 +450,7 @@ acpi_ex_dump_operands (
504 char *module_name, 450 char *module_name,
505 u32 line_number); 451 u32 line_number);
506 452
507#ifdef ACPI_FUTURE_USAGE 453#ifdef ACPI_FUTURE_USAGE
508void 454void
509acpi_ex_dump_object_descriptor ( 455acpi_ex_dump_object_descriptor (
510 union acpi_operand_object *object, 456 union acpi_operand_object *object,
@@ -514,46 +460,12 @@ void
514acpi_ex_dump_node ( 460acpi_ex_dump_node (
515 struct acpi_namespace_node *node, 461 struct acpi_namespace_node *node,
516 u32 flags); 462 u32 flags);
463#endif /* ACPI_FUTURE_USAGE */
517 464
518void
519acpi_ex_out_string (
520 char *title,
521 char *value);
522
523void
524acpi_ex_out_pointer (
525 char *title,
526 void *value);
527
528void
529acpi_ex_out_integer (
530 char *title,
531 u32 value);
532
533void
534acpi_ex_out_address (
535 char *title,
536 acpi_physical_address value);
537#endif /* ACPI_FUTURE_USAGE */
538 465
539/* 466/*
540 * exnames - interpreter/scanner name load/execute 467 * exnames - AML namestring support
541 */ 468 */
542
543char *
544acpi_ex_allocate_name_string (
545 u32 prefix_count,
546 u32 num_name_segs);
547
548u32
549acpi_ex_good_char (
550 u32 character);
551
552acpi_status
553acpi_ex_name_segment (
554 u8 **in_aml_address,
555 char *name_string);
556
557acpi_status 469acpi_status
558acpi_ex_get_name_string ( 470acpi_ex_get_name_string (
559 acpi_object_type data_type, 471 acpi_object_type data_type,
@@ -561,16 +473,10 @@ acpi_ex_get_name_string (
561 char **out_name_string, 473 char **out_name_string,
562 u32 *out_name_length); 474 u32 *out_name_length);
563 475
564acpi_status
565acpi_ex_do_name (
566 acpi_object_type data_type,
567 acpi_interpreter_mode load_exec_mode);
568
569 476
570/* 477/*
571 * exstore - Object store support 478 * exstore - Object store support
572 */ 479 */
573
574acpi_status 480acpi_status
575acpi_ex_store ( 481acpi_ex_store (
576 union acpi_operand_object *val_desc, 482 union acpi_operand_object *val_desc,
@@ -578,12 +484,6 @@ acpi_ex_store (
578 struct acpi_walk_state *walk_state); 484 struct acpi_walk_state *walk_state);
579 485
580acpi_status 486acpi_status
581acpi_ex_store_object_to_index (
582 union acpi_operand_object *val_desc,
583 union acpi_operand_object *dest_desc,
584 struct acpi_walk_state *walk_state);
585
586acpi_status
587acpi_ex_store_object_to_node ( 487acpi_ex_store_object_to_node (
588 union acpi_operand_object *source_desc, 488 union acpi_operand_object *source_desc,
589 struct acpi_namespace_node *node, 489 struct acpi_namespace_node *node,
@@ -593,10 +493,10 @@ acpi_ex_store_object_to_node (
593#define ACPI_IMPLICIT_CONVERSION TRUE 493#define ACPI_IMPLICIT_CONVERSION TRUE
594#define ACPI_NO_IMPLICIT_CONVERSION FALSE 494#define ACPI_NO_IMPLICIT_CONVERSION FALSE
595 495
496
596/* 497/*
597 * exstoren 498 * exstoren - resolve/store object
598 */ 499 */
599
600acpi_status 500acpi_status
601acpi_ex_resolve_object ( 501acpi_ex_resolve_object (
602 union acpi_operand_object **source_desc_ptr, 502 union acpi_operand_object **source_desc_ptr,
@@ -612,9 +512,8 @@ acpi_ex_store_object_to_object (
612 512
613 513
614/* 514/*
615 * excopy - object copy 515 * exstorob - store object - buffer/string
616 */ 516 */
617
618acpi_status 517acpi_status
619acpi_ex_store_buffer_to_buffer ( 518acpi_ex_store_buffer_to_buffer (
620 union acpi_operand_object *source_desc, 519 union acpi_operand_object *source_desc,
@@ -625,6 +524,10 @@ acpi_ex_store_string_to_string (
625 union acpi_operand_object *source_desc, 524 union acpi_operand_object *source_desc,
626 union acpi_operand_object *target_desc); 525 union acpi_operand_object *target_desc);
627 526
527
528/*
529 * excopy - object copy
530 */
628acpi_status 531acpi_status
629acpi_ex_copy_integer_to_index_field ( 532acpi_ex_copy_integer_to_index_field (
630 union acpi_operand_object *source_desc, 533 union acpi_operand_object *source_desc,
@@ -645,10 +548,10 @@ acpi_ex_copy_integer_to_buffer_field (
645 union acpi_operand_object *source_desc, 548 union acpi_operand_object *source_desc,
646 union acpi_operand_object *target_desc); 549 union acpi_operand_object *target_desc);
647 550
551
648/* 552/*
649 * exutils - interpreter/scanner utilities 553 * exutils - interpreter/scanner utilities
650 */ 554 */
651
652acpi_status 555acpi_status
653acpi_ex_enter_interpreter ( 556acpi_ex_enter_interpreter (
654 void); 557 void);
@@ -669,11 +572,6 @@ void
669acpi_ex_release_global_lock ( 572acpi_ex_release_global_lock (
670 u8 locked); 573 u8 locked);
671 574
672u32
673acpi_ex_digits_needed (
674 acpi_integer value,
675 u32 base);
676
677void 575void
678acpi_ex_eisa_id_to_string ( 576acpi_ex_eisa_id_to_string (
679 u32 numeric_id, 577 u32 numeric_id,
@@ -688,7 +586,6 @@ acpi_ex_unsigned_integer_to_string (
688/* 586/*
689 * exregion - default op_region handlers 587 * exregion - default op_region handlers
690 */ 588 */
691
692acpi_status 589acpi_status
693acpi_ex_system_memory_space_handler ( 590acpi_ex_system_memory_space_handler (
694 u32 function, 591 u32 function,
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index 01d3b4bc0c85..030e641115cb 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -72,7 +72,6 @@ typedef u32 acpi_mutex_handle;
72 * 72 *
73 * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also! 73 * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also!
74 */ 74 */
75
76#define ACPI_MTX_EXECUTE 0 75#define ACPI_MTX_EXECUTE 0
77#define ACPI_MTX_INTERPRETER 1 76#define ACPI_MTX_INTERPRETER 1
78#define ACPI_MTX_PARSER 2 77#define ACPI_MTX_PARSER 2
@@ -151,13 +150,13 @@ typedef u16 acpi_owner_id;
151#define ACPI_FIELD_DWORD_GRANULARITY 4 150#define ACPI_FIELD_DWORD_GRANULARITY 4
152#define ACPI_FIELD_QWORD_GRANULARITY 8 151#define ACPI_FIELD_QWORD_GRANULARITY 8
153 152
153
154/***************************************************************************** 154/*****************************************************************************
155 * 155 *
156 * Namespace typedefs and structs 156 * Namespace typedefs and structs
157 * 157 *
158 ****************************************************************************/ 158 ****************************************************************************/
159 159
160
161/* Operational modes of the AML interpreter/scanner */ 160/* Operational modes of the AML interpreter/scanner */
162 161
163typedef enum 162typedef enum
@@ -176,7 +175,6 @@ typedef enum
176 * data_type is used to differentiate between internal descriptors, and MUST 175 * data_type is used to differentiate between internal descriptors, and MUST
177 * be the first byte in this structure. 176 * be the first byte in this structure.
178 */ 177 */
179
180union acpi_name_union 178union acpi_name_union
181{ 179{
182 u32 integer; 180 u32 integer;
@@ -415,7 +413,6 @@ struct acpi_field_info
415 * 413 *
416 ****************************************************************************/ 414 ****************************************************************************/
417 415
418
419#define ACPI_CONTROL_NORMAL 0xC0 416#define ACPI_CONTROL_NORMAL 0xC0
420#define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1 417#define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1
421#define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2 418#define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2
@@ -424,6 +421,7 @@ struct acpi_field_info
424 421
425 422
426/* Forward declarations */ 423/* Forward declarations */
424
427struct acpi_walk_state ; 425struct acpi_walk_state ;
428struct acpi_obj_mutex; 426struct acpi_obj_mutex;
429union acpi_parse_object ; 427union acpi_parse_object ;
@@ -601,7 +599,6 @@ struct acpi_opcode_info
601 u8 type; /* Opcode type */ 599 u8 type; /* Opcode type */
602}; 600};
603 601
604
605union acpi_parse_value 602union acpi_parse_value
606{ 603{
607 acpi_integer integer; /* Integer constant (Up to 64 bits) */ 604 acpi_integer integer; /* Integer constant (Up to 64 bits) */
@@ -613,7 +610,6 @@ union acpi_parse_value
613 union acpi_parse_object *arg; /* arguments and contained ops */ 610 union acpi_parse_object *arg; /* arguments and contained ops */
614}; 611};
615 612
616
617#define ACPI_PARSE_COMMON \ 613#define ACPI_PARSE_COMMON \
618 u8 data_type; /* To differentiate various internal objs */\ 614 u8 data_type; /* To differentiate various internal objs */\
619 u8 flags; /* Type of Op */\ 615 u8 flags; /* Type of Op */\
@@ -691,7 +687,6 @@ struct acpi_parse_obj_asl
691 char parse_op_name[12]; 687 char parse_op_name[12];
692}; 688};
693 689
694
695union acpi_parse_object 690union acpi_parse_object
696{ 691{
697 struct acpi_parse_obj_common common; 692 struct acpi_parse_obj_common common;
@@ -834,7 +829,6 @@ struct acpi_bit_register_info
834 * 829 *
835 ****************************************************************************/ 830 ****************************************************************************/
836 831
837
838/* resource_type values */ 832/* resource_type values */
839 833
840#define ACPI_RESOURCE_TYPE_MEMORY_RANGE 0 834#define ACPI_RESOURCE_TYPE_MEMORY_RANGE 0
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index fcaced16b16f..09be937d2c39 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -539,11 +539,6 @@
539 539
540 540
541#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b) 541#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b)
542
543#ifdef ACPI_FUTURE_USAGE
544#define ACPI_DUMP_TABLES(a,b) acpi_ns_dump_tables(a,b)
545#endif
546
547#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) 542#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d)
548#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) 543#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a)
549#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) 544#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
@@ -596,11 +591,6 @@
596#define ACPI_DUMP_STACK_ENTRY(a) 591#define ACPI_DUMP_STACK_ENTRY(a)
597#define ACPI_DUMP_OPERANDS(a,b,c,d,e) 592#define ACPI_DUMP_OPERANDS(a,b,c,d,e)
598#define ACPI_DUMP_ENTRY(a,b) 593#define ACPI_DUMP_ENTRY(a,b)
599
600#ifdef ACPI_FUTURE_USAGE
601#define ACPI_DUMP_TABLES(a,b)
602#endif
603
604#define ACPI_DUMP_PATHNAME(a,b,c,d) 594#define ACPI_DUMP_PATHNAME(a,b,c,d)
605#define ACPI_DUMP_RESOURCE_LIST(a) 595#define ACPI_DUMP_RESOURCE_LIST(a)
606#define ACPI_DUMP_BUFFER(a,b) 596#define ACPI_DUMP_BUFFER(a,b)
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h
new file mode 100644
index 000000000000..deb7cb06f5f0
--- /dev/null
+++ b/include/acpi/acnames.h
@@ -0,0 +1,84 @@
1/******************************************************************************
2 *
3 * Name: acnames.h - Global names and strings
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 __ACNAMES_H__
45#define __ACNAMES_H__
46
47/* Method names - these methods can appear anywhere in the namespace */
48
49#define METHOD_NAME__HID "_HID"
50#define METHOD_NAME__CID "_CID"
51#define METHOD_NAME__UID "_UID"
52#define METHOD_NAME__ADR "_ADR"
53#define METHOD_NAME__INI "_INI"
54#define METHOD_NAME__STA "_STA"
55#define METHOD_NAME__REG "_REG"
56#define METHOD_NAME__SEG "_SEG"
57#define METHOD_NAME__BBN "_BBN"
58#define METHOD_NAME__PRT "_PRT"
59#define METHOD_NAME__CRS "_CRS"
60#define METHOD_NAME__PRS "_PRS"
61#define METHOD_NAME__PRW "_PRW"
62#define METHOD_NAME__SRS "_SRS"
63
64/* Method names - these methods must appear at the namespace root */
65
66#define METHOD_NAME__BFS "\\_BFS"
67#define METHOD_NAME__GTS "\\_GTS"
68#define METHOD_NAME__PTS "\\_PTS"
69#define METHOD_NAME__SST "\\_SI._SST"
70#define METHOD_NAME__WAK "\\_WAK"
71
72/* Definitions of the predefined namespace names */
73
74#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */
75#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */
76#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F /* Sys bus name is "_SB_" */
77
78#define ACPI_NS_ROOT_PATH "\\"
79#define ACPI_NS_SYSTEM_BUS "_SB_"
80
81
82#endif /* __ACNAMES_H__ */
83
84
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h
index 8b3cdc3566b1..d1b3ce80056f 100644
--- a/include/acpi/acnamesp.h
+++ b/include/acpi/acnamesp.h
@@ -57,17 +57,6 @@
57#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */ 57#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
58#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */ 58#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
59 59
60
61/* Definitions of the predefined namespace names */
62
63#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */
64#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */
65#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F /* Sys bus name is "_SB_" */
66
67#define ACPI_NS_ROOT_PATH "\\"
68#define ACPI_NS_SYSTEM_BUS "_SB_"
69
70
71/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */ 60/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */
72 61
73#define ACPI_NS_NO_UPSEARCH 0 62#define ACPI_NS_NO_UPSEARCH 0
@@ -80,10 +69,9 @@
80#define ACPI_NS_WALK_NO_UNLOCK FALSE 69#define ACPI_NS_WALK_NO_UNLOCK FALSE
81 70
82 71
83acpi_status 72/*
84acpi_ns_load_namespace ( 73 * nsinit - Namespace initialization
85 void); 74 */
86
87acpi_status 75acpi_status
88acpi_ns_initialize_objects ( 76acpi_ns_initialize_objects (
89 void); 77 void);
@@ -93,23 +81,22 @@ acpi_ns_initialize_devices (
93 void); 81 void);
94 82
95 83
96/* Namespace init - nsxfinit */ 84/*
97 85 * nsload - Namespace loading
86 */
98acpi_status 87acpi_status
99acpi_ns_init_one_device ( 88acpi_ns_load_namespace (
100 acpi_handle obj_handle, 89 void);
101 u32 nesting_level,
102 void *context,
103 void **return_value);
104 90
105acpi_status 91acpi_status
106acpi_ns_init_one_object ( 92acpi_ns_load_table (
107 acpi_handle obj_handle, 93 struct acpi_table_desc *table_desc,
108 u32 level, 94 struct acpi_namespace_node *node);
109 void *context,
110 void **return_value);
111 95
112 96
97/*
98 * nswalk - walk the namespace
99 */
113acpi_status 100acpi_status
114acpi_ns_walk_namespace ( 101acpi_ns_walk_namespace (
115 acpi_object_type type, 102 acpi_object_type type,
@@ -126,37 +113,24 @@ acpi_ns_get_next_node (
126 struct acpi_namespace_node *parent, 113 struct acpi_namespace_node *parent,
127 struct acpi_namespace_node *child); 114 struct acpi_namespace_node *child);
128 115
129void
130acpi_ns_delete_namespace_by_owner (
131 u16 table_id);
132
133
134/* Namespace loading - nsload */
135
136acpi_status
137acpi_ns_one_complete_parse (
138 u32 pass_number,
139 struct acpi_table_desc *table_desc);
140 116
117/*
118 * nsparse - table parsing
119 */
141acpi_status 120acpi_status
142acpi_ns_parse_table ( 121acpi_ns_parse_table (
143 struct acpi_table_desc *table_desc, 122 struct acpi_table_desc *table_desc,
144 struct acpi_namespace_node *scope); 123 struct acpi_namespace_node *scope);
145 124
146acpi_status 125acpi_status
147acpi_ns_load_table ( 126acpi_ns_one_complete_parse (
148 struct acpi_table_desc *table_desc, 127 u32 pass_number,
149 struct acpi_namespace_node *node); 128 struct acpi_table_desc *table_desc);
150
151acpi_status
152acpi_ns_load_table_by_type (
153 acpi_table_type table_type);
154 129
155 130
156/* 131/*
157 * Top-level namespace access - nsaccess 132 * nsaccess - Top-level namespace access
158 */ 133 */
159
160acpi_status 134acpi_status
161acpi_ns_root_initialize ( 135acpi_ns_root_initialize (
162 void); 136 void);
@@ -173,9 +147,8 @@ acpi_ns_lookup (
173 147
174 148
175/* 149/*
176 * Named object allocation/deallocation - nsalloc 150 * nsalloc - Named object allocation/deallocation
177 */ 151 */
178
179struct acpi_namespace_node * 152struct acpi_namespace_node *
180acpi_ns_create_node ( 153acpi_ns_create_node (
181 u32 name); 154 u32 name);
@@ -189,6 +162,10 @@ acpi_ns_delete_namespace_subtree (
189 struct acpi_namespace_node *parent_handle); 162 struct acpi_namespace_node *parent_handle);
190 163
191void 164void
165acpi_ns_delete_namespace_by_owner (
166 u16 table_id);
167
168void
192acpi_ns_detach_object ( 169acpi_ns_detach_object (
193 struct acpi_namespace_node *node); 170 struct acpi_namespace_node *node);
194 171
@@ -201,36 +178,16 @@ acpi_ns_compare_names (
201 char *name1, 178 char *name1,
202 char *name2); 179 char *name2);
203 180
204void
205acpi_ns_remove_reference (
206 struct acpi_namespace_node *node);
207
208 181
209/* 182/*
210 * Namespace modification - nsmodify 183 * nsdump - Namespace dump/print utilities
211 */ 184 */
212 185#ifdef ACPI_FUTURE_USAGE
213#ifdef ACPI_FUTURE_USAGE
214acpi_status
215acpi_ns_unload_namespace (
216 acpi_handle handle);
217
218acpi_status
219acpi_ns_delete_subtree (
220 acpi_handle start_handle);
221#endif
222
223
224/*
225 * Namespace dump/print utilities - nsdump
226 */
227
228#ifdef ACPI_FUTURE_USAGE
229void 186void
230acpi_ns_dump_tables ( 187acpi_ns_dump_tables (
231 acpi_handle search_base, 188 acpi_handle search_base,
232 u32 max_depth); 189 u32 max_depth);
233#endif 190#endif /* ACPI_FUTURE_USAGE */
234 191
235void 192void
236acpi_ns_dump_entry ( 193acpi_ns_dump_entry (
@@ -249,19 +206,6 @@ acpi_ns_print_pathname (
249 u32 num_segments, 206 u32 num_segments,
250 char *pathname); 207 char *pathname);
251 208
252#ifdef ACPI_FUTURE_USAGE
253acpi_status
254acpi_ns_dump_one_device (
255 acpi_handle obj_handle,
256 u32 level,
257 void *context,
258 void **return_value);
259
260void
261acpi_ns_dump_root_devices (
262 void);
263#endif /* ACPI_FUTURE_USAGE */
264
265acpi_status 209acpi_status
266acpi_ns_dump_one_object ( 210acpi_ns_dump_one_object (
267 acpi_handle obj_handle, 211 acpi_handle obj_handle,
@@ -269,7 +213,7 @@ acpi_ns_dump_one_object (
269 void *context, 213 void *context,
270 void **return_value); 214 void **return_value);
271 215
272#ifdef ACPI_FUTURE_USAGE 216#ifdef ACPI_FUTURE_USAGE
273void 217void
274acpi_ns_dump_objects ( 218acpi_ns_dump_objects (
275 acpi_object_type type, 219 acpi_object_type type,
@@ -277,13 +221,12 @@ acpi_ns_dump_objects (
277 u32 max_depth, 221 u32 max_depth,
278 u32 ownder_id, 222 u32 ownder_id,
279 acpi_handle start_handle); 223 acpi_handle start_handle);
280#endif 224#endif /* ACPI_FUTURE_USAGE */
281 225
282 226
283/* 227/*
284 * Namespace evaluation functions - nseval 228 * nseval - Namespace evaluation functions
285 */ 229 */
286
287acpi_status 230acpi_status
288acpi_ns_evaluate_by_handle ( 231acpi_ns_evaluate_by_handle (
289 struct acpi_parameter_info *info); 232 struct acpi_parameter_info *info);
@@ -298,40 +241,14 @@ acpi_ns_evaluate_relative (
298 char *pathname, 241 char *pathname,
299 struct acpi_parameter_info *info); 242 struct acpi_parameter_info *info);
300 243
301acpi_status
302acpi_ns_execute_control_method (
303 struct acpi_parameter_info *info);
304
305acpi_status
306acpi_ns_get_object_value (
307 struct acpi_parameter_info *info);
308
309
310/*
311 * Parent/Child/Peer utility functions
312 */
313
314#ifdef ACPI_FUTURE_USAGE
315acpi_name
316acpi_ns_find_parent_name (
317 struct acpi_namespace_node *node_to_search);
318#endif
319
320 244
321/* 245/*
322 * Name and Scope manipulation - nsnames 246 * nsnames - Name and Scope manipulation
323 */ 247 */
324
325u32 248u32
326acpi_ns_opens_scope ( 249acpi_ns_opens_scope (
327 acpi_object_type type); 250 acpi_object_type type);
328 251
329void
330acpi_ns_build_external_path (
331 struct acpi_namespace_node *node,
332 acpi_size size,
333 char *name_buffer);
334
335char * 252char *
336acpi_ns_get_external_pathname ( 253acpi_ns_get_external_pathname (
337 struct acpi_namespace_node *node); 254 struct acpi_namespace_node *node);
@@ -363,9 +280,8 @@ acpi_ns_get_pathname_length (
363 280
364 281
365/* 282/*
366 * Object management for namespace nodes - nsobject 283 * nsobject - Object management for namespace nodes
367 */ 284 */
368
369acpi_status 285acpi_status
370acpi_ns_attach_object ( 286acpi_ns_attach_object (
371 struct acpi_namespace_node *node, 287 struct acpi_namespace_node *node,
@@ -399,9 +315,8 @@ acpi_ns_get_attached_data (
399 315
400 316
401/* 317/*
402 * Namespace searching and entry - nssearch 318 * nssearch - Namespace searching and entry
403 */ 319 */
404
405acpi_status 320acpi_status
406acpi_ns_search_and_enter ( 321acpi_ns_search_and_enter (
407 u32 entry_name, 322 u32 entry_name,
@@ -428,17 +343,12 @@ acpi_ns_install_node (
428 343
429 344
430/* 345/*
431 * Utility functions - nsutils 346 * nsutils - Utility functions
432 */ 347 */
433
434u8 348u8
435acpi_ns_valid_root_prefix ( 349acpi_ns_valid_root_prefix (
436 char prefix); 350 char prefix);
437 351
438u8
439acpi_ns_valid_path_separator (
440 char sep);
441
442acpi_object_type 352acpi_object_type
443acpi_ns_get_type ( 353acpi_ns_get_type (
444 struct acpi_namespace_node *node); 354 struct acpi_namespace_node *node);
@@ -511,5 +421,4 @@ struct acpi_namespace_node *
511acpi_ns_get_next_valid_node ( 421acpi_ns_get_next_valid_node (
512 struct acpi_namespace_node *node); 422 struct acpi_namespace_node *node);
513 423
514
515#endif /* __ACNAMESP_H__ */ 424#endif /* __ACNAMESP_H__ */
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h
index 036023a940b2..e079b94e4fce 100644
--- a/include/acpi/acobject.h
+++ b/include/acpi/acobject.h
@@ -133,6 +133,7 @@ struct acpi_object_integer
133 acpi_integer value; 133 acpi_integer value;
134}; 134};
135 135
136
136/* 137/*
137 * Note: The String and Buffer object must be identical through the Pointer 138 * Note: The String and Buffer object must be identical through the Pointer
138 * element. There is code that depends on this. 139 * element. There is code that depends on this.
@@ -468,7 +469,6 @@ union acpi_operand_object
468 * 469 *
469 *****************************************************************************/ 470 *****************************************************************************/
470 471
471
472/* Object descriptor types */ 472/* Object descriptor types */
473 473
474#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ 474#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
diff --git a/include/acpi/acopcode.h b/include/acpi/acopcode.h
new file mode 100644
index 000000000000..118ecba4cf05
--- /dev/null
+++ b/include/acpi/acopcode.h
@@ -0,0 +1,325 @@
1/******************************************************************************
2 *
3 * Name: acopcode.h - AML opcode information for the AML parser and interpreter
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 __ACOPCODE_H__
45#define __ACOPCODE_H__
46
47#define MAX_EXTENDED_OPCODE 0x88
48#define NUM_EXTENDED_OPCODE (MAX_EXTENDED_OPCODE + 1)
49#define MAX_INTERNAL_OPCODE
50#define NUM_INTERNAL_OPCODE (MAX_INTERNAL_OPCODE + 1)
51
52/* Used for non-assigned opcodes */
53
54#define _UNK 0x6B
55
56/*
57 * Reserved ASCII characters. Do not use any of these for
58 * internal opcodes, since they are used to differentiate
59 * name strings from AML opcodes
60 */
61#define _ASC 0x6C
62#define _NAM 0x6C
63#define _PFX 0x6D
64
65
66/*
67 * All AML opcodes and the parse-time arguments for each. Used by the AML
68 * parser Each list is compressed into a 32-bit number and stored in the
69 * master opcode table (in psopcode.c).
70 */
71#define ARGP_ACCESSFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
72#define ARGP_ACQUIRE_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_WORDDATA)
73#define ARGP_ADD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
74#define ARGP_ALIAS_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_NAME)
75#define ARGP_ARG0 ARG_NONE
76#define ARGP_ARG1 ARG_NONE
77#define ARGP_ARG2 ARG_NONE
78#define ARGP_ARG3 ARG_NONE
79#define ARGP_ARG4 ARG_NONE
80#define ARGP_ARG5 ARG_NONE
81#define ARGP_ARG6 ARG_NONE
82#define ARGP_BANK_FIELD_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_TERMARG, ARGP_BYTEDATA, ARGP_FIELDLIST)
83#define ARGP_BIT_AND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
84#define ARGP_BIT_NAND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
85#define ARGP_BIT_NOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
86#define ARGP_BIT_NOT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
87#define ARGP_BIT_OR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
88#define ARGP_BIT_XOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
89#define ARGP_BREAK_OP ARG_NONE
90#define ARGP_BREAK_POINT_OP ARG_NONE
91#define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST)
92#define ARGP_BYTE_OP ARGP_LIST1 (ARGP_BYTEDATA)
93#define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING)
94#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
95#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
96#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
97#define ARGP_CONTINUE_OP ARG_NONE
98#define ARGP_COPY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SIMPLENAME)
99#define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
100#define ARGP_CREATE_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
101#define ARGP_CREATE_DWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
102#define ARGP_CREATE_FIELD_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
103#define ARGP_CREATE_QWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
104#define ARGP_CREATE_WORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
105#define ARGP_DATA_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
106#define ARGP_DEBUG_OP ARG_NONE
107#define ARGP_DECREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME)
108#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG)
109#define ARGP_DEVICE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST)
110#define ARGP_DIVIDE_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET, ARGP_TARGET)
111#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
112#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
113#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
114#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG)
115#define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST)
116#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
117#define ARGP_FIND_SET_RIGHT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
118#define ARGP_FROM_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
119#define ARGP_IF_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
120#define ARGP_INCREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME)
121#define ARGP_INDEX_FIELD_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_BYTEDATA, ARGP_FIELDLIST)
122#define ARGP_INDEX_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
123#define ARGP_LAND_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
124#define ARGP_LEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
125#define ARGP_LGREATER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
126#define ARGP_LGREATEREQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
127#define ARGP_LLESS_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
128#define ARGP_LLESSEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
129#define ARGP_LNOT_OP ARGP_LIST1 (ARGP_TERMARG)
130#define ARGP_LNOTEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
131#define ARGP_LOAD_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME)
132#define ARGP_LOAD_TABLE_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
133#define ARGP_LOCAL0 ARG_NONE
134#define ARGP_LOCAL1 ARG_NONE
135#define ARGP_LOCAL2 ARG_NONE
136#define ARGP_LOCAL3 ARG_NONE
137#define ARGP_LOCAL4 ARG_NONE
138#define ARGP_LOCAL5 ARG_NONE
139#define ARGP_LOCAL6 ARG_NONE
140#define ARGP_LOCAL7 ARG_NONE
141#define ARGP_LOR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
142#define ARGP_MATCH_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG)
143#define ARGP_METHOD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMLIST)
144#define ARGP_METHODCALL_OP ARGP_LIST1 (ARGP_NAMESTRING)
145#define ARGP_MID_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
146#define ARGP_MOD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
147#define ARGP_MULTIPLY_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
148#define ARGP_MUTEX_OP ARGP_LIST2 (ARGP_NAME, ARGP_BYTEDATA)
149#define ARGP_NAME_OP ARGP_LIST2 (ARGP_NAME, ARGP_DATAOBJ)
150#define ARGP_NAMEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
151#define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING)
152#define ARGP_NOOP_OP ARG_NONE
153#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
154#define ARGP_ONE_OP ARG_NONE
155#define ARGP_ONES_OP ARG_NONE
156#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
157#define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST)
158#define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST)
159#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA)
160#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
161#define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG)
162#define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME)
163#define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
164#define ARGP_RESET_OP ARGP_LIST1 (ARGP_SUPERNAME)
165#define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG)
166#define ARGP_REVISION_OP ARG_NONE
167#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST)
168#define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
169#define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
170#define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME)
171#define ARGP_SIZE_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
172#define ARGP_SLEEP_OP ARGP_LIST1 (ARGP_TERMARG)
173#define ARGP_STALL_OP ARGP_LIST1 (ARGP_TERMARG)
174#define ARGP_STATICSTRING_OP ARGP_LIST1 (ARGP_NAMESTRING)
175#define ARGP_STORE_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SUPERNAME)
176#define ARGP_STRING_OP ARGP_LIST1 (ARGP_CHARLIST)
177#define ARGP_SUBTRACT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
178#define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST)
179#define ARGP_TIMER_OP ARG_NONE
180#define ARGP_TO_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
181#define ARGP_TO_BUFFER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
182#define ARGP_TO_DEC_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
183#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
184#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
185#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
186#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME)
187#define ARGP_UNLOAD_OP ARGP_LIST1 (ARGP_SUPERNAME)
188#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_DATAOBJLIST)
189#define ARGP_WAIT_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
190#define ARGP_WHILE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
191#define ARGP_WORD_OP ARGP_LIST1 (ARGP_WORDDATA)
192#define ARGP_ZERO_OP ARG_NONE
193
194
195/*
196 * All AML opcodes and the runtime arguments for each. Used by the AML
197 * interpreter Each list is compressed into a 32-bit number and stored
198 * in the master opcode table (in psopcode.c).
199 *
200 * (Used by prep_operands procedure and the ASL Compiler)
201 */
202#define ARGI_ACCESSFIELD_OP ARGI_INVALID_OPCODE
203#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_INTEGER)
204#define ARGI_ADD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
205#define ARGI_ALIAS_OP ARGI_INVALID_OPCODE
206#define ARGI_ARG0 ARG_NONE
207#define ARGI_ARG1 ARG_NONE
208#define ARGI_ARG2 ARG_NONE
209#define ARGI_ARG3 ARG_NONE
210#define ARGI_ARG4 ARG_NONE
211#define ARGI_ARG5 ARG_NONE
212#define ARGI_ARG6 ARG_NONE
213#define ARGI_BANK_FIELD_OP ARGI_INVALID_OPCODE
214#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
215#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
216#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
217#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
218#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
219#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
220#define ARGI_BREAK_OP ARG_NONE
221#define ARGI_BREAK_POINT_OP ARG_NONE
222#define ARGI_BUFFER_OP ARGI_LIST1 (ARGI_INTEGER)
223#define ARGI_BYTE_OP ARGI_INVALID_OPCODE
224#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE
225#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
226#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
227#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
228#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE
229#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET)
230#define ARGI_CREATE_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
231#define ARGI_CREATE_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
232#define ARGI_CREATE_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
233#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_INTEGER, ARGI_INTEGER, ARGI_REFERENCE)
234#define ARGI_CREATE_QWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
235#define ARGI_CREATE_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
236#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING)
237#define ARGI_DEBUG_OP ARG_NONE
238#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
239#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REF_OR_STRING)
240#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE
241#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF)
242#define ARGI_DWORD_OP ARGI_INVALID_OPCODE
243#define ARGI_ELSE_OP ARGI_INVALID_OPCODE
244#define ARGI_EVENT_OP ARGI_INVALID_OPCODE
245#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
246#define ARGI_FIELD_OP ARGI_INVALID_OPCODE
247#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
248#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
249#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
250#define ARGI_IF_OP ARGI_INVALID_OPCODE
251#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
252#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE
253#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF)
254#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
255#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
256#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
257#define ARGI_LGREATEREQUAL_OP ARGI_INVALID_OPCODE
258#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
259#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE
260#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER)
261#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE
262#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF)
263#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_ANYTYPE)
264#define ARGI_LOCAL0 ARG_NONE
265#define ARGI_LOCAL1 ARG_NONE
266#define ARGI_LOCAL2 ARG_NONE
267#define ARGI_LOCAL3 ARG_NONE
268#define ARGI_LOCAL4 ARG_NONE
269#define ARGI_LOCAL5 ARG_NONE
270#define ARGI_LOCAL6 ARG_NONE
271#define ARGI_LOCAL7 ARG_NONE
272#define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
273#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_COMPUTEDATA, ARGI_INTEGER,ARGI_COMPUTEDATA,ARGI_INTEGER)
274#define ARGI_METHOD_OP ARGI_INVALID_OPCODE
275#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE
276#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
277#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
278#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
279#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE
280#define ARGI_NAME_OP ARGI_INVALID_OPCODE
281#define ARGI_NAMEDFIELD_OP ARGI_INVALID_OPCODE
282#define ARGI_NAMEPATH_OP ARGI_INVALID_OPCODE
283#define ARGI_NOOP_OP ARG_NONE
284#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
285#define ARGI_ONE_OP ARG_NONE
286#define ARGI_ONES_OP ARG_NONE
287#define ARGI_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
288#define ARGI_POWER_RES_OP ARGI_INVALID_OPCODE
289#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE
290#define ARGI_QWORD_OP ARGI_INVALID_OPCODE
291#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_OBJECT_REF)
292#define ARGI_REGION_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
293#define ARGI_RELEASE_OP ARGI_LIST1 (ARGI_MUTEX)
294#define ARGI_RESERVEDFIELD_OP ARGI_INVALID_OPCODE
295#define ARGI_RESET_OP ARGI_LIST1 (ARGI_EVENT)
296#define ARGI_RETURN_OP ARGI_INVALID_OPCODE
297#define ARGI_REVISION_OP ARG_NONE
298#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE
299#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
300#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
301#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT)
302#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT)
303#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_INTEGER)
304#define ARGI_STALL_OP ARGI_LIST1 (ARGI_INTEGER)
305#define ARGI_STATICSTRING_OP ARGI_INVALID_OPCODE
306#define ARGI_STORE_OP ARGI_LIST2 (ARGI_DATAREFOBJ, ARGI_TARGETREF)
307#define ARGI_STRING_OP ARGI_INVALID_OPCODE
308#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
309#define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE
310#define ARGI_TIMER_OP ARG_NONE
311#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
312#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
313#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
314#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
315#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
316#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET)
317#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
318#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE)
319#define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
320#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER)
321#define ARGI_WHILE_OP ARGI_INVALID_OPCODE
322#define ARGI_WORD_OP ARGI_INVALID_OPCODE
323#define ARGI_ZERO_OP ARG_NONE
324
325#endif /* __ACOPCODE_H__ */
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,
diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h
index ad53252dd42d..a69d78942040 100644
--- a/include/acpi/acpi.h
+++ b/include/acpi/acpi.h
@@ -49,6 +49,7 @@
49 * We put them here because we don't want to duplicate them 49 * We put them here because we don't want to duplicate them
50 * in the rest of the source code again and again. 50 * in the rest of the source code again and again.
51 */ 51 */
52#include "acnames.h" /* Global ACPI names and strings */
52#include "acconfig.h" /* Configuration constants */ 53#include "acconfig.h" /* Configuration constants */
53#include "platform/acenv.h" /* Target environment specific items */ 54#include "platform/acenv.h" /* Target environment specific items */
54#include "actypes.h" /* Fundamental common data types */ 55#include "actypes.h" /* Fundamental common data types */
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 857c8072eb1e..ea489f235216 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -79,7 +79,6 @@ struct acpi_signal_fatal_info
79/* 79/*
80 * OSL Initialization and shutdown primitives 80 * OSL Initialization and shutdown primitives
81 */ 81 */
82
83acpi_status 82acpi_status
84acpi_os_initialize ( 83acpi_os_initialize (
85 void); 84 void);
@@ -92,7 +91,6 @@ acpi_os_terminate (
92/* 91/*
93 * ACPI Table interfaces 92 * ACPI Table interfaces
94 */ 93 */
95
96acpi_status 94acpi_status
97acpi_os_get_root_pointer ( 95acpi_os_get_root_pointer (
98 u32 flags, 96 u32 flags,
@@ -112,7 +110,6 @@ acpi_os_table_override (
112/* 110/*
113 * Synchronization primitives 111 * Synchronization primitives
114 */ 112 */
115
116acpi_status 113acpi_status
117acpi_os_create_semaphore ( 114acpi_os_create_semaphore (
118 u32 max_units, 115 u32 max_units,
@@ -156,7 +153,6 @@ acpi_os_release_lock (
156/* 153/*
157 * Memory allocation and mapping 154 * Memory allocation and mapping
158 */ 155 */
159
160void * 156void *
161acpi_os_allocate ( 157acpi_os_allocate (
162 acpi_size size); 158 acpi_size size);
@@ -187,7 +183,6 @@ acpi_os_get_physical_address (
187/* 183/*
188 * Interrupt handlers 184 * Interrupt handlers
189 */ 185 */
190
191acpi_status 186acpi_status
192acpi_os_install_interrupt_handler ( 187acpi_os_install_interrupt_handler (
193 u32 gsi, 188 u32 gsi,
@@ -203,7 +198,6 @@ acpi_os_remove_interrupt_handler (
203/* 198/*
204 * Threads and Scheduling 199 * Threads and Scheduling
205 */ 200 */
206
207u32 201u32
208acpi_os_get_thread_id ( 202acpi_os_get_thread_id (
209 void); 203 void);
@@ -234,7 +228,6 @@ acpi_os_stall (
234/* 228/*
235 * Platform and hardware-independent I/O interfaces 229 * Platform and hardware-independent I/O interfaces
236 */ 230 */
237
238acpi_status 231acpi_status
239acpi_os_read_port ( 232acpi_os_read_port (
240 acpi_io_address address, 233 acpi_io_address address,
@@ -251,7 +244,6 @@ acpi_os_write_port (
251/* 244/*
252 * Platform and hardware-independent physical memory interfaces 245 * Platform and hardware-independent physical memory interfaces
253 */ 246 */
254
255acpi_status 247acpi_status
256acpi_os_read_memory ( 248acpi_os_read_memory (
257 acpi_physical_address address, 249 acpi_physical_address address,
@@ -270,7 +262,6 @@ acpi_os_write_memory (
270 * Note: Can't use "Register" as a parameter, changed to "Reg" -- 262 * Note: Can't use "Register" as a parameter, changed to "Reg" --
271 * certain compilers complain. 263 * certain compilers complain.
272 */ 264 */
273
274acpi_status 265acpi_status
275acpi_os_read_pci_configuration ( 266acpi_os_read_pci_configuration (
276 struct acpi_pci_id *pci_id, 267 struct acpi_pci_id *pci_id,
@@ -288,7 +279,6 @@ acpi_os_write_pci_configuration (
288/* 279/*
289 * Interim function needed for PCI IRQ routing 280 * Interim function needed for PCI IRQ routing
290 */ 281 */
291
292void 282void
293acpi_os_derive_pci_id( 283acpi_os_derive_pci_id(
294 acpi_handle rhandle, 284 acpi_handle rhandle,
@@ -298,7 +288,6 @@ acpi_os_derive_pci_id(
298/* 288/*
299 * Miscellaneous 289 * Miscellaneous
300 */ 290 */
301
302u8 291u8
303acpi_os_readable ( 292acpi_os_readable (
304 void *pointer, 293 void *pointer,
@@ -323,7 +312,6 @@ acpi_os_signal (
323/* 312/*
324 * Debug print routines 313 * Debug print routines
325 */ 314 */
326
327void ACPI_INTERNAL_VAR_XFACE 315void ACPI_INTERNAL_VAR_XFACE
328acpi_os_printf ( 316acpi_os_printf (
329 const char *format, 317 const char *format,
@@ -339,11 +327,10 @@ acpi_os_redirect_output (
339 void *destination); 327 void *destination);
340 328
341 329
330#ifdef ACPI_FUTURE_USAGE
342/* 331/*
343 * Debug input 332 * Debug input
344 */ 333 */
345
346#ifdef ACPI_FUTURE_USAGE
347u32 334u32
348acpi_os_get_line ( 335acpi_os_get_line (
349 char *buffer); 336 char *buffer);
@@ -353,7 +340,6 @@ acpi_os_get_line (
353/* 340/*
354 * Directory manipulation 341 * Directory manipulation
355 */ 342 */
356
357void * 343void *
358acpi_os_open_directory ( 344acpi_os_open_directory (
359 char *pathname, 345 char *pathname,
@@ -377,7 +363,6 @@ acpi_os_close_directory (
377/* 363/*
378 * Debug 364 * Debug
379 */ 365 */
380
381void 366void
382acpi_os_dbg_assert( 367acpi_os_dbg_assert(
383 void *failed_assertion, 368 void *failed_assertion,
@@ -385,5 +370,4 @@ acpi_os_dbg_assert(
385 u32 line_number, 370 u32 line_number,
386 char *message); 371 char *message);
387 372
388
389#endif /* __ACPIOSXF_H__ */ 373#endif /* __ACPIOSXF_H__ */
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 00d78b79652e..f8f619f8e4f8 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -50,10 +50,9 @@
50#include "actbl.h" 50#include "actbl.h"
51 51
52 52
53 /* 53/*
54 * Global interfaces 54 * Global interfaces
55 */ 55 */
56
57acpi_status 56acpi_status
58acpi_initialize_subsystem ( 57acpi_initialize_subsystem (
59 void); 58 void);
@@ -106,9 +105,8 @@ acpi_install_initialization_handler (
106#endif 105#endif
107 106
108/* 107/*
109 * ACPI Memory manager 108 * ACPI Memory managment
110 */ 109 */
111
112void * 110void *
113acpi_allocate ( 111acpi_allocate (
114 u32 size); 112 u32 size);
@@ -125,7 +123,6 @@ acpi_free (
125/* 123/*
126 * ACPI table manipulation interfaces 124 * ACPI table manipulation interfaces
127 */ 125 */
128
129acpi_status 126acpi_status
130acpi_find_root_pointer ( 127acpi_find_root_pointer (
131 u32 flags, 128 u32 flags,
@@ -168,7 +165,6 @@ acpi_get_firmware_table (
168/* 165/*
169 * Namespace and name interfaces 166 * Namespace and name interfaces
170 */ 167 */
171
172acpi_status 168acpi_status
173acpi_walk_namespace ( 169acpi_walk_namespace (
174 acpi_object_type type, 170 acpi_object_type type,
@@ -218,7 +214,6 @@ acpi_get_data (
218/* 214/*
219 * Object manipulation and enumeration 215 * Object manipulation and enumeration
220 */ 216 */
221
222acpi_status 217acpi_status
223acpi_evaluate_object ( 218acpi_evaluate_object (
224 acpi_handle object, 219 acpi_handle object,
@@ -262,7 +257,6 @@ acpi_get_parent (
262/* 257/*
263 * Event handler interfaces 258 * Event handler interfaces
264 */ 259 */
265
266acpi_status 260acpi_status
267acpi_install_fixed_event_handler ( 261acpi_install_fixed_event_handler (
268 u32 acpi_event, 262 u32 acpi_event,
@@ -319,7 +313,6 @@ acpi_install_exception_handler (
319/* 313/*
320 * Event interfaces 314 * Event interfaces
321 */ 315 */
322
323acpi_status 316acpi_status
324acpi_acquire_global_lock ( 317acpi_acquire_global_lock (
325 u16 timeout, 318 u16 timeout,
@@ -404,7 +397,6 @@ acpi_remove_gpe_block (
404/* 397/*
405 * Resource interfaces 398 * Resource interfaces
406 */ 399 */
407
408typedef 400typedef
409acpi_status (*ACPI_WALK_RESOURCE_CALLBACK) ( 401acpi_status (*ACPI_WALK_RESOURCE_CALLBACK) (
410 struct acpi_resource *resource, 402 struct acpi_resource *resource,
@@ -448,7 +440,6 @@ acpi_resource_to_address64 (
448/* 440/*
449 * Hardware (ACPI device) interfaces 441 * Hardware (ACPI device) interfaces
450 */ 442 */
451
452acpi_status 443acpi_status
453acpi_get_register ( 444acpi_get_register (
454 u32 register_id, 445 u32 register_id,
diff --git a/include/acpi/acresrc.h b/include/acpi/acresrc.h
index 93c55ff5c237..ed679264c12c 100644
--- a/include/acpi/acresrc.h
+++ b/include/acpi/acresrc.h
@@ -48,7 +48,6 @@
48/* 48/*
49 * Function prototypes called from Acpi* APIs 49 * Function prototypes called from Acpi* APIs
50 */ 50 */
51
52acpi_status 51acpi_status
53acpi_rs_get_prt_method_data ( 52acpi_rs_get_prt_method_data (
54 acpi_handle handle, 53 acpi_handle handle,
@@ -60,12 +59,12 @@ acpi_rs_get_crs_method_data (
60 acpi_handle handle, 59 acpi_handle handle,
61 struct acpi_buffer *ret_buffer); 60 struct acpi_buffer *ret_buffer);
62 61
63#ifdef ACPI_FUTURE_USAGE 62#ifdef ACPI_FUTURE_USAGE
64acpi_status 63acpi_status
65acpi_rs_get_prs_method_data ( 64acpi_rs_get_prs_method_data (
66 acpi_handle handle, 65 acpi_handle handle,
67 struct acpi_buffer *ret_buffer); 66 struct acpi_buffer *ret_buffer);
68#endif 67#endif /* ACPI_FUTURE_USAGE */
69 68
70acpi_status 69acpi_status
71acpi_rs_get_method_data ( 70acpi_rs_get_method_data (
@@ -95,61 +94,9 @@ acpi_rs_create_pci_routing_table (
95 94
96 95
97/* 96/*
98 * Function prototypes called from acpi_rs_create* 97 * rsdump
99 */ 98 */
100#ifdef ACPI_FUTURE_USAGE 99#ifdef ACPI_FUTURE_USAGE
101void
102acpi_rs_dump_irq (
103 union acpi_resource_data *data);
104
105void
106acpi_rs_dump_address16 (
107 union acpi_resource_data *data);
108
109void
110acpi_rs_dump_address32 (
111 union acpi_resource_data *data);
112
113void
114acpi_rs_dump_address64 (
115 union acpi_resource_data *data);
116
117void
118acpi_rs_dump_dma (
119 union acpi_resource_data *data);
120
121void
122acpi_rs_dump_io (
123 union acpi_resource_data *data);
124
125void
126acpi_rs_dump_extended_irq (
127 union acpi_resource_data *data);
128
129void
130acpi_rs_dump_fixed_io (
131 union acpi_resource_data *data);
132
133void
134acpi_rs_dump_fixed_memory32 (
135 union acpi_resource_data *data);
136
137void
138acpi_rs_dump_memory24 (
139 union acpi_resource_data *data);
140
141void
142acpi_rs_dump_memory32 (
143 union acpi_resource_data *data);
144
145void
146acpi_rs_dump_start_depend_fns (
147 union acpi_resource_data *data);
148
149void
150acpi_rs_dump_vendor_specific (
151 union acpi_resource_data *data);
152
153void 100void
154acpi_rs_dump_resource_list ( 101acpi_rs_dump_resource_list (
155 struct acpi_resource *resource); 102 struct acpi_resource *resource);
@@ -157,8 +104,12 @@ acpi_rs_dump_resource_list (
157void 104void
158acpi_rs_dump_irq_list ( 105acpi_rs_dump_irq_list (
159 u8 *route_table); 106 u8 *route_table);
160#endif /* ACPI_FUTURE_USAGE */ 107#endif /* ACPI_FUTURE_USAGE */
161 108
109
110/*
111 * rscalc
112 */
162acpi_status 113acpi_status
163acpi_rs_get_byte_stream_start ( 114acpi_rs_get_byte_stream_start (
164 u8 *byte_stream_buffer, 115 u8 *byte_stream_buffer,
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
index c97843f6bcbc..e6b9e36a2eda 100644
--- a/include/acpi/acstruct.h
+++ b/include/acpi/acstruct.h
@@ -56,7 +56,6 @@
56 * Walk state - current state of a parse tree walk. Used for both a leisurely stroll through 56 * Walk state - current state of a parse tree walk. Used for both a leisurely stroll through
57 * the tree (for whatever reason), and for control method execution. 57 * the tree (for whatever reason), and for control method execution.
58 */ 58 */
59
60#define ACPI_NEXT_OP_DOWNWARD 1 59#define ACPI_NEXT_OP_DOWNWARD 1
61#define ACPI_NEXT_OP_UPWARD 2 60#define ACPI_NEXT_OP_UPWARD 2
62 61
diff --git a/include/acpi/actables.h b/include/acpi/actables.h
index e8f5d4ffd452..39df92e21a0d 100644
--- a/include/acpi/actables.h
+++ b/include/acpi/actables.h
@@ -50,17 +50,9 @@
50#define SIZE_IN_HEADER 0 50#define SIZE_IN_HEADER 0
51 51
52 52
53#ifdef ACPI_FUTURE_USAGE
54acpi_status
55acpi_tb_handle_to_object (
56 u16 table_id,
57 struct acpi_table_desc **table_desc);
58#endif
59
60/* 53/*
61 * tbconvrt - Table conversion routines 54 * tbconvrt - Table conversion routines
62 */ 55 */
63
64acpi_status 56acpi_status
65acpi_tb_convert_to_xsdt ( 57acpi_tb_convert_to_xsdt (
66 struct acpi_table_desc *table_info); 58 struct acpi_table_desc *table_info);
@@ -78,10 +70,10 @@ acpi_tb_get_table_count (
78 struct rsdp_descriptor *RSDP, 70 struct rsdp_descriptor *RSDP,
79 struct acpi_table_header *RSDT); 71 struct acpi_table_header *RSDT);
80 72
73
81/* 74/*
82 * tbget - Table "get" routines 75 * tbget - Table "get" routines
83 */ 76 */
84
85acpi_status 77acpi_status
86acpi_tb_get_table ( 78acpi_tb_get_table (
87 struct acpi_pointer *address, 79 struct acpi_pointer *address,
@@ -99,17 +91,6 @@ acpi_tb_get_table_body (
99 struct acpi_table_desc *table_info); 91 struct acpi_table_desc *table_info);
100 92
101acpi_status 93acpi_status
102acpi_tb_get_this_table (
103 struct acpi_pointer *address,
104 struct acpi_table_header *header,
105 struct acpi_table_desc *table_info);
106
107acpi_status
108acpi_tb_table_override (
109 struct acpi_table_header *header,
110 struct acpi_table_desc *table_info);
111
112acpi_status
113acpi_tb_get_table_ptr ( 94acpi_tb_get_table_ptr (
114 acpi_table_type table_type, 95 acpi_table_type table_type,
115 u32 instance, 96 u32 instance,
@@ -127,36 +108,23 @@ acpi_status
127acpi_tb_validate_rsdt ( 108acpi_tb_validate_rsdt (
128 struct acpi_table_header *table_ptr); 109 struct acpi_table_header *table_ptr);
129 110
111
112/*
113 * tbgetall - get multiple required tables
114 */
130acpi_status 115acpi_status
131acpi_tb_get_required_tables ( 116acpi_tb_get_required_tables (
132 void); 117 void);
133 118
134acpi_status
135acpi_tb_get_primary_table (
136 struct acpi_pointer *address,
137 struct acpi_table_desc *table_info);
138
139acpi_status
140acpi_tb_get_secondary_table (
141 struct acpi_pointer *address,
142 acpi_string signature,
143 struct acpi_table_desc *table_info);
144 119
145/* 120/*
146 * tbinstall - Table installation 121 * tbinstall - Table installation
147 */ 122 */
148
149acpi_status 123acpi_status
150acpi_tb_install_table ( 124acpi_tb_install_table (
151 struct acpi_table_desc *table_info); 125 struct acpi_table_desc *table_info);
152 126
153acpi_status 127acpi_status
154acpi_tb_match_signature (
155 char *signature,
156 struct acpi_table_desc *table_info,
157 u8 search_type);
158
159acpi_status
160acpi_tb_recognize_table ( 128acpi_tb_recognize_table (
161 struct acpi_table_desc *table_info, 129 struct acpi_table_desc *table_info,
162 u8 search_type); 130 u8 search_type);
@@ -170,7 +138,6 @@ acpi_tb_init_table_descriptor (
170/* 138/*
171 * tbremove - Table removal and deletion 139 * tbremove - Table removal and deletion
172 */ 140 */
173
174void 141void
175acpi_tb_delete_all_tables ( 142acpi_tb_delete_all_tables (
176 void); 143 void);
@@ -189,35 +156,23 @@ acpi_tb_uninstall_table (
189 156
190 157
191/* 158/*
192 * tbrsd - RSDP, RSDT utilities 159 * tbxfroot - RSDP, RSDT utilities
193 */ 160 */
161acpi_status
162acpi_tb_find_table (
163 char *signature,
164 char *oem_id,
165 char *oem_table_id,
166 struct acpi_table_header **table_ptr);
194 167
195acpi_status 168acpi_status
196acpi_tb_get_table_rsdt ( 169acpi_tb_get_table_rsdt (
197 void); 170 void);
198 171
199u8 *
200acpi_tb_scan_memory_for_rsdp (
201 u8 *start_address,
202 u32 length);
203
204acpi_status
205acpi_tb_find_rsdp (
206 struct acpi_table_desc *table_info,
207 u32 flags);
208
209 172
210/* 173/*
211 * tbutils - common table utilities 174 * tbutils - common table utilities
212 */ 175 */
213
214acpi_status
215acpi_tb_find_table (
216 char *signature,
217 char *oem_id,
218 char *oem_table_id,
219 struct acpi_table_header **table_ptr);
220
221acpi_status 176acpi_status
222acpi_tb_verify_table_checksum ( 177acpi_tb_verify_table_checksum (
223 struct acpi_table_header *table_header); 178 struct acpi_table_header *table_header);
@@ -231,5 +186,4 @@ acpi_status
231acpi_tb_validate_table_header ( 186acpi_tb_validate_table_header (
232 struct acpi_table_header *table_header); 187 struct acpi_table_header *table_header);
233 188
234
235#endif /* __ACTABLES_H__ */ 189#endif /* __ACTABLES_H__ */
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 7eee731112b1..b5cdcca444c8 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -133,7 +133,6 @@ struct acpi_table_header /* ACPI common table header */
133#define DUAL_PIC 0 133#define DUAL_PIC 0
134#define MULTIPLE_APIC 1 134#define MULTIPLE_APIC 1
135 135
136
137/* Master MADT */ 136/* Master MADT */
138 137
139struct multiple_apic_table 138struct multiple_apic_table
@@ -144,7 +143,6 @@ struct multiple_apic_table
144 u32 reserved1 : 31; 143 u32 reserved1 : 31;
145}; 144};
146 145
147
148/* Values for Type in APIC_HEADER_DEF */ 146/* Values for Type in APIC_HEADER_DEF */
149 147
150#define APIC_PROCESSOR 0 148#define APIC_PROCESSOR 0
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 7acb550af3eb..3a451dc48ac8 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -478,7 +478,6 @@ typedef u32 acpi_object_type;
478#define ACPI_TYPE_INVALID 0x1E 478#define ACPI_TYPE_INVALID 0x1E
479#define ACPI_TYPE_NOT_FOUND 0xFF 479#define ACPI_TYPE_NOT_FOUND 0xFF
480 480
481
482/* 481/*
483 * Bitmapped ACPI types. Used internally only 482 * Bitmapped ACPI types. Used internally only
484 */ 483 */
@@ -803,7 +802,6 @@ struct acpi_system_info
803/* 802/*
804 * Types specific to the OS service interfaces 803 * Types specific to the OS service interfaces
805 */ 804 */
806
807typedef u32 805typedef u32
808(ACPI_SYSTEM_XFACE *acpi_osd_handler) ( 806(ACPI_SYSTEM_XFACE *acpi_osd_handler) (
809 void *context); 807 void *context);
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h
index 0de26b8f1028..192d0bea3884 100644
--- a/include/acpi/acutils.h
+++ b/include/acpi/acutils.h
@@ -52,13 +52,6 @@ acpi_status (*acpi_pkg_callback) (
52 union acpi_generic_state *state, 52 union acpi_generic_state *state,
53 void *context); 53 void *context);
54 54
55acpi_status
56acpi_ut_walk_package_tree (
57 union acpi_operand_object *source_object,
58 void *target_object,
59 acpi_pkg_callback walk_callback,
60 void *context);
61
62struct acpi_pkg_info 55struct acpi_pkg_info
63{ 56{
64 u8 *free_space; 57 u8 *free_space;
@@ -79,37 +72,13 @@ struct acpi_pkg_info
79#define DB_QWORD_DISPLAY 8 72#define DB_QWORD_DISPLAY 8
80 73
81 74
82/* Global initialization interfaces */
83
84void
85acpi_ut_init_globals (
86 void);
87
88void
89acpi_ut_terminate (
90 void);
91
92
93/* 75/*
94 * ut_init - miscellaneous initialization and shutdown 76 * utglobal - Global data structures and procedures
95 */ 77 */
96
97acpi_status
98acpi_ut_hardware_initialize (
99 void);
100
101void 78void
102acpi_ut_subsystem_shutdown ( 79acpi_ut_init_globals (
103 void);
104
105acpi_status
106acpi_ut_validate_fadt (
107 void); 80 void);
108 81
109/*
110 * ut_global - Global data structures and procedures
111 */
112
113#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 82#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
114 83
115char * 84char *
@@ -157,9 +126,24 @@ acpi_ut_allocate_owner_id (
157 126
158 127
159/* 128/*
160 * ut_clib - Local implementations of C library functions 129 * utinit - miscellaneous initialization and shutdown
161 */ 130 */
131acpi_status
132acpi_ut_hardware_initialize (
133 void);
162 134
135void
136acpi_ut_subsystem_shutdown (
137 void);
138
139acpi_status
140acpi_ut_validate_fadt (
141 void);
142
143
144/*
145 * utclib - Local implementations of C library functions
146 */
163#ifndef ACPI_USE_SYSTEM_CLIBRARY 147#ifndef ACPI_USE_SYSTEM_CLIBRARY
164 148
165acpi_size 149acpi_size
@@ -260,10 +244,10 @@ extern const u8 _acpi_ctype[];
260 244
261#endif /* ACPI_USE_SYSTEM_CLIBRARY */ 245#endif /* ACPI_USE_SYSTEM_CLIBRARY */
262 246
247
263/* 248/*
264 * ut_copy - Object construction and conversion interfaces 249 * utcopy - Object construction and conversion interfaces
265 */ 250 */
266
267acpi_status 251acpi_status
268acpi_ut_build_simple_object( 252acpi_ut_build_simple_object(
269 union acpi_operand_object *obj, 253 union acpi_operand_object *obj,
@@ -278,30 +262,11 @@ acpi_ut_build_package_object (
278 u32 *space_used); 262 u32 *space_used);
279 263
280acpi_status 264acpi_status
281acpi_ut_copy_ielement_to_eelement (
282 u8 object_type,
283 union acpi_operand_object *source_object,
284 union acpi_generic_state *state,
285 void *context);
286
287acpi_status
288acpi_ut_copy_ielement_to_ielement (
289 u8 object_type,
290 union acpi_operand_object *source_object,
291 union acpi_generic_state *state,
292 void *context);
293
294acpi_status
295acpi_ut_copy_iobject_to_eobject ( 265acpi_ut_copy_iobject_to_eobject (
296 union acpi_operand_object *obj, 266 union acpi_operand_object *obj,
297 struct acpi_buffer *ret_buffer); 267 struct acpi_buffer *ret_buffer);
298 268
299acpi_status 269acpi_status
300acpi_ut_copy_esimple_to_isimple(
301 union acpi_object *user_obj,
302 union acpi_operand_object **return_obj);
303
304acpi_status
305acpi_ut_copy_eobject_to_iobject ( 270acpi_ut_copy_eobject_to_iobject (
306 union acpi_object *obj, 271 union acpi_object *obj,
307 union acpi_operand_object **internal_obj); 272 union acpi_operand_object **internal_obj);
@@ -312,17 +277,6 @@ acpi_ut_copy_isimple_to_isimple (
312 union acpi_operand_object *dest_obj); 277 union acpi_operand_object *dest_obj);
313 278
314acpi_status 279acpi_status
315acpi_ut_copy_ipackage_to_ipackage (
316 union acpi_operand_object *source_obj,
317 union acpi_operand_object *dest_obj,
318 struct acpi_walk_state *walk_state);
319
320acpi_status
321acpi_ut_copy_simple_object (
322 union acpi_operand_object *source_desc,
323 union acpi_operand_object *dest_desc);
324
325acpi_status
326acpi_ut_copy_iobject_to_iobject ( 280acpi_ut_copy_iobject_to_iobject (
327 union acpi_operand_object *source_desc, 281 union acpi_operand_object *source_desc,
328 union acpi_operand_object **dest_desc, 282 union acpi_operand_object **dest_desc,
@@ -330,9 +284,8 @@ acpi_ut_copy_iobject_to_iobject (
330 284
331 285
332/* 286/*
333 * ut_create - Object creation 287 * utcreate - Object creation
334 */ 288 */
335
336acpi_status 289acpi_status
337acpi_ut_update_object_reference ( 290acpi_ut_update_object_reference (
338 union acpi_operand_object *object, 291 union acpi_operand_object *object,
@@ -340,9 +293,8 @@ acpi_ut_update_object_reference (
340 293
341 294
342/* 295/*
343 * ut_debug - Debug interfaces 296 * utdebug - Debug interfaces
344 */ 297 */
345
346void 298void
347acpi_ut_init_stack_ptr_trace ( 299acpi_ut_init_stack_ptr_trace (
348 void); 300 void);
@@ -440,11 +392,14 @@ acpi_ut_debug_print_raw (
440 392
441 393
442/* 394/*
443 * ut_delete - Object deletion 395 * utdelete - Object deletion and reference counts
444 */ 396 */
397void
398acpi_ut_add_reference (
399 union acpi_operand_object *object);
445 400
446void 401void
447acpi_ut_delete_internal_obj ( 402acpi_ut_remove_reference (
448 union acpi_operand_object *object); 403 union acpi_operand_object *object);
449 404
450void 405void
@@ -461,25 +416,8 @@ acpi_ut_delete_internal_object_list (
461 416
462 417
463/* 418/*
464 * ut_eval - object evaluation 419 * uteval - object evaluation
465 */ 420 */
466
467/* Method name strings */
468
469#define METHOD_NAME__HID "_HID"
470#define METHOD_NAME__CID "_CID"
471#define METHOD_NAME__UID "_UID"
472#define METHOD_NAME__ADR "_ADR"
473#define METHOD_NAME__STA "_STA"
474#define METHOD_NAME__REG "_REG"
475#define METHOD_NAME__SEG "_SEG"
476#define METHOD_NAME__BBN "_BBN"
477#define METHOD_NAME__PRT "_PRT"
478#define METHOD_NAME__CRS "_CRS"
479#define METHOD_NAME__PRS "_PRS"
480#define METHOD_NAME__PRW "_PRW"
481
482
483acpi_status 421acpi_status
484acpi_ut_osi_implementation ( 422acpi_ut_osi_implementation (
485 struct acpi_walk_state *walk_state); 423 struct acpi_walk_state *walk_state);
@@ -522,39 +460,10 @@ acpi_ut_execute_sxds (
522 struct acpi_namespace_node *device_node, 460 struct acpi_namespace_node *device_node,
523 u8 *highest); 461 u8 *highest);
524 462
525/*
526 * ut_mutex - mutual exclusion interfaces
527 */
528
529acpi_status
530acpi_ut_mutex_initialize (
531 void);
532
533void
534acpi_ut_mutex_terminate (
535 void);
536
537acpi_status
538acpi_ut_create_mutex (
539 acpi_mutex_handle mutex_id);
540
541acpi_status
542acpi_ut_delete_mutex (
543 acpi_mutex_handle mutex_id);
544
545acpi_status
546acpi_ut_acquire_mutex (
547 acpi_mutex_handle mutex_id);
548
549acpi_status
550acpi_ut_release_mutex (
551 acpi_mutex_handle mutex_id);
552
553 463
554/* 464/*
555 * ut_object - internal object create/delete/cache routines 465 * utobject - internal object create/delete/cache routines
556 */ 466 */
557
558union acpi_operand_object * 467union acpi_operand_object *
559acpi_ut_create_internal_object_dbg ( 468acpi_ut_create_internal_object_dbg (
560 char *module_name, 469 char *module_name,
@@ -587,50 +496,15 @@ union acpi_operand_object *
587acpi_ut_create_string_object ( 496acpi_ut_create_string_object (
588 acpi_size string_size); 497 acpi_size string_size);
589 498
590
591/*
592 * ut_ref_cnt - Object reference count management
593 */
594
595void
596acpi_ut_add_reference (
597 union acpi_operand_object *object);
598
599void
600acpi_ut_remove_reference (
601 union acpi_operand_object *object);
602
603/*
604 * ut_size - Object size routines
605 */
606
607acpi_status
608acpi_ut_get_simple_object_size (
609 union acpi_operand_object *obj,
610 acpi_size *obj_length);
611
612acpi_status
613acpi_ut_get_package_object_size (
614 union acpi_operand_object *obj,
615 acpi_size *obj_length);
616
617acpi_status 499acpi_status
618acpi_ut_get_object_size( 500acpi_ut_get_object_size(
619 union acpi_operand_object *obj, 501 union acpi_operand_object *obj,
620 acpi_size *obj_length); 502 acpi_size *obj_length);
621 503
622acpi_status
623acpi_ut_get_element_length (
624 u8 object_type,
625 union acpi_operand_object *source_object,
626 union acpi_generic_state *state,
627 void *context);
628
629 504
630/* 505/*
631 * ut_state - Generic state creation/cache routines 506 * utstate - Generic state creation/cache routines
632 */ 507 */
633
634void 508void
635acpi_ut_push_generic_state ( 509acpi_ut_push_generic_state (
636 union acpi_generic_state **list_head, 510 union acpi_generic_state **list_head,
@@ -666,14 +540,14 @@ acpi_ut_create_update_state_and_push (
666 u16 action, 540 u16 action,
667 union acpi_generic_state **state_list); 541 union acpi_generic_state **state_list);
668 542
669#ifdef ACPI_FUTURE_USAGE 543#ifdef ACPI_FUTURE_USAGE
670acpi_status 544acpi_status
671acpi_ut_create_pkg_state_and_push ( 545acpi_ut_create_pkg_state_and_push (
672 void *internal_object, 546 void *internal_object,
673 void *external_object, 547 void *external_object,
674 u16 index, 548 u16 index,
675 union acpi_generic_state **state_list); 549 union acpi_generic_state **state_list);
676#endif 550#endif /* ACPI_FUTURE_USAGE */
677 551
678union acpi_generic_state * 552union acpi_generic_state *
679acpi_ut_create_control_state ( 553acpi_ut_create_control_state (
@@ -693,15 +567,10 @@ acpi_ut_delete_object_cache (
693 void); 567 void);
694#endif 568#endif
695 569
570
696/* 571/*
697 * utmisc 572 * utmath
698 */ 573 */
699
700void
701acpi_ut_print_string (
702 char *string,
703 u8 max_length);
704
705acpi_status 574acpi_status
706acpi_ut_divide ( 575acpi_ut_divide (
707 acpi_integer in_dividend, 576 acpi_integer in_dividend,
@@ -716,6 +585,25 @@ acpi_ut_short_divide (
716 acpi_integer *out_quotient, 585 acpi_integer *out_quotient,
717 u32 *out_remainder); 586 u32 *out_remainder);
718 587
588/*
589 * utmisc
590 */
591acpi_status
592acpi_ut_walk_package_tree (
593 union acpi_operand_object *source_object,
594 void *target_object,
595 acpi_pkg_callback walk_callback,
596 void *context);
597
598char *
599acpi_ut_strupr (
600 char *src_string);
601
602void
603acpi_ut_print_string (
604 char *string,
605 u8 max_length);
606
719u8 607u8
720acpi_ut_valid_acpi_name ( 608acpi_ut_valid_acpi_name (
721 u32 name); 609 u32 name);
@@ -734,11 +622,21 @@ acpi_ut_strtoul64 (
734 622
735#define ACPI_ANY_BASE 0 623#define ACPI_ANY_BASE 0
736 624
737#ifdef ACPI_FUTURE_USAGE 625acpi_status
738char * 626acpi_ut_mutex_initialize (
739acpi_ut_strupr ( 627 void);
740 char *src_string); 628
741#endif 629void
630acpi_ut_mutex_terminate (
631 void);
632
633acpi_status
634acpi_ut_acquire_mutex (
635 acpi_mutex_handle mutex_id);
636
637acpi_status
638acpi_ut_release_mutex (
639 acpi_mutex_handle mutex_id);
742 640
743u8 * 641u8 *
744acpi_ut_get_resource_end_tag ( 642acpi_ut_get_resource_end_tag (
@@ -768,9 +666,8 @@ acpi_ut_display_init_pathname (
768 666
769 667
770/* 668/*
771 * Utalloc - memory allocation and object caching 669 * utalloc - memory allocation and object caching
772 */ 670 */
773
774void * 671void *
775acpi_ut_acquire_from_cache ( 672acpi_ut_acquire_from_cache (
776 u32 list_id); 673 u32 list_id);
@@ -795,9 +692,6 @@ acpi_ut_initialize_buffer (
795 struct acpi_buffer *buffer, 692 struct acpi_buffer *buffer,
796 acpi_size required_length); 693 acpi_size required_length);
797 694
798
799/* Memory allocation functions */
800
801void * 695void *
802acpi_ut_allocate ( 696acpi_ut_allocate (
803 acpi_size size, 697 acpi_size size,
@@ -812,9 +706,7 @@ acpi_ut_callocate (
812 char *module, 706 char *module,
813 u32 line); 707 u32 line);
814 708
815
816#ifdef ACPI_DBG_TRACK_ALLOCATIONS 709#ifdef ACPI_DBG_TRACK_ALLOCATIONS
817
818void * 710void *
819acpi_ut_allocate_and_track ( 711acpi_ut_allocate_and_track (
820 acpi_size size, 712 acpi_size size,
@@ -836,34 +728,11 @@ acpi_ut_free_and_track (
836 char *module, 728 char *module,
837 u32 line); 729 u32 line);
838 730
839struct acpi_debug_mem_block * 731#ifdef ACPI_FUTURE_USAGE
840acpi_ut_find_allocation (
841 u32 list_id,
842 void *allocation);
843
844acpi_status
845acpi_ut_track_allocation (
846 u32 list_id,
847 struct acpi_debug_mem_block *address,
848 acpi_size size,
849 u8 alloc_type,
850 u32 component,
851 char *module,
852 u32 line);
853
854acpi_status
855acpi_ut_remove_allocation (
856 u32 list_id,
857 struct acpi_debug_mem_block *address,
858 u32 component,
859 char *module,
860 u32 line);
861
862#ifdef ACPI_FUTURE_USAGE
863void 732void
864acpi_ut_dump_allocation_info ( 733acpi_ut_dump_allocation_info (
865 void); 734 void);
866#endif 735#endif /* ACPI_FUTURE_USAGE */
867 736
868void 737void
869acpi_ut_dump_allocations ( 738acpi_ut_dump_allocations (
@@ -871,5 +740,4 @@ acpi_ut_dump_allocations (
871 char *module); 740 char *module);
872#endif 741#endif
873 742
874
875#endif /* _ACUTILS_H */ 743#endif /* _ACUTILS_H */
diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h
index 2ec538eac58e..55e97ed29190 100644
--- a/include/acpi/amlcode.h
+++ b/include/acpi/amlcode.h
@@ -146,8 +146,7 @@
146 146
147/* prefixed opcodes */ 147/* prefixed opcodes */
148 148
149#define AML_EXTOP (u16) 0x005b 149#define AML_EXTOP (u16) 0x005b /* prefix for 2-byte opcodes */
150
151 150
152#define AML_MUTEX_OP (u16) 0x5b01 151#define AML_MUTEX_OP (u16) 0x5b01
153#define AML_EVENT_OP (u16) 0x5b02 152#define AML_EVENT_OP (u16) 0x5b02
@@ -194,7 +193,6 @@
194 * Use only "Unknown" AML opcodes, don't attempt to use 193 * Use only "Unknown" AML opcodes, don't attempt to use
195 * any valid ACPI ASCII values (A-Z, 0-9, '-') 194 * any valid ACPI ASCII values (A-Z, 0-9, '-')
196 */ 195 */
197
198#define AML_INT_NAMEPATH_OP (u16) 0x002d 196#define AML_INT_NAMEPATH_OP (u16) 0x002d
199#define AML_INT_NAMEDFIELD_OP (u16) 0x0030 197#define AML_INT_NAMEDFIELD_OP (u16) 0x0030
200#define AML_INT_RESERVEDFIELD_OP (u16) 0x0031 198#define AML_INT_RESERVEDFIELD_OP (u16) 0x0031
@@ -214,7 +212,6 @@
214 * There can be up to 31 unique argument types 212 * There can be up to 31 unique argument types
215 * Zero is reserved as end-of-list indicator 213 * Zero is reserved as end-of-list indicator
216 */ 214 */
217
218#define ARGP_BYTEDATA 0x01 215#define ARGP_BYTEDATA 0x01
219#define ARGP_BYTELIST 0x02 216#define ARGP_BYTELIST 0x02
220#define ARGP_CHARLIST 0x03 217#define ARGP_CHARLIST 0x03
@@ -295,7 +292,6 @@
295/* 292/*
296 * opcode groups and types 293 * opcode groups and types
297 */ 294 */
298
299#define OPGRP_NAMED 0x01 295#define OPGRP_NAMED 0x01
300#define OPGRP_FIELD 0x02 296#define OPGRP_FIELD 0x02
301#define OPGRP_BYTELIST 0x04 297#define OPGRP_BYTELIST 0x04
@@ -381,6 +377,12 @@
381#define AML_TYPE_UNDEFINED 0x19 377#define AML_TYPE_UNDEFINED 0x19
382#define AML_TYPE_BOGUS 0x1A 378#define AML_TYPE_BOGUS 0x1A
383 379
380/* AML Package Length encodings */
381
382#define ACPI_AML_PACKAGE_TYPE1 0x40
383#define ACPI_AML_PACKAGE_TYPE2 0x4000
384#define ACPI_AML_PACKAGE_TYPE3 0x400000
385#define ACPI_AML_PACKAGE_TYPE4 0x40000000
384 386
385/* 387/*
386 * Opcode classes 388 * Opcode classes
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 57bf9362335d..adf969efa510 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -198,6 +198,7 @@
198#endif 198#endif
199#endif /* !DEBUGGER_THREADING */ 199#endif /* !DEBUGGER_THREADING */
200 200
201
201/****************************************************************************** 202/******************************************************************************
202 * 203 *
203 * C library configuration 204 * C library configuration
@@ -209,7 +210,6 @@
209 * Use the standard C library headers. 210 * Use the standard C library headers.
210 * We want to keep these to a minimum. 211 * We want to keep these to a minimum.
211 */ 212 */
212
213#ifdef ACPI_USE_STANDARD_HEADERS 213#ifdef ACPI_USE_STANDARD_HEADERS
214/* 214/*
215 * Use the standard headers from the standard locations 215 * Use the standard headers from the standard locations
@@ -224,14 +224,8 @@
224/* 224/*
225 * We will be linking to the standard Clib functions 225 * We will be linking to the standard Clib functions
226 */ 226 */
227
228#define ACPI_STRSTR(s1,s2) strstr((s1), (s2)) 227#define ACPI_STRSTR(s1,s2) strstr((s1), (s2))
229#define ACPI_STRCHR(s1,c) strchr((s1), (c)) 228#define ACPI_STRCHR(s1,c) strchr((s1), (c))
230
231#ifdef ACPI_FUTURE_USAGE
232#define ACPI_STRUPR(s) (void) acpi_ut_strupr ((s))
233#endif
234
235#define ACPI_STRLEN(s) (acpi_size) strlen((s)) 229#define ACPI_STRLEN(s) (acpi_size) strlen((s))
236#define ACPI_STRCPY(d,s) (void) strcpy((d), (s)) 230#define ACPI_STRCPY(d,s) (void) strcpy((d), (s))
237#define ACPI_STRNCPY(d,s,n) (void) strncpy((d), (s), (acpi_size)(n)) 231#define ACPI_STRNCPY(d,s,n) (void) strncpy((d), (s), (acpi_size)(n))
@@ -254,14 +248,15 @@
254#define ACPI_IS_ALPHA isalpha 248#define ACPI_IS_ALPHA isalpha
255#define ACPI_IS_ASCII isascii 249#define ACPI_IS_ASCII isascii
256 250
251#else
252
257/****************************************************************************** 253/******************************************************************************
258 * 254 *
259 * Not using native C library, use local implementations 255 * Not using native C library, use local implementations
260 * 256 *
261 *****************************************************************************/ 257 *****************************************************************************/
262#else
263 258
264/* 259 /*
265 * Use local definitions of C library macros and functions 260 * Use local definitions of C library macros and functions
266 * NOTE: The function implementations may not be as efficient 261 * NOTE: The function implementations may not be as efficient
267 * as an inline or assembly code implementation provided by a 262 * as an inline or assembly code implementation provided by a
@@ -278,14 +273,12 @@ typedef char *va_list;
278/* 273/*
279 * Storage alignment properties 274 * Storage alignment properties
280 */ 275 */
281
282#define _AUPBND (sizeof (acpi_native_int) - 1) 276#define _AUPBND (sizeof (acpi_native_int) - 1)
283#define _ADNBND (sizeof (acpi_native_int) - 1) 277#define _ADNBND (sizeof (acpi_native_int) - 1)
284 278
285/* 279/*
286 * Variable argument list macro definitions 280 * Variable argument list macro definitions
287 */ 281 */
288
289#define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd))) 282#define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))
290#define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND)))) 283#define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND))))
291#define va_end(ap) (void) 0 284#define va_end(ap) (void) 0
@@ -296,11 +289,6 @@ typedef char *va_list;
296 289
297#define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2)) 290#define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2))
298#define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c)) 291#define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c))
299
300#ifdef ACPI_FUTURE_USAGE
301#define ACPI_STRUPR(s) (void) acpi_ut_strupr ((s))
302#endif
303
304#define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s)) 292#define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s))
305#define ACPI_STRCPY(d,s) (void) acpi_ut_strcpy ((d), (s)) 293#define ACPI_STRCPY(d,s) (void) acpi_ut_strcpy ((d), (s))
306#define ACPI_STRNCPY(d,s,n) (void) acpi_ut_strncpy ((d), (s), (acpi_size)(n)) 294#define ACPI_STRNCPY(d,s,n) (void) acpi_ut_strncpy ((d), (s), (acpi_size)(n))