diff options
author | Robert Moore <robert.moore@intel.com> | 2005-04-19 06:49:35 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-12 08:08:52 +0400 |
commit | 44f6c01242da4e162f28d8e1216a8c7a91174605 (patch) | |
tree | 53f724764f1bd9036dfb049a643d198125cc9edc /include | |
parent | ebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff) | |
download | linux-44f6c01242da4e162f28d8e1216a8c7a91174605.tar.xz |
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')
-rw-r--r-- | include/acpi/acconfig.h | 7 | ||||
-rw-r--r-- | include/acpi/acdebug.h | 146 | ||||
-rw-r--r-- | include/acpi/acdisasm.h | 114 | ||||
-rw-r--r-- | include/acpi/acdispat.h | 171 | ||||
-rw-r--r-- | include/acpi/acevents.h | 85 | ||||
-rw-r--r-- | include/acpi/acexcep.h | 5 | ||||
-rw-r--r-- | include/acpi/acglobal.h | 12 | ||||
-rw-r--r-- | include/acpi/achware.h | 52 | ||||
-rw-r--r-- | include/acpi/acinterp.h | 243 | ||||
-rw-r--r-- | include/acpi/aclocal.h | 10 | ||||
-rw-r--r-- | include/acpi/acmacros.h | 10 | ||||
-rw-r--r-- | include/acpi/acnames.h | 84 | ||||
-rw-r--r-- | include/acpi/acnamesp.h | 163 | ||||
-rw-r--r-- | include/acpi/acobject.h | 2 | ||||
-rw-r--r-- | include/acpi/acopcode.h | 325 | ||||
-rw-r--r-- | include/acpi/acparser.h | 134 | ||||
-rw-r--r-- | include/acpi/acpi.h | 1 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 18 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 13 | ||||
-rw-r--r-- | include/acpi/acresrc.h | 67 | ||||
-rw-r--r-- | include/acpi/acstruct.h | 1 | ||||
-rw-r--r-- | include/acpi/actables.h | 70 | ||||
-rw-r--r-- | include/acpi/actbl.h | 2 | ||||
-rw-r--r-- | include/acpi/actypes.h | 2 | ||||
-rw-r--r-- | include/acpi/acutils.h | 274 | ||||
-rw-r--r-- | include/acpi/amlcode.h | 12 | ||||
-rw-r--r-- | include/acpi/platform/acenv.h | 20 |
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 @@ /* Version string */ -#define ACPI_CA_VERSION 0x20050309 +#define ACPI_CA_VERSION 0x20050408 /* * OS name, used for the _OS object. The _OS object is essentially obsolete, @@ -130,9 +130,8 @@ #define ACPI_MAX_GPE_BLOCKS 2 #define ACPI_GPE_REGISTER_WIDTH 8 -/* - * Method info (in WALK_STATE), containing local variables and argumetns - */ +/* Method info (in WALK_STATE), containing local variables and argumetns */ + #define ACPI_METHOD_NUM_LOCALS 8 #define ACPI_METHOD_MAX_LOCAL 7 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 #define PARAM_LIST(pl) pl - #define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose) - #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\ acpi_os_printf PARAM_LIST(fp);} @@ -71,13 +69,9 @@ struct argument_info #define EX_SINGLE_STEP 2 -/* Prototypes */ - - /* * dbxface - external debugger interfaces */ - acpi_status acpi_db_initialize ( void); @@ -92,20 +86,10 @@ acpi_db_single_step ( union acpi_parse_object *op, u32 op_type); -acpi_status -acpi_db_start_command ( - struct acpi_walk_state *walk_state, - union acpi_parse_object *op); - -void -acpi_db_method_end ( - struct acpi_walk_state *walk_state); - /* * dbcmds - debug commands and output routines */ - acpi_status acpi_db_disassemble_method ( char *name); @@ -177,57 +161,30 @@ acpi_db_find_references ( char *object_arg); void -acpi_db_display_locks (void); - +acpi_db_display_locks ( + void); void acpi_db_display_resources ( char *object_arg); void -acpi_db_display_gpes (void); +acpi_db_display_gpes ( + void); void acpi_db_check_integrity ( void); -acpi_status -acpi_db_integrity_walk ( - acpi_handle obj_handle, - u32 nesting_level, - void *context, - void **return_value); - -acpi_status -acpi_db_walk_and_match_name ( - acpi_handle obj_handle, - u32 nesting_level, - void *context, - void **return_value); - -acpi_status -acpi_db_walk_for_references ( - acpi_handle obj_handle, - u32 nesting_level, - void *context, - void **return_value); - -acpi_status -acpi_db_walk_for_specific_objects ( - acpi_handle obj_handle, - u32 nesting_level, - void *context, - void **return_value); - void acpi_db_generate_gpe ( char *gpe_arg, char *block_arg); + /* * dbdisply - debug display commands */ - void acpi_db_display_method_info ( union acpi_parse_object *op); @@ -271,19 +228,10 @@ acpi_db_display_argument_object ( union acpi_operand_object *obj_desc, struct acpi_walk_state *walk_state); -void -acpi_db_dump_parser_descriptor ( - union acpi_parse_object *op); - -void * -acpi_db_get_pointer ( - void *target); - /* * dbexec - debugger control method execution */ - void acpi_db_execute ( char *name, @@ -296,44 +244,15 @@ acpi_db_create_execution_threads ( char *num_loops_arg, char *method_name_arg); -acpi_status -acpi_db_execute_method ( - struct acpi_db_method_info *info, - struct acpi_buffer *return_obj); - -void -acpi_db_execute_setup ( - struct acpi_db_method_info *info); - -u32 -acpi_db_get_outstanding_allocations ( - void); - -void ACPI_SYSTEM_XFACE -acpi_db_method_thread ( - void *context); - -acpi_status -acpi_db_execution_walk ( - acpi_handle obj_handle, - u32 nesting_level, - void *context, - void **return_value); - /* * dbfileio - Debugger file I/O commands */ - acpi_object_type acpi_db_match_argument ( char *user_argument, struct argument_info *arguments); -acpi_status -ae_local_load_table ( - struct acpi_table_header *table_ptr); - void acpi_db_close_debug_file ( void); @@ -356,16 +275,17 @@ acpi_db_read_table_from_file ( char *filename, struct acpi_table_header **table); + /* * dbhistry - debugger HISTORY command */ - void acpi_db_add_to_history ( char *command_line); void -acpi_db_display_history (void); +acpi_db_display_history ( + void); char * acpi_db_get_from_history ( @@ -375,7 +295,6 @@ acpi_db_get_from_history ( /* * dbinput - user front-end to the AML debugger */ - acpi_status acpi_db_command_dispatch ( char *input_buffer, @@ -386,71 +305,28 @@ void ACPI_SYSTEM_XFACE acpi_db_execute_thread ( void *context); -void -acpi_db_display_help ( - char *help_type); - -char * -acpi_db_get_next_token ( - char *string, - char **next); - -u32 -acpi_db_get_line ( - char *input_buffer); - -u32 -acpi_db_match_command ( - char *user_command); - -void -acpi_db_single_thread ( - void); - /* * dbstats - Generation and display of ACPI table statistics */ - void acpi_db_generate_statistics ( union acpi_parse_object *root, u8 is_method); - acpi_status acpi_db_display_statistics ( char *type_arg); -acpi_status -acpi_db_classify_one_object ( - acpi_handle obj_handle, - u32 nesting_level, - void *context, - void **return_value); - -void -acpi_db_count_namespace_objects ( - void); - -void -acpi_db_enumerate_object ( - union acpi_operand_object *obj_desc); - /* * dbutils - AML debugger utilities */ - void acpi_db_set_output_destination ( u32 where); void -acpi_db_dump_buffer ( - u32 address); - -void acpi_db_dump_object ( union acpi_object *obj_desc, u32 level); @@ -459,14 +335,8 @@ void acpi_db_prep_namestring ( char *name); - -acpi_status -acpi_db_second_pass_parse ( - union acpi_parse_object *root); - struct acpi_namespace_node * acpi_db_local_ns_lookup ( char *name); - #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) ( /* * dmwalk */ - -void -acpi_dm_walk_parse_tree ( - union acpi_parse_object *op, - asl_walk_callback descending_callback, - asl_walk_callback ascending_callback, - void *context); - -acpi_status -acpi_dm_descending_op ( - union acpi_parse_object *op, - u32 level, - void *context); - -acpi_status -acpi_dm_ascending_op ( - union acpi_parse_object *op, - u32 level, - void *context); - - -/* - * dmopcode - */ - -void -acpi_dm_validate_name ( - char *name, - union acpi_parse_object *op); - -u32 -acpi_dm_dump_name ( - char *name); - -void -acpi_dm_unicode ( - union acpi_parse_object *op); - void acpi_dm_disassemble ( struct acpi_walk_state *walk_state, union acpi_parse_object *origin, u32 num_opcodes); -void -acpi_dm_namestring ( - char *name); - -void -acpi_dm_display_path ( - union acpi_parse_object *op); +/* + * dmopcode + */ void acpi_dm_disassemble_one_op ( struct acpi_walk_state *walk_state, @@ -165,18 +123,9 @@ acpi_dm_decode_internal_object ( union acpi_operand_object *obj_desc); u32 -acpi_dm_block_type ( - union acpi_parse_object *op); - -u32 acpi_dm_list_type ( union acpi_parse_object *op); -acpi_status -acpi_ps_display_object_pathname ( - struct acpi_walk_state *walk_state, - union acpi_parse_object *op); - void acpi_dm_method_flags ( union acpi_parse_object *op); @@ -197,10 +146,6 @@ void acpi_dm_match_op ( union acpi_parse_object *op); -void -acpi_dm_match_keyword ( - union acpi_parse_object *op); - u8 acpi_dm_comma_if_list_member ( union acpi_parse_object *op); @@ -211,13 +156,25 @@ acpi_dm_comma_if_field_member ( /* - * dmobject + * dmnames */ +u32 +acpi_dm_dump_name ( + char *name); + +acpi_status +acpi_ps_display_object_pathname ( + struct acpi_walk_state *walk_state, + union acpi_parse_object *op); void -acpi_dm_decode_node ( - struct acpi_namespace_node *node); +acpi_dm_namestring ( + char *name); + +/* + * dmobject + */ void acpi_dm_display_internal_object ( union acpi_operand_object *obj_desc, @@ -241,6 +198,16 @@ acpi_dm_dump_method_info ( /* * dmbuffer */ +void +acpi_dm_disasm_byte_list ( + u32 level, + u8 *byte_data, + u32 byte_count); + +void +acpi_dm_byte_list ( + struct acpi_op_walk_info *info, + union acpi_parse_object *op); void acpi_is_eisa_id ( @@ -262,18 +229,6 @@ acpi_dm_is_string_buffer ( /* * dmresrc */ - -void -acpi_dm_disasm_byte_list ( - u32 level, - u8 *byte_data, - u32 byte_count); - -void -acpi_dm_byte_list ( - struct acpi_op_walk_info *info, - union acpi_parse_object *op); - void acpi_dm_resource_descriptor ( struct acpi_op_walk_info *info, @@ -296,19 +251,10 @@ void acpi_dm_decode_attribute ( u8 attribute); + /* * dmresrcl */ - -void -acpi_dm_io_flags ( - u8 flags); - -void -acpi_dm_memory_flags ( - u8 flags, - u8 specific_flags); - void acpi_dm_word_descriptor ( struct asl_word_address_desc *resource, @@ -373,7 +319,6 @@ acpi_dm_vendor_large_descriptor ( /* * dmresrcs */ - void acpi_dm_irq_descriptor ( struct asl_irq_format_desc *resource, @@ -420,7 +365,6 @@ acpi_dm_vendor_small_descriptor ( /* * dmutils */ - void acpi_dm_add_to_external_list ( 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 @@ #define NAMEOF_ARG_NTE "__A0" -/* Common interfaces */ - -acpi_status -acpi_ds_obj_stack_push ( - void *object, - struct acpi_walk_state *walk_state); - -acpi_status -acpi_ds_obj_stack_pop ( - u32 pop_count, - struct acpi_walk_state *walk_state); - -#ifdef ACPI_FUTURE_USAGE -void * -acpi_ds_obj_stack_get_value ( - u32 index, - struct acpi_walk_state *walk_state); -#endif - -acpi_status -acpi_ds_obj_stack_pop_object ( - union acpi_operand_object **object, - struct acpi_walk_state *walk_state); - - -/* dsopcode - support for late evaluation */ - -acpi_status -acpi_ds_execute_arguments ( - struct acpi_namespace_node *node, - struct acpi_namespace_node *scope_node, - u32 aml_length, - u8 *aml_start); - +/* + * dsopcode - support for late evaluation + */ acpi_status acpi_ds_get_buffer_field_arguments ( union acpi_operand_object *obj_desc); @@ -101,15 +70,6 @@ acpi_ds_get_package_arguments ( union acpi_operand_object *obj_desc); acpi_status -acpi_ds_init_buffer_field ( - u16 aml_opcode, - union acpi_operand_object *obj_desc, - union acpi_operand_object *buffer_desc, - union acpi_operand_object *offset_desc, - union acpi_operand_object *length_desc, - union acpi_operand_object *result_desc); - -acpi_status acpi_ds_eval_buffer_field_operands ( struct acpi_walk_state *walk_state, union acpi_parse_object *op); @@ -130,9 +90,9 @@ acpi_ds_initialize_region ( acpi_handle obj_handle); -/* dsctrl - Parser/Interpreter interface, control stack routines */ - - +/* + * dsctrl - Parser/Interpreter interface, control stack routines + */ acpi_status acpi_ds_exec_begin_control_op ( struct acpi_walk_state *walk_state, @@ -144,9 +104,9 @@ acpi_ds_exec_end_control_op ( union acpi_parse_object *op); -/* dsexec - Parser/Interpreter interface, method execution callbacks */ - - +/* + * dsexec - Parser/Interpreter interface, method execution callbacks + */ acpi_status acpi_ds_get_predicate_value ( struct acpi_walk_state *walk_state, @@ -162,14 +122,9 @@ acpi_ds_exec_end_op ( struct acpi_walk_state *state); -/* dsfield - Parser/Interpreter interface for AML fields */ - -acpi_status -acpi_ds_get_field_names ( - struct acpi_create_field_info *info, - struct acpi_walk_state *walk_state, - union acpi_parse_object *arg); - +/* + * dsfield - Parser/Interpreter interface for AML fields + */ acpi_status acpi_ds_create_field ( union acpi_parse_object *op, @@ -199,8 +154,9 @@ acpi_ds_init_field_objects ( struct acpi_walk_state *walk_state); -/* dsload - Parser/Interpreter interface, namespace load callbacks */ - +/* + * dsload - Parser/Interpreter interface, namespace load callbacks + */ acpi_status acpi_ds_load1_begin_op ( struct acpi_walk_state *walk_state, @@ -225,9 +181,9 @@ acpi_ds_init_callbacks ( u32 pass_number); -/* dsmthdat - method data (locals/args) */ - - +/* + * dsmthdat - method data (locals/args) + */ acpi_status acpi_ds_store_object_to_local ( u16 opcode, @@ -250,14 +206,6 @@ u8 acpi_ds_is_method_value ( union acpi_operand_object *obj_desc); -#ifdef ACPI_FUTURE_USAGE -acpi_object_type -acpi_ds_method_data_get_type ( - u16 opcode, - u32 index, - struct acpi_walk_state *walk_state); -#endif - acpi_status acpi_ds_method_data_get_value ( u16 opcode, @@ -265,12 +213,6 @@ acpi_ds_method_data_get_value ( struct acpi_walk_state *walk_state, union acpi_operand_object **dest_desc); -void -acpi_ds_method_data_delete_value ( - u16 opcode, - u32 index, - struct acpi_walk_state *walk_state); - acpi_status acpi_ds_method_data_init_args ( union acpi_operand_object **params, @@ -288,16 +230,10 @@ void acpi_ds_method_data_init ( struct acpi_walk_state *walk_state); -acpi_status -acpi_ds_method_data_set_value ( - u16 opcode, - u32 index, - union acpi_operand_object *object, - struct acpi_walk_state *walk_state); - - -/* dsmethod - Parser/Interpreter interface - control method parsing */ +/* + * dsmethod - Parser/Interpreter interface - control method parsing + */ acpi_status acpi_ds_parse_method ( acpi_handle obj_handle); @@ -324,20 +260,18 @@ acpi_ds_begin_method_execution ( struct acpi_namespace_node *calling_method_node); -/* dsobj - Parser/Interpreter interface - object initialization and conversion */ - -acpi_status -acpi_ds_init_one_object ( - acpi_handle obj_handle, - u32 level, - void *context, - void **return_value); - +/* + * dsinit + */ acpi_status acpi_ds_initialize_objects ( struct acpi_table_desc *table_desc, struct acpi_namespace_node *start_node); + +/* + * dsobject - Parser/Interpreter interface - object initialization and conversion + */ acpi_status acpi_ds_build_internal_buffer_obj ( struct acpi_walk_state *walk_state, @@ -353,12 +287,6 @@ acpi_ds_build_internal_package_obj ( union acpi_operand_object **obj_desc); acpi_status -acpi_ds_build_internal_object ( - struct acpi_walk_state *walk_state, - union acpi_parse_object *op, - union acpi_operand_object **obj_desc_ptr); - -acpi_status acpi_ds_init_object_from_op ( struct acpi_walk_state *walk_state, union acpi_parse_object *op, @@ -372,8 +300,9 @@ acpi_ds_create_node ( union acpi_parse_object *op); -/* dsutils - Parser/Interpreter interface utility routines */ - +/* + * dsutils - Parser/Interpreter interface utility routines + */ void acpi_ds_clear_implicit_return ( struct acpi_walk_state *walk_state); @@ -418,7 +347,6 @@ acpi_ds_clear_operands ( /* * dswscope - Scope Stack manipulation */ - acpi_status acpi_ds_scope_stack_push ( struct acpi_namespace_node *node, @@ -435,7 +363,18 @@ acpi_ds_scope_stack_clear ( struct acpi_walk_state *walk_state); -/* dswstate - parser WALK_STATE management routines */ +/* + * dswstate - parser WALK_STATE management routines + */ +acpi_status +acpi_ds_obj_stack_push ( + void *object, + struct acpi_walk_state *walk_state); + +acpi_status +acpi_ds_obj_stack_pop ( + u32 pop_count, + struct acpi_walk_state *walk_state); struct acpi_walk_state * acpi_ds_create_walk_state ( @@ -454,12 +393,6 @@ acpi_ds_init_aml_walk ( struct acpi_parameter_info *info, u32 pass_number); -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_ds_obj_stack_delete_all ( - struct acpi_walk_state *walk_state); -#endif - acpi_status acpi_ds_obj_stack_pop_and_delete ( u32 pop_count, @@ -494,20 +427,8 @@ struct acpi_walk_state * acpi_ds_get_current_walk_state ( struct acpi_thread_state *thread); -#ifdef ACPI_ENABLE_OBJECT_CACHE -void -acpi_ds_delete_walk_state_cache ( - void); -#endif - #ifdef ACPI_FUTURE_USAGE acpi_status -acpi_ds_result_insert ( - void *object, - u32 index, - struct acpi_walk_state *walk_state); - -acpi_status acpi_ds_result_remove ( union acpi_operand_object **object, u32 index, @@ -529,4 +450,10 @@ acpi_ds_result_pop_from_bottom ( union acpi_operand_object **object, struct acpi_walk_state *walk_state); +#ifdef ACPI_ENABLE_OBJECT_CACHE +void +acpi_ds_delete_walk_state_cache ( + void); +#endif + #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 @@ #define __ACEVENTS_H__ +/* + * evevent + */ acpi_status acpi_ev_initialize_events ( void); @@ -53,28 +56,14 @@ acpi_status acpi_ev_install_xrupt_handlers ( void); - -/* - * Evfixed - Fixed event handling - */ - -acpi_status -acpi_ev_fixed_event_initialize ( - void); - u32 acpi_ev_fixed_event_detect ( void); -u32 -acpi_ev_fixed_event_dispatch ( - u32 event); - /* - * Evmisc + * evmisc */ - u8 acpi_ev_is_notify_object ( struct acpi_namespace_node *node); @@ -100,24 +89,10 @@ acpi_ev_queue_notify_request ( struct acpi_namespace_node *node, u32 notify_value); -void ACPI_SYSTEM_XFACE -acpi_ev_notify_dispatch ( - void *context); - /* - * Evgpe - GPE handling and dispatch + * evgpe - GPE handling and dispatch */ - -acpi_status -acpi_ev_walk_gpe_list ( - ACPI_GPE_CALLBACK gpe_walk_callback, - u32 flags); - -u8 -acpi_ev_valid_gpe_event ( - struct acpi_gpe_event_info *gpe_event_info); - acpi_status acpi_ev_update_gpe_enable_masks ( struct acpi_gpe_event_info *gpe_event_info, @@ -137,9 +112,23 @@ acpi_ev_get_gpe_event_info ( acpi_handle gpe_device, u32 gpe_number); + +/* + * evgpeblk + */ +u8 +acpi_ev_valid_gpe_event ( + struct acpi_gpe_event_info *gpe_event_info); + acpi_status -acpi_ev_gpe_initialize ( - void); +acpi_ev_walk_gpe_list ( + ACPI_GPE_CALLBACK gpe_walk_callback, + u32 flags); + +acpi_status +acpi_ev_delete_gpe_handlers ( + struct acpi_gpe_xrupt_info *gpe_xrupt_info, + struct acpi_gpe_block_info *gpe_block); acpi_status acpi_ev_create_gpe_block ( @@ -154,11 +143,6 @@ acpi_status acpi_ev_delete_gpe_block ( struct acpi_gpe_block_info *gpe_block); -acpi_status -acpi_ev_delete_gpe_handlers ( - struct acpi_gpe_xrupt_info *gpe_xrupt_info, - struct acpi_gpe_block_info *gpe_block); - u32 acpi_ev_gpe_dispatch ( struct acpi_gpe_event_info *gpe_event_info, @@ -177,10 +161,14 @@ acpi_status acpi_ev_check_for_wake_only_gpe ( struct acpi_gpe_event_info *gpe_event_info); +acpi_status +acpi_ev_gpe_initialize ( + void); + + /* - * Evregion - Address Space handling + * evregion - Address Space handling */ - acpi_status acpi_ev_install_region_handlers ( void); @@ -198,13 +186,6 @@ acpi_ev_address_space_dispatch ( void *value); acpi_status -acpi_ev_install_handler ( - acpi_handle obj_handle, - u32 level, - void *context, - void **return_value); - -acpi_status acpi_ev_attach_region ( union acpi_operand_object *handler_obj, union acpi_operand_object *region_obj, @@ -233,17 +214,10 @@ acpi_ev_execute_reg_method ( union acpi_operand_object *region_obj, u32 function); -acpi_status -acpi_ev_reg_run ( - acpi_handle obj_handle, - u32 level, - void *context, - void **return_value); /* - * Evregini - Region initialization and setup + * evregini - Region initialization and setup */ - acpi_status acpi_ev_system_memory_region_setup ( acpi_handle handle, @@ -293,9 +267,8 @@ acpi_ev_initialize_region ( /* - * Evsci - SCI (System Control Interrupt) handling/dispatch + * evsci - SCI (System Control Interrupt) handling/dispatch */ - u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler ( 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 @@ /* * Exceptions returned by external ACPI interfaces */ - #define AE_CODE_ENVIRONMENTAL 0x0000 #define AE_CODE_PROGRAMMER 0x1000 #define AE_CODE_ACPI_TABLES 0x2000 @@ -99,6 +98,7 @@ #define AE_CODE_ENV_MAX 0x001E + /* * Programmer exceptions */ @@ -168,6 +168,7 @@ #define AE_CODE_AML_MAX 0x0021 + /* * Internal exceptions used for control */ @@ -188,6 +189,7 @@ #ifdef DEFINE_ACPI_GLOBALS + /* * String versions of the exception codes above * These strings must match the corresponding defines exactly @@ -304,5 +306,4 @@ char const *acpi_gbl_exception_names_ctrl[] = #endif /* ACPI GLOBALS */ - #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; ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS; ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS; /* - * Since there may be multiple SSDTs and PSDTS, a single pointer is not + * Since there may be multiple SSDTs and PSDTs, a single pointer is not * sufficient; Therefore, there isn't one! */ /* - * Handle both ACPI 1.0 and ACPI 2.0 Integer widths - * If we are running a method that exists in a 32-bit ACPI table. - * Use only 32 bits of the Integer for conversion. + * Handle both ACPI 1.0 and ACPI 2.0 Integer widths: + * If we are executing a method that exists in a 32-bit ACPI table, + * use only the lower 32 bits of the (internal) 64-bit Integer. */ ACPI_EXTERN u8 acpi_gbl_integer_bit_width; ACPI_EXTERN u8 acpi_gbl_integer_byte_width; @@ -246,6 +246,7 @@ ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer; ACPI_EXTERN u32 acpi_gbl_deepest_nesting; #endif + /***************************************************************************** * * Interpreter globals @@ -268,6 +269,7 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step; ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root; + /***************************************************************************** * * Hardware globals @@ -298,7 +300,6 @@ ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock; * ****************************************************************************/ - ACPI_EXTERN u8 acpi_gbl_db_output_flags; #ifdef ACPI_DISASSEMBLER @@ -353,5 +354,4 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects; #endif /* ACPI_DEBUGGER */ - #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 @@ /* PM Timer ticks per second (HZ) */ + #define PM_TIMER_FREQUENCY 3579545 +/* Values for the _SST reserved method */ -/* Prototypes */ +#define ACPI_SST_INDICATOR_OFF 0 +#define ACPI_SST_WORKING 1 +#define ACPI_SST_WAKING 2 +#define ACPI_SST_SLEEPING 3 +#define ACPI_SST_SLEEP_CONTEXT 4 -acpi_status -acpi_hw_initialize ( - void); +/* Prototypes */ -acpi_status -acpi_hw_shutdown ( - void); +/* + * hwacpi - high level functions + */ acpi_status -acpi_hw_initialize_system_info ( +acpi_hw_initialize ( void); acpi_status @@ -72,12 +76,10 @@ u32 acpi_hw_get_mode ( void); -u32 -acpi_hw_get_mode_capabilities ( - void); - -/* Register I/O Prototypes */ +/* + * hwregs - ACPI Register I/O + */ struct acpi_bit_register_info * acpi_hw_get_bit_register_info ( u32 register_id); @@ -111,8 +113,9 @@ acpi_hw_clear_acpi_status ( u32 flags); -/* GPE support */ - +/* + * hwgpe - GPE support + */ acpi_status acpi_hw_write_gpe_enable_reg ( struct acpi_gpe_event_info *gpe_event_info); @@ -131,12 +134,12 @@ acpi_hw_clear_gpe_block ( struct acpi_gpe_xrupt_info *gpe_xrupt_info, struct acpi_gpe_block_info *gpe_block); -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_hw_get_gpe_status ( struct acpi_gpe_event_info *gpe_event_info, acpi_event_status *event_status); -#endif +#endif /* ACPI_FUTURE_USAGE */ acpi_status acpi_hw_disable_all_gpes ( @@ -155,15 +158,11 @@ acpi_hw_enable_runtime_gpe_block ( struct acpi_gpe_xrupt_info *gpe_xrupt_info, struct acpi_gpe_block_info *gpe_block); -acpi_status -acpi_hw_enable_wakeup_gpe_block ( - struct acpi_gpe_xrupt_info *gpe_xrupt_info, - struct acpi_gpe_block_info *gpe_block); - - -/* ACPI Timer prototypes */ -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE +/* + * hwtimer - ACPI Timer prototypes + */ acpi_status acpi_get_timer_resolution ( u32 *resolution); @@ -177,6 +176,7 @@ acpi_get_timer_duration ( u32 start_ticks, u32 end_ticks, u32 *time_elapsed); -#endif /* ACPI_FUTURE_USAGE */ +#endif /* ACPI_FUTURE_USAGE */ + #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 @@ #define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1])) -acpi_status -acpi_ex_resolve_operands ( - u16 opcode, - union acpi_operand_object **stack_ptr, - struct acpi_walk_state *walk_state); - -acpi_status -acpi_ex_check_object_type ( - acpi_object_type type_needed, - acpi_object_type this_type, - void *object); - -/* - * exxface - External interpreter interfaces - */ - -acpi_status -acpi_ex_load_table ( - acpi_table_type table_id); - -acpi_status -acpi_ex_execute_method ( - struct acpi_namespace_node *method_node, - union acpi_operand_object **params, - union acpi_operand_object **return_obj_desc); - - /* * exconvrt - object conversion */ - acpi_status acpi_ex_convert_to_integer ( union acpi_operand_object *obj_desc, @@ -110,17 +82,10 @@ acpi_ex_convert_to_target_type ( union acpi_operand_object **result_desc, struct acpi_walk_state *walk_state); -u32 -acpi_ex_convert_to_ascii ( - acpi_integer integer, - u16 base, - u8 *string, - u8 max_length); /* * exfield - ACPI AML (p-code) execution - field manipulation */ - acpi_status acpi_ex_common_buffer_setup ( union acpi_operand_object *obj_desc, @@ -128,42 +93,6 @@ acpi_ex_common_buffer_setup ( u32 *datum_count); acpi_status -acpi_ex_extract_from_field ( - union acpi_operand_object *obj_desc, - void *buffer, - u32 buffer_length); - -acpi_status -acpi_ex_insert_into_field ( - union acpi_operand_object *obj_desc, - void *buffer, - u32 buffer_length); - -acpi_status -acpi_ex_setup_region ( - union acpi_operand_object *obj_desc, - u32 field_datum_byte_offset); - -acpi_status -acpi_ex_access_region ( - union acpi_operand_object *obj_desc, - u32 field_datum_byte_offset, - acpi_integer *value, - u32 read_write); - -u8 -acpi_ex_register_overflow ( - union acpi_operand_object *obj_desc, - acpi_integer value); - -acpi_status -acpi_ex_field_datum_io ( - union acpi_operand_object *obj_desc, - u32 field_datum_byte_offset, - acpi_integer *value, - u32 read_write); - -acpi_status acpi_ex_write_with_update_rule ( union acpi_operand_object *obj_desc, acpi_integer mask, @@ -198,28 +127,33 @@ acpi_ex_write_data_to_field ( union acpi_operand_object *obj_desc, union acpi_operand_object **result_desc); + /* - * exmisc - ACPI AML (p-code) execution - specific opcodes + * exfldio - low level field I/O */ - acpi_status -acpi_ex_opcode_3A_0T_0R ( - struct acpi_walk_state *walk_state); +acpi_ex_extract_from_field ( + union acpi_operand_object *obj_desc, + void *buffer, + u32 buffer_length); acpi_status -acpi_ex_opcode_3A_1T_1R ( - struct acpi_walk_state *walk_state); +acpi_ex_insert_into_field ( + union acpi_operand_object *obj_desc, + void *buffer, + u32 buffer_length); acpi_status -acpi_ex_opcode_6A_0T_1R ( - struct acpi_walk_state *walk_state); +acpi_ex_access_region ( + union acpi_operand_object *obj_desc, + u32 field_datum_byte_offset, + acpi_integer *value, + u32 read_write); -u8 -acpi_ex_do_match ( - u32 match_op, - union acpi_operand_object *package_obj, - union acpi_operand_object *match_obj); +/* + * exmisc - misc support routines + */ acpi_status acpi_ex_get_object_reference ( union acpi_operand_object *obj_desc, @@ -227,13 +161,6 @@ acpi_ex_get_object_reference ( struct acpi_walk_state *walk_state); acpi_status -acpi_ex_resolve_multiple ( - struct acpi_walk_state *walk_state, - union acpi_operand_object *operand, - acpi_object_type *return_type, - union acpi_operand_object **return_desc); - -acpi_status acpi_ex_concat_template ( union acpi_operand_object *obj_desc, union acpi_operand_object *obj_desc2, @@ -308,13 +235,6 @@ acpi_ex_create_method ( /* * exconfig - dynamic table load/unload */ - -acpi_status -acpi_ex_add_table ( - struct acpi_table_header *table, - struct acpi_namespace_node *parent_node, - union acpi_operand_object **ddb_handle); - acpi_status acpi_ex_load_op ( union acpi_operand_object *obj_desc, @@ -334,7 +254,6 @@ acpi_ex_unload_table ( /* * exmutex - mutex support */ - acpi_status acpi_ex_acquire_mutex ( union acpi_operand_object *time_desc, @@ -354,15 +273,10 @@ void acpi_ex_unlink_mutex ( union acpi_operand_object *obj_desc); -void -acpi_ex_link_mutex ( - union acpi_operand_object *obj_desc, - struct acpi_thread_state *thread); /* - * exprep - ACPI AML (p-code) execution - prep utilities + * exprep - ACPI AML execution - prep utilities */ - acpi_status acpi_ex_prep_common_field_object ( union acpi_operand_object *obj_desc, @@ -375,10 +289,10 @@ acpi_status acpi_ex_prep_field_value ( struct acpi_create_field_info *info); + /* * exsystem - Interface to OS services */ - acpi_status acpi_ex_system_do_notify_op ( union acpi_operand_object *value, @@ -421,9 +335,8 @@ acpi_ex_system_wait_semaphore ( /* - * exmonadic - ACPI AML (p-code) execution, monadic operators + * exoparg1 - ACPI AML execution, 1 operand */ - acpi_status acpi_ex_opcode_0A_0T_1R ( struct acpi_walk_state *walk_state); @@ -445,9 +358,8 @@ acpi_ex_opcode_1A_1T_0R ( struct acpi_walk_state *walk_state); /* - * exdyadic - ACPI AML (p-code) execution, dyadic operators + * exoparg2 - ACPI AML execution, 2 operands */ - acpi_status acpi_ex_opcode_2A_0T_0R ( struct acpi_walk_state *walk_state); @@ -466,21 +378,56 @@ acpi_ex_opcode_2A_2T_1R ( /* - * exresolv - Object resolution and get value functions + * exoparg3 - ACPI AML execution, 3 operands + */ +acpi_status +acpi_ex_opcode_3A_0T_0R ( + struct acpi_walk_state *walk_state); + +acpi_status +acpi_ex_opcode_3A_1T_1R ( + struct acpi_walk_state *walk_state); + + +/* + * exoparg6 - ACPI AML execution, 6 operands */ +acpi_status +acpi_ex_opcode_6A_0T_1R ( + struct acpi_walk_state *walk_state); + +/* + * exresolv - Object resolution and get value functions + */ acpi_status acpi_ex_resolve_to_value ( union acpi_operand_object **stack_ptr, struct acpi_walk_state *walk_state); acpi_status +acpi_ex_resolve_multiple ( + struct acpi_walk_state *walk_state, + union acpi_operand_object *operand, + acpi_object_type *return_type, + union acpi_operand_object **return_desc); + + +/* + * exresnte - resolve namespace node + */ +acpi_status acpi_ex_resolve_node_to_value ( struct acpi_namespace_node **stack_ptr, struct acpi_walk_state *walk_state); + +/* + * exresop - resolve operand to value + */ acpi_status -acpi_ex_resolve_object_to_value ( +acpi_ex_resolve_operands ( + u16 opcode, union acpi_operand_object **stack_ptr, struct acpi_walk_state *walk_state); @@ -488,7 +435,6 @@ acpi_ex_resolve_object_to_value ( /* * exdump - Interpreter debug output routines */ - void acpi_ex_dump_operand ( union acpi_operand_object *obj_desc, @@ -504,7 +450,7 @@ acpi_ex_dump_operands ( char *module_name, u32 line_number); -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE void acpi_ex_dump_object_descriptor ( union acpi_operand_object *object, @@ -514,46 +460,12 @@ void acpi_ex_dump_node ( struct acpi_namespace_node *node, u32 flags); +#endif /* ACPI_FUTURE_USAGE */ -void -acpi_ex_out_string ( - char *title, - char *value); - -void -acpi_ex_out_pointer ( - char *title, - void *value); - -void -acpi_ex_out_integer ( - char *title, - u32 value); - -void -acpi_ex_out_address ( - char *title, - acpi_physical_address value); -#endif /* ACPI_FUTURE_USAGE */ /* - * exnames - interpreter/scanner name load/execute + * exnames - AML namestring support */ - -char * -acpi_ex_allocate_name_string ( - u32 prefix_count, - u32 num_name_segs); - -u32 -acpi_ex_good_char ( - u32 character); - -acpi_status -acpi_ex_name_segment ( - u8 **in_aml_address, - char *name_string); - acpi_status acpi_ex_get_name_string ( acpi_object_type data_type, @@ -561,16 +473,10 @@ acpi_ex_get_name_string ( char **out_name_string, u32 *out_name_length); -acpi_status -acpi_ex_do_name ( - acpi_object_type data_type, - acpi_interpreter_mode load_exec_mode); - /* * exstore - Object store support */ - acpi_status acpi_ex_store ( union acpi_operand_object *val_desc, @@ -578,12 +484,6 @@ acpi_ex_store ( struct acpi_walk_state *walk_state); acpi_status -acpi_ex_store_object_to_index ( - union acpi_operand_object *val_desc, - union acpi_operand_object *dest_desc, - struct acpi_walk_state *walk_state); - -acpi_status acpi_ex_store_object_to_node ( union acpi_operand_object *source_desc, struct acpi_namespace_node *node, @@ -593,10 +493,10 @@ acpi_ex_store_object_to_node ( #define ACPI_IMPLICIT_CONVERSION TRUE #define ACPI_NO_IMPLICIT_CONVERSION FALSE + /* - * exstoren + * exstoren - resolve/store object */ - acpi_status acpi_ex_resolve_object ( union acpi_operand_object **source_desc_ptr, @@ -612,9 +512,8 @@ acpi_ex_store_object_to_object ( /* - * excopy - object copy + * exstorob - store object - buffer/string */ - acpi_status acpi_ex_store_buffer_to_buffer ( union acpi_operand_object *source_desc, @@ -625,6 +524,10 @@ acpi_ex_store_string_to_string ( union acpi_operand_object *source_desc, union acpi_operand_object *target_desc); + +/* + * excopy - object copy + */ acpi_status acpi_ex_copy_integer_to_index_field ( union acpi_operand_object *source_desc, @@ -645,10 +548,10 @@ acpi_ex_copy_integer_to_buffer_field ( union acpi_operand_object *source_desc, union acpi_operand_object *target_desc); + /* * exutils - interpreter/scanner utilities */ - acpi_status acpi_ex_enter_interpreter ( void); @@ -669,11 +572,6 @@ void acpi_ex_release_global_lock ( u8 locked); -u32 -acpi_ex_digits_needed ( - acpi_integer value, - u32 base); - void acpi_ex_eisa_id_to_string ( u32 numeric_id, @@ -688,7 +586,6 @@ acpi_ex_unsigned_integer_to_string ( /* * exregion - default op_region handlers */ - acpi_status acpi_ex_system_memory_space_handler ( 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; * * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also! */ - #define ACPI_MTX_EXECUTE 0 #define ACPI_MTX_INTERPRETER 1 #define ACPI_MTX_PARSER 2 @@ -151,13 +150,13 @@ typedef u16 acpi_owner_id; #define ACPI_FIELD_DWORD_GRANULARITY 4 #define ACPI_FIELD_QWORD_GRANULARITY 8 + /***************************************************************************** * * Namespace typedefs and structs * ****************************************************************************/ - /* Operational modes of the AML interpreter/scanner */ typedef enum @@ -176,7 +175,6 @@ typedef enum * data_type is used to differentiate between internal descriptors, and MUST * be the first byte in this structure. */ - union acpi_name_union { u32 integer; @@ -415,7 +413,6 @@ struct acpi_field_info * ****************************************************************************/ - #define ACPI_CONTROL_NORMAL 0xC0 #define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1 #define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2 @@ -424,6 +421,7 @@ struct acpi_field_info /* Forward declarations */ + struct acpi_walk_state ; struct acpi_obj_mutex; union acpi_parse_object ; @@ -601,7 +599,6 @@ struct acpi_opcode_info u8 type; /* Opcode type */ }; - union acpi_parse_value { acpi_integer integer; /* Integer constant (Up to 64 bits) */ @@ -613,7 +610,6 @@ union acpi_parse_value union acpi_parse_object *arg; /* arguments and contained ops */ }; - #define ACPI_PARSE_COMMON \ u8 data_type; /* To differentiate various internal objs */\ u8 flags; /* Type of Op */\ @@ -691,7 +687,6 @@ struct acpi_parse_obj_asl char parse_op_name[12]; }; - union acpi_parse_object { struct acpi_parse_obj_common common; @@ -834,7 +829,6 @@ struct acpi_bit_register_info * ****************************************************************************/ - /* resource_type values */ #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 @@ #define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b) - -#ifdef ACPI_FUTURE_USAGE -#define ACPI_DUMP_TABLES(a,b) acpi_ns_dump_tables(a,b) -#endif - #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) @@ -596,11 +591,6 @@ #define ACPI_DUMP_STACK_ENTRY(a) #define ACPI_DUMP_OPERANDS(a,b,c,d,e) #define ACPI_DUMP_ENTRY(a,b) - -#ifdef ACPI_FUTURE_USAGE -#define ACPI_DUMP_TABLES(a,b) -#endif - #define ACPI_DUMP_PATHNAME(a,b,c,d) #define ACPI_DUMP_RESOURCE_LIST(a) #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 @@ +/****************************************************************************** + * + * Name: acnames.h - Global names and strings + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2005, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef __ACNAMES_H__ +#define __ACNAMES_H__ + +/* Method names - these methods can appear anywhere in the namespace */ + +#define METHOD_NAME__HID "_HID" +#define METHOD_NAME__CID "_CID" +#define METHOD_NAME__UID "_UID" +#define METHOD_NAME__ADR "_ADR" +#define METHOD_NAME__INI "_INI" +#define METHOD_NAME__STA "_STA" +#define METHOD_NAME__REG "_REG" +#define METHOD_NAME__SEG "_SEG" +#define METHOD_NAME__BBN "_BBN" +#define METHOD_NAME__PRT "_PRT" +#define METHOD_NAME__CRS "_CRS" +#define METHOD_NAME__PRS "_PRS" +#define METHOD_NAME__PRW "_PRW" +#define METHOD_NAME__SRS "_SRS" + +/* Method names - these methods must appear at the namespace root */ + +#define METHOD_NAME__BFS "\\_BFS" +#define METHOD_NAME__GTS "\\_GTS" +#define METHOD_NAME__PTS "\\_PTS" +#define METHOD_NAME__SST "\\_SI._SST" +#define METHOD_NAME__WAK "\\_WAK" + +/* Definitions of the predefined namespace names */ + +#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */ +#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */ +#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F /* Sys bus name is "_SB_" */ + +#define ACPI_NS_ROOT_PATH "\\" +#define ACPI_NS_SYSTEM_BUS "_SB_" + + +#endif /* __ACNAMES_H__ */ + + 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 @@ #define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */ #define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */ - -/* Definitions of the predefined namespace names */ - -#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */ -#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */ -#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F /* Sys bus name is "_SB_" */ - -#define ACPI_NS_ROOT_PATH "\\" -#define ACPI_NS_SYSTEM_BUS "_SB_" - - /* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */ #define ACPI_NS_NO_UPSEARCH 0 @@ -80,10 +69,9 @@ #define ACPI_NS_WALK_NO_UNLOCK FALSE -acpi_status -acpi_ns_load_namespace ( - void); - +/* + * nsinit - Namespace initialization + */ acpi_status acpi_ns_initialize_objects ( void); @@ -93,23 +81,22 @@ acpi_ns_initialize_devices ( void); -/* Namespace init - nsxfinit */ - +/* + * nsload - Namespace loading + */ acpi_status -acpi_ns_init_one_device ( - acpi_handle obj_handle, - u32 nesting_level, - void *context, - void **return_value); +acpi_ns_load_namespace ( + void); acpi_status -acpi_ns_init_one_object ( - acpi_handle obj_handle, - u32 level, - void *context, - void **return_value); +acpi_ns_load_table ( + struct acpi_table_desc *table_desc, + struct acpi_namespace_node *node); +/* + * nswalk - walk the namespace + */ acpi_status acpi_ns_walk_namespace ( acpi_object_type type, @@ -126,37 +113,24 @@ acpi_ns_get_next_node ( struct acpi_namespace_node *parent, struct acpi_namespace_node *child); -void -acpi_ns_delete_namespace_by_owner ( - u16 table_id); - - -/* Namespace loading - nsload */ - -acpi_status -acpi_ns_one_complete_parse ( - u32 pass_number, - struct acpi_table_desc *table_desc); +/* + * nsparse - table parsing + */ acpi_status acpi_ns_parse_table ( struct acpi_table_desc *table_desc, struct acpi_namespace_node *scope); acpi_status -acpi_ns_load_table ( - struct acpi_table_desc *table_desc, - struct acpi_namespace_node *node); - -acpi_status -acpi_ns_load_table_by_type ( - acpi_table_type table_type); +acpi_ns_one_complete_parse ( + u32 pass_number, + struct acpi_table_desc *table_desc); /* - * Top-level namespace access - nsaccess + * nsaccess - Top-level namespace access */ - acpi_status acpi_ns_root_initialize ( void); @@ -173,9 +147,8 @@ acpi_ns_lookup ( /* - * Named object allocation/deallocation - nsalloc + * nsalloc - Named object allocation/deallocation */ - struct acpi_namespace_node * acpi_ns_create_node ( u32 name); @@ -189,6 +162,10 @@ acpi_ns_delete_namespace_subtree ( struct acpi_namespace_node *parent_handle); void +acpi_ns_delete_namespace_by_owner ( + u16 table_id); + +void acpi_ns_detach_object ( struct acpi_namespace_node *node); @@ -201,36 +178,16 @@ acpi_ns_compare_names ( char *name1, char *name2); -void -acpi_ns_remove_reference ( - struct acpi_namespace_node *node); - /* - * Namespace modification - nsmodify + * nsdump - Namespace dump/print utilities */ - -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_ns_unload_namespace ( - acpi_handle handle); - -acpi_status -acpi_ns_delete_subtree ( - acpi_handle start_handle); -#endif - - -/* - * Namespace dump/print utilities - nsdump - */ - -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE void acpi_ns_dump_tables ( acpi_handle search_base, u32 max_depth); -#endif +#endif /* ACPI_FUTURE_USAGE */ void acpi_ns_dump_entry ( @@ -249,19 +206,6 @@ acpi_ns_print_pathname ( u32 num_segments, char *pathname); -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_ns_dump_one_device ( - acpi_handle obj_handle, - u32 level, - void *context, - void **return_value); - -void -acpi_ns_dump_root_devices ( - void); -#endif /* ACPI_FUTURE_USAGE */ - acpi_status acpi_ns_dump_one_object ( acpi_handle obj_handle, @@ -269,7 +213,7 @@ acpi_ns_dump_one_object ( void *context, void **return_value); -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE void acpi_ns_dump_objects ( acpi_object_type type, @@ -277,13 +221,12 @@ acpi_ns_dump_objects ( u32 max_depth, u32 ownder_id, acpi_handle start_handle); -#endif +#endif /* ACPI_FUTURE_USAGE */ /* - * Namespace evaluation functions - nseval + * nseval - Namespace evaluation functions */ - acpi_status acpi_ns_evaluate_by_handle ( struct acpi_parameter_info *info); @@ -298,40 +241,14 @@ acpi_ns_evaluate_relative ( char *pathname, struct acpi_parameter_info *info); -acpi_status -acpi_ns_execute_control_method ( - struct acpi_parameter_info *info); - -acpi_status -acpi_ns_get_object_value ( - struct acpi_parameter_info *info); - - -/* - * Parent/Child/Peer utility functions - */ - -#ifdef ACPI_FUTURE_USAGE -acpi_name -acpi_ns_find_parent_name ( - struct acpi_namespace_node *node_to_search); -#endif - /* - * Name and Scope manipulation - nsnames + * nsnames - Name and Scope manipulation */ - u32 acpi_ns_opens_scope ( acpi_object_type type); -void -acpi_ns_build_external_path ( - struct acpi_namespace_node *node, - acpi_size size, - char *name_buffer); - char * acpi_ns_get_external_pathname ( struct acpi_namespace_node *node); @@ -363,9 +280,8 @@ acpi_ns_get_pathname_length ( /* - * Object management for namespace nodes - nsobject + * nsobject - Object management for namespace nodes */ - acpi_status acpi_ns_attach_object ( struct acpi_namespace_node *node, @@ -399,9 +315,8 @@ acpi_ns_get_attached_data ( /* - * Namespace searching and entry - nssearch + * nssearch - Namespace searching and entry */ - acpi_status acpi_ns_search_and_enter ( u32 entry_name, @@ -428,17 +343,12 @@ acpi_ns_install_node ( /* - * Utility functions - nsutils + * nsutils - Utility functions */ - u8 acpi_ns_valid_root_prefix ( char prefix); -u8 -acpi_ns_valid_path_separator ( - char sep); - acpi_object_type acpi_ns_get_type ( struct acpi_namespace_node *node); @@ -511,5 +421,4 @@ struct acpi_namespace_node * acpi_ns_get_next_valid_node ( struct acpi_namespace_node *node); - #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 acpi_integer value; }; + /* * Note: The String and Buffer object must be identical through the Pointer * element. There is code that depends on this. @@ -468,7 +469,6 @@ union acpi_operand_object * *****************************************************************************/ - /* Object descriptor types */ #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 @@ +/****************************************************************************** + * + * Name: acopcode.h - AML opcode information for the AML parser and interpreter + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2005, R. Byron Moore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ + +#ifndef __ACOPCODE_H__ +#define __ACOPCODE_H__ + +#define MAX_EXTENDED_OPCODE 0x88 +#define NUM_EXTENDED_OPCODE (MAX_EXTENDED_OPCODE + 1) +#define MAX_INTERNAL_OPCODE +#define NUM_INTERNAL_OPCODE (MAX_INTERNAL_OPCODE + 1) + +/* Used for non-assigned opcodes */ + +#define _UNK 0x6B + +/* + * Reserved ASCII characters. Do not use any of these for + * internal opcodes, since they are used to differentiate + * name strings from AML opcodes + */ +#define _ASC 0x6C +#define _NAM 0x6C +#define _PFX 0x6D + + +/* + * All AML opcodes and the parse-time arguments for each. Used by the AML + * parser Each list is compressed into a 32-bit number and stored in the + * master opcode table (in psopcode.c). + */ +#define ARGP_ACCESSFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) +#define ARGP_ACQUIRE_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_WORDDATA) +#define ARGP_ADD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_ALIAS_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_NAME) +#define ARGP_ARG0 ARG_NONE +#define ARGP_ARG1 ARG_NONE +#define ARGP_ARG2 ARG_NONE +#define ARGP_ARG3 ARG_NONE +#define ARGP_ARG4 ARG_NONE +#define ARGP_ARG5 ARG_NONE +#define ARGP_ARG6 ARG_NONE +#define ARGP_BANK_FIELD_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_TERMARG, ARGP_BYTEDATA, ARGP_FIELDLIST) +#define ARGP_BIT_AND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_BIT_NAND_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_BIT_NOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_BIT_NOT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_BIT_OR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_BIT_XOR_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_BREAK_OP ARG_NONE +#define ARGP_BREAK_POINT_OP ARG_NONE +#define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST) +#define ARGP_BYTE_OP ARGP_LIST1 (ARGP_BYTEDATA) +#define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING) +#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME) +#define ARGP_CONTINUE_OP ARG_NONE +#define ARGP_COPY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SIMPLENAME) +#define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) +#define ARGP_CREATE_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) +#define ARGP_CREATE_DWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) +#define ARGP_CREATE_FIELD_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) +#define ARGP_CREATE_QWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) +#define ARGP_CREATE_WORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) +#define ARGP_DATA_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_DEBUG_OP ARG_NONE +#define ARGP_DECREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG) +#define ARGP_DEVICE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST) +#define ARGP_DIVIDE_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET, ARGP_TARGET) +#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA) +#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST) +#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME) +#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG) +#define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST) +#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_FIND_SET_RIGHT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_FROM_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_IF_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST) +#define ARGP_INCREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_INDEX_FIELD_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_BYTEDATA, ARGP_FIELDLIST) +#define ARGP_INDEX_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_LAND_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_LEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_LGREATER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_LGREATEREQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_LLESS_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_LLESSEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_LNOT_OP ARGP_LIST1 (ARGP_TERMARG) +#define ARGP_LNOTEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_LOAD_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME) +#define ARGP_LOAD_TABLE_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_LOCAL0 ARG_NONE +#define ARGP_LOCAL1 ARG_NONE +#define ARGP_LOCAL2 ARG_NONE +#define ARGP_LOCAL3 ARG_NONE +#define ARGP_LOCAL4 ARG_NONE +#define ARGP_LOCAL5 ARG_NONE +#define ARGP_LOCAL6 ARG_NONE +#define ARGP_LOCAL7 ARG_NONE +#define ARGP_LOR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_MATCH_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_METHOD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMLIST) +#define ARGP_METHODCALL_OP ARGP_LIST1 (ARGP_NAMESTRING) +#define ARGP_MID_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_MOD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_MULTIPLY_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_MUTEX_OP ARGP_LIST2 (ARGP_NAME, ARGP_BYTEDATA) +#define ARGP_NAME_OP ARGP_LIST2 (ARGP_NAME, ARGP_DATAOBJ) +#define ARGP_NAMEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) +#define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING) +#define ARGP_NOOP_OP ARG_NONE +#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG) +#define ARGP_ONE_OP ARG_NONE +#define ARGP_ONES_OP ARG_NONE +#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST) +#define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST) +#define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST) +#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA) +#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG) +#define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) +#define ARGP_RESET_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG) +#define ARGP_REVISION_OP ARG_NONE +#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST) +#define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_SIZE_OF_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_SLEEP_OP ARGP_LIST1 (ARGP_TERMARG) +#define ARGP_STALL_OP ARGP_LIST1 (ARGP_TERMARG) +#define ARGP_STATICSTRING_OP ARGP_LIST1 (ARGP_NAMESTRING) +#define ARGP_STORE_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SUPERNAME) +#define ARGP_STRING_OP ARGP_LIST1 (ARGP_CHARLIST) +#define ARGP_SUBTRACT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST) +#define ARGP_TIMER_OP ARG_NONE +#define ARGP_TO_BCD_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_TO_BUFFER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_TO_DEC_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET) +#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) +#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_UNLOAD_OP ARGP_LIST1 (ARGP_SUPERNAME) +#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_DATAOBJLIST) +#define ARGP_WAIT_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG) +#define ARGP_WHILE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST) +#define ARGP_WORD_OP ARGP_LIST1 (ARGP_WORDDATA) +#define ARGP_ZERO_OP ARG_NONE + + +/* + * All AML opcodes and the runtime arguments for each. Used by the AML + * interpreter Each list is compressed into a 32-bit number and stored + * in the master opcode table (in psopcode.c). + * + * (Used by prep_operands procedure and the ASL Compiler) + */ +#define ARGI_ACCESSFIELD_OP ARGI_INVALID_OPCODE +#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_INTEGER) +#define ARGI_ADD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_ALIAS_OP ARGI_INVALID_OPCODE +#define ARGI_ARG0 ARG_NONE +#define ARGI_ARG1 ARG_NONE +#define ARGI_ARG2 ARG_NONE +#define ARGI_ARG3 ARG_NONE +#define ARGI_ARG4 ARG_NONE +#define ARGI_ARG5 ARG_NONE +#define ARGI_ARG6 ARG_NONE +#define ARGI_BANK_FIELD_OP ARGI_INVALID_OPCODE +#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_BREAK_OP ARG_NONE +#define ARGI_BREAK_POINT_OP ARG_NONE +#define ARGI_BUFFER_OP ARGI_LIST1 (ARGI_INTEGER) +#define ARGI_BYTE_OP ARGI_INVALID_OPCODE +#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE +#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF) +#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF) +#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF) +#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE +#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET) +#define ARGI_CREATE_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) +#define ARGI_CREATE_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) +#define ARGI_CREATE_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) +#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_INTEGER, ARGI_INTEGER, ARGI_REFERENCE) +#define ARGI_CREATE_QWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) +#define ARGI_CREATE_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) +#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING) +#define ARGI_DEBUG_OP ARG_NONE +#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF) +#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REF_OR_STRING) +#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE +#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF) +#define ARGI_DWORD_OP ARGI_INVALID_OPCODE +#define ARGI_ELSE_OP ARGI_INVALID_OPCODE +#define ARGI_EVENT_OP ARGI_INVALID_OPCODE +#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER) +#define ARGI_FIELD_OP ARGI_INVALID_OPCODE +#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_IF_OP ARGI_INVALID_OPCODE +#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF) +#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE +#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) +#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA) +#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA) +#define ARGI_LGREATEREQUAL_OP ARGI_INVALID_OPCODE +#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA) +#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE +#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER) +#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE +#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF) +#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_ANYTYPE) +#define ARGI_LOCAL0 ARG_NONE +#define ARGI_LOCAL1 ARG_NONE +#define ARGI_LOCAL2 ARG_NONE +#define ARGI_LOCAL3 ARG_NONE +#define ARGI_LOCAL4 ARG_NONE +#define ARGI_LOCAL5 ARG_NONE +#define ARGI_LOCAL6 ARG_NONE +#define ARGI_LOCAL7 ARG_NONE +#define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) +#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_COMPUTEDATA, ARGI_INTEGER,ARGI_COMPUTEDATA,ARGI_INTEGER) +#define ARGI_METHOD_OP ARGI_INVALID_OPCODE +#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE +#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE +#define ARGI_NAME_OP ARGI_INVALID_OPCODE +#define ARGI_NAMEDFIELD_OP ARGI_INVALID_OPCODE +#define ARGI_NAMEPATH_OP ARGI_INVALID_OPCODE +#define ARGI_NOOP_OP ARG_NONE +#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER) +#define ARGI_ONE_OP ARG_NONE +#define ARGI_ONES_OP ARG_NONE +#define ARGI_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER) +#define ARGI_POWER_RES_OP ARGI_INVALID_OPCODE +#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE +#define ARGI_QWORD_OP ARGI_INVALID_OPCODE +#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_OBJECT_REF) +#define ARGI_REGION_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER) +#define ARGI_RELEASE_OP ARGI_LIST1 (ARGI_MUTEX) +#define ARGI_RESERVEDFIELD_OP ARGI_INVALID_OPCODE +#define ARGI_RESET_OP ARGI_LIST1 (ARGI_EVENT) +#define ARGI_RETURN_OP ARGI_INVALID_OPCODE +#define ARGI_REVISION_OP ARG_NONE +#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE +#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT) +#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT) +#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_INTEGER) +#define ARGI_STALL_OP ARGI_LIST1 (ARGI_INTEGER) +#define ARGI_STATICSTRING_OP ARGI_INVALID_OPCODE +#define ARGI_STORE_OP ARGI_LIST2 (ARGI_DATAREFOBJ, ARGI_TARGETREF) +#define ARGI_STRING_OP ARGI_INVALID_OPCODE +#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE +#define ARGI_TIMER_OP ARG_NONE +#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET) +#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) +#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) +#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) +#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) +#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET) +#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE) +#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE) +#define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER) +#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER) +#define ARGI_WHILE_OP ARGI_INVALID_OPCODE +#define ARGI_WORD_OP ARGI_INVALID_OPCODE +#define ARGI_ZERO_OP ARG_NONE + +#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 @@ #define ACPI_PARSE_DEFERRED_OP 0x0100 -/* Parser external interfaces */ +/****************************************************************************** + * + * Parser interfaces + * + *****************************************************************************/ + + +/* + * psxface - Parser external interfaces + */ acpi_status acpi_psx_load_table ( u8 *pcode_addr, @@ -76,23 +85,13 @@ acpi_psx_execute ( struct acpi_parameter_info *info); -/****************************************************************************** - * - * Parser interfaces - * - *****************************************************************************/ - - -/* psargs - Parse AML opcode arguments */ - +/* + * psargs - Parse AML opcode arguments + */ u8 * acpi_ps_get_next_package_end ( struct acpi_parse_state *parser_state); -u32 -acpi_ps_get_next_package_length ( - struct acpi_parse_state *parser_state); - char * acpi_ps_get_next_namestring ( struct acpi_parse_state *parser_state); @@ -110,10 +109,6 @@ acpi_ps_get_next_namepath ( union acpi_parse_object *arg, u8 method_call); -union acpi_parse_object * -acpi_ps_get_next_field ( - struct acpi_parse_state *parser_state); - acpi_status acpi_ps_get_next_arg ( struct acpi_walk_state *walk_state, @@ -122,8 +117,9 @@ acpi_ps_get_next_arg ( union acpi_parse_object **return_arg); -/* psfind */ - +/* + * psfind + */ union acpi_parse_object * acpi_ps_find_name ( union acpi_parse_object *scope, @@ -135,8 +131,9 @@ acpi_ps_get_parent ( union acpi_parse_object *op); -/* psopcode - AML Opcode information */ - +/* + * psopcode - AML Opcode information + */ const struct acpi_opcode_info * acpi_ps_get_opcode_info ( u16 opcode); @@ -146,56 +143,25 @@ acpi_ps_get_opcode_name ( u16 opcode); -/* psparse - top level parsing routines */ - -u32 -acpi_ps_get_opcode_size ( - u32 opcode); - -void -acpi_ps_complete_this_op ( - struct acpi_walk_state *walk_state, - union acpi_parse_object *op); - -acpi_status -acpi_ps_next_parse_state ( - struct acpi_walk_state *walk_state, - union acpi_parse_object *op, - acpi_status callback_status); - -acpi_status -acpi_ps_find_object ( - struct acpi_walk_state *walk_state, - union acpi_parse_object **out_op); - -void -acpi_ps_delete_parse_tree ( - union acpi_parse_object *root); - -acpi_status -acpi_ps_parse_loop ( - struct acpi_walk_state *walk_state); - +/* + * psparse - top level parsing routines + */ acpi_status acpi_ps_parse_aml ( struct acpi_walk_state *walk_state); -acpi_status -acpi_ps_parse_table ( - u8 *aml, - u32 aml_size, - acpi_parse_downwards descending_callback, - acpi_parse_upwards ascending_callback, - union acpi_parse_object **root_object); +u32 +acpi_ps_get_opcode_size ( + u32 opcode); u16 acpi_ps_peek_opcode ( struct acpi_parse_state *state); -/* psscope - Scope stack management routines */ - - +/* + * psscope - Scope stack management routines + */ acpi_status acpi_ps_init_scope ( struct acpi_parse_state *parser_state, @@ -228,8 +194,9 @@ acpi_ps_cleanup_scope ( struct acpi_parse_state *state); -/* pstree - parse tree manipulation routines */ - +/* + * pstree - parse tree manipulation routines + */ void acpi_ps_append_arg( union acpi_parse_object *op, @@ -247,20 +214,17 @@ acpi_ps_get_arg( union acpi_parse_object *op, u32 argn); -#ifdef ACPI_FUTURE_USAGE -union acpi_parse_object * -acpi_ps_get_child ( - union acpi_parse_object *op); - +#ifdef ACPI_FUTURE_USAGE union acpi_parse_object * acpi_ps_get_depth_next ( union acpi_parse_object *origin, union acpi_parse_object *op); -#endif /* ACPI_FUTURE_USAGE */ - +#endif /* ACPI_FUTURE_USAGE */ -/* pswalk - parse tree walk routines */ +/* + * pswalk - parse tree walk routines + */ acpi_status acpi_ps_walk_parsed_aml ( union acpi_parse_object *start_op, @@ -283,9 +247,14 @@ acpi_status acpi_ps_delete_completed_op ( struct acpi_walk_state *walk_state); +void +acpi_ps_delete_parse_tree ( + union acpi_parse_object *root); -/* psutils - parser utilities */ +/* + * psutils - parser utilities + */ union acpi_parse_object * acpi_ps_create_scope_op ( void); @@ -303,12 +272,6 @@ void acpi_ps_free_op ( union acpi_parse_object *op); -#ifdef ACPI_ENABLE_OBJECT_CACHE -void -acpi_ps_delete_parse_cache ( - void); -#endif - u8 acpi_ps_is_leading_char ( u32 c); @@ -317,20 +280,27 @@ u8 acpi_ps_is_prefix_char ( u32 c); -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE u32 acpi_ps_get_name( union acpi_parse_object *op); -#endif +#endif /* ACPI_FUTURE_USAGE */ void acpi_ps_set_name( union acpi_parse_object *op, u32 name); +#ifdef ACPI_ENABLE_OBJECT_CACHE +void +acpi_ps_delete_parse_cache ( + void); +#endif -/* psdump - display parser tree */ +/* + * psdump - display parser tree + */ u32 acpi_ps_sprint_path ( 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 @@ * We put them here because we don't want to duplicate them * in the rest of the source code again and again. */ +#include "acnames.h" /* Global ACPI names and strings */ #include "acconfig.h" /* Configuration constants */ #include "platform/acenv.h" /* Target environment specific items */ #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 /* * OSL Initialization and shutdown primitives */ - acpi_status acpi_os_initialize ( void); @@ -92,7 +91,6 @@ acpi_os_terminate ( /* * ACPI Table interfaces */ - acpi_status acpi_os_get_root_pointer ( u32 flags, @@ -112,7 +110,6 @@ acpi_os_table_override ( /* * Synchronization primitives */ - acpi_status acpi_os_create_semaphore ( u32 max_units, @@ -156,7 +153,6 @@ acpi_os_release_lock ( /* * Memory allocation and mapping */ - void * acpi_os_allocate ( acpi_size size); @@ -187,7 +183,6 @@ acpi_os_get_physical_address ( /* * Interrupt handlers */ - acpi_status acpi_os_install_interrupt_handler ( u32 gsi, @@ -203,7 +198,6 @@ acpi_os_remove_interrupt_handler ( /* * Threads and Scheduling */ - u32 acpi_os_get_thread_id ( void); @@ -234,7 +228,6 @@ acpi_os_stall ( /* * Platform and hardware-independent I/O interfaces */ - acpi_status acpi_os_read_port ( acpi_io_address address, @@ -251,7 +244,6 @@ acpi_os_write_port ( /* * Platform and hardware-independent physical memory interfaces */ - acpi_status acpi_os_read_memory ( acpi_physical_address address, @@ -270,7 +262,6 @@ acpi_os_write_memory ( * Note: Can't use "Register" as a parameter, changed to "Reg" -- * certain compilers complain. */ - acpi_status acpi_os_read_pci_configuration ( struct acpi_pci_id *pci_id, @@ -288,7 +279,6 @@ acpi_os_write_pci_configuration ( /* * Interim function needed for PCI IRQ routing */ - void acpi_os_derive_pci_id( acpi_handle rhandle, @@ -298,7 +288,6 @@ acpi_os_derive_pci_id( /* * Miscellaneous */ - u8 acpi_os_readable ( void *pointer, @@ -323,7 +312,6 @@ acpi_os_signal ( /* * Debug print routines */ - void ACPI_INTERNAL_VAR_XFACE acpi_os_printf ( const char *format, @@ -339,11 +327,10 @@ acpi_os_redirect_output ( void *destination); +#ifdef ACPI_FUTURE_USAGE /* * Debug input */ - -#ifdef ACPI_FUTURE_USAGE u32 acpi_os_get_line ( char *buffer); @@ -353,7 +340,6 @@ acpi_os_get_line ( /* * Directory manipulation */ - void * acpi_os_open_directory ( char *pathname, @@ -377,7 +363,6 @@ acpi_os_close_directory ( /* * Debug */ - void acpi_os_dbg_assert( void *failed_assertion, @@ -385,5 +370,4 @@ acpi_os_dbg_assert( u32 line_number, char *message); - #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 @@ #include "actbl.h" - /* +/* * Global interfaces */ - acpi_status acpi_initialize_subsystem ( void); @@ -106,9 +105,8 @@ acpi_install_initialization_handler ( #endif /* - * ACPI Memory manager + * ACPI Memory managment */ - void * acpi_allocate ( u32 size); @@ -125,7 +123,6 @@ acpi_free ( /* * ACPI table manipulation interfaces */ - acpi_status acpi_find_root_pointer ( u32 flags, @@ -168,7 +165,6 @@ acpi_get_firmware_table ( /* * Namespace and name interfaces */ - acpi_status acpi_walk_namespace ( acpi_object_type type, @@ -218,7 +214,6 @@ acpi_get_data ( /* * Object manipulation and enumeration */ - acpi_status acpi_evaluate_object ( acpi_handle object, @@ -262,7 +257,6 @@ acpi_get_parent ( /* * Event handler interfaces */ - acpi_status acpi_install_fixed_event_handler ( u32 acpi_event, @@ -319,7 +313,6 @@ acpi_install_exception_handler ( /* * Event interfaces */ - acpi_status acpi_acquire_global_lock ( u16 timeout, @@ -404,7 +397,6 @@ acpi_remove_gpe_block ( /* * Resource interfaces */ - typedef acpi_status (*ACPI_WALK_RESOURCE_CALLBACK) ( struct acpi_resource *resource, @@ -448,7 +440,6 @@ acpi_resource_to_address64 ( /* * Hardware (ACPI device) interfaces */ - acpi_status acpi_get_register ( 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 @@ /* * Function prototypes called from Acpi* APIs */ - acpi_status acpi_rs_get_prt_method_data ( acpi_handle handle, @@ -60,12 +59,12 @@ acpi_rs_get_crs_method_data ( acpi_handle handle, struct acpi_buffer *ret_buffer); -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_rs_get_prs_method_data ( acpi_handle handle, struct acpi_buffer *ret_buffer); -#endif +#endif /* ACPI_FUTURE_USAGE */ acpi_status acpi_rs_get_method_data ( @@ -95,61 +94,9 @@ acpi_rs_create_pci_routing_table ( /* - * Function prototypes called from acpi_rs_create* + * rsdump */ -#ifdef ACPI_FUTURE_USAGE -void -acpi_rs_dump_irq ( - union acpi_resource_data *data); - -void -acpi_rs_dump_address16 ( - union acpi_resource_data *data); - -void -acpi_rs_dump_address32 ( - union acpi_resource_data *data); - -void -acpi_rs_dump_address64 ( - union acpi_resource_data *data); - -void -acpi_rs_dump_dma ( - union acpi_resource_data *data); - -void -acpi_rs_dump_io ( - union acpi_resource_data *data); - -void -acpi_rs_dump_extended_irq ( - union acpi_resource_data *data); - -void -acpi_rs_dump_fixed_io ( - union acpi_resource_data *data); - -void -acpi_rs_dump_fixed_memory32 ( - union acpi_resource_data *data); - -void -acpi_rs_dump_memory24 ( - union acpi_resource_data *data); - -void -acpi_rs_dump_memory32 ( - union acpi_resource_data *data); - -void -acpi_rs_dump_start_depend_fns ( - union acpi_resource_data *data); - -void -acpi_rs_dump_vendor_specific ( - union acpi_resource_data *data); - +#ifdef ACPI_FUTURE_USAGE void acpi_rs_dump_resource_list ( struct acpi_resource *resource); @@ -157,8 +104,12 @@ acpi_rs_dump_resource_list ( void acpi_rs_dump_irq_list ( u8 *route_table); -#endif /* ACPI_FUTURE_USAGE */ +#endif /* ACPI_FUTURE_USAGE */ + +/* + * rscalc + */ acpi_status acpi_rs_get_byte_stream_start ( 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 @@ * Walk state - current state of a parse tree walk. Used for both a leisurely stroll through * the tree (for whatever reason), and for control method execution. */ - #define ACPI_NEXT_OP_DOWNWARD 1 #define ACPI_NEXT_OP_UPWARD 2 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 @@ #define SIZE_IN_HEADER 0 -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_tb_handle_to_object ( - u16 table_id, - struct acpi_table_desc **table_desc); -#endif - /* * tbconvrt - Table conversion routines */ - acpi_status acpi_tb_convert_to_xsdt ( struct acpi_table_desc *table_info); @@ -78,10 +70,10 @@ acpi_tb_get_table_count ( struct rsdp_descriptor *RSDP, struct acpi_table_header *RSDT); + /* * tbget - Table "get" routines */ - acpi_status acpi_tb_get_table ( struct acpi_pointer *address, @@ -99,17 +91,6 @@ acpi_tb_get_table_body ( struct acpi_table_desc *table_info); acpi_status -acpi_tb_get_this_table ( - struct acpi_pointer *address, - struct acpi_table_header *header, - struct acpi_table_desc *table_info); - -acpi_status -acpi_tb_table_override ( - struct acpi_table_header *header, - struct acpi_table_desc *table_info); - -acpi_status acpi_tb_get_table_ptr ( acpi_table_type table_type, u32 instance, @@ -127,36 +108,23 @@ acpi_status acpi_tb_validate_rsdt ( struct acpi_table_header *table_ptr); + +/* + * tbgetall - get multiple required tables + */ acpi_status acpi_tb_get_required_tables ( void); -acpi_status -acpi_tb_get_primary_table ( - struct acpi_pointer *address, - struct acpi_table_desc *table_info); - -acpi_status -acpi_tb_get_secondary_table ( - struct acpi_pointer *address, - acpi_string signature, - struct acpi_table_desc *table_info); /* * tbinstall - Table installation */ - acpi_status acpi_tb_install_table ( struct acpi_table_desc *table_info); acpi_status -acpi_tb_match_signature ( - char *signature, - struct acpi_table_desc *table_info, - u8 search_type); - -acpi_status acpi_tb_recognize_table ( struct acpi_table_desc *table_info, u8 search_type); @@ -170,7 +138,6 @@ acpi_tb_init_table_descriptor ( /* * tbremove - Table removal and deletion */ - void acpi_tb_delete_all_tables ( void); @@ -189,35 +156,23 @@ acpi_tb_uninstall_table ( /* - * tbrsd - RSDP, RSDT utilities + * tbxfroot - RSDP, RSDT utilities */ +acpi_status +acpi_tb_find_table ( + char *signature, + char *oem_id, + char *oem_table_id, + struct acpi_table_header **table_ptr); acpi_status acpi_tb_get_table_rsdt ( void); -u8 * -acpi_tb_scan_memory_for_rsdp ( - u8 *start_address, - u32 length); - -acpi_status -acpi_tb_find_rsdp ( - struct acpi_table_desc *table_info, - u32 flags); - /* * tbutils - common table utilities */ - -acpi_status -acpi_tb_find_table ( - char *signature, - char *oem_id, - char *oem_table_id, - struct acpi_table_header **table_ptr); - acpi_status acpi_tb_verify_table_checksum ( struct acpi_table_header *table_header); @@ -231,5 +186,4 @@ acpi_status acpi_tb_validate_table_header ( struct acpi_table_header *table_header); - #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 */ #define DUAL_PIC 0 #define MULTIPLE_APIC 1 - /* Master MADT */ struct multiple_apic_table @@ -144,7 +143,6 @@ struct multiple_apic_table u32 reserved1 : 31; }; - /* Values for Type in APIC_HEADER_DEF */ #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; #define ACPI_TYPE_INVALID 0x1E #define ACPI_TYPE_NOT_FOUND 0xFF - /* * Bitmapped ACPI types. Used internally only */ @@ -803,7 +802,6 @@ struct acpi_system_info /* * Types specific to the OS service interfaces */ - typedef u32 (ACPI_SYSTEM_XFACE *acpi_osd_handler) ( 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) ( union acpi_generic_state *state, void *context); -acpi_status -acpi_ut_walk_package_tree ( - union acpi_operand_object *source_object, - void *target_object, - acpi_pkg_callback walk_callback, - void *context); - struct acpi_pkg_info { u8 *free_space; @@ -79,37 +72,13 @@ struct acpi_pkg_info #define DB_QWORD_DISPLAY 8 -/* Global initialization interfaces */ - -void -acpi_ut_init_globals ( - void); - -void -acpi_ut_terminate ( - void); - - /* - * ut_init - miscellaneous initialization and shutdown + * utglobal - Global data structures and procedures */ - -acpi_status -acpi_ut_hardware_initialize ( - void); - void -acpi_ut_subsystem_shutdown ( - void); - -acpi_status -acpi_ut_validate_fadt ( +acpi_ut_init_globals ( void); -/* - * ut_global - Global data structures and procedures - */ - #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) char * @@ -157,9 +126,24 @@ acpi_ut_allocate_owner_id ( /* - * ut_clib - Local implementations of C library functions + * utinit - miscellaneous initialization and shutdown */ +acpi_status +acpi_ut_hardware_initialize ( + void); +void +acpi_ut_subsystem_shutdown ( + void); + +acpi_status +acpi_ut_validate_fadt ( + void); + + +/* + * utclib - Local implementations of C library functions + */ #ifndef ACPI_USE_SYSTEM_CLIBRARY acpi_size @@ -260,10 +244,10 @@ extern const u8 _acpi_ctype[]; #endif /* ACPI_USE_SYSTEM_CLIBRARY */ + /* - * ut_copy - Object construction and conversion interfaces + * utcopy - Object construction and conversion interfaces */ - acpi_status acpi_ut_build_simple_object( union acpi_operand_object *obj, @@ -278,30 +262,11 @@ acpi_ut_build_package_object ( u32 *space_used); acpi_status -acpi_ut_copy_ielement_to_eelement ( - u8 object_type, - union acpi_operand_object *source_object, - union acpi_generic_state *state, - void *context); - -acpi_status -acpi_ut_copy_ielement_to_ielement ( - u8 object_type, - union acpi_operand_object *source_object, - union acpi_generic_state *state, - void *context); - -acpi_status acpi_ut_copy_iobject_to_eobject ( union acpi_operand_object *obj, struct acpi_buffer *ret_buffer); acpi_status -acpi_ut_copy_esimple_to_isimple( - union acpi_object *user_obj, - union acpi_operand_object **return_obj); - -acpi_status acpi_ut_copy_eobject_to_iobject ( union acpi_object *obj, union acpi_operand_object **internal_obj); @@ -312,17 +277,6 @@ acpi_ut_copy_isimple_to_isimple ( union acpi_operand_object *dest_obj); acpi_status -acpi_ut_copy_ipackage_to_ipackage ( - union acpi_operand_object *source_obj, - union acpi_operand_object *dest_obj, - struct acpi_walk_state *walk_state); - -acpi_status -acpi_ut_copy_simple_object ( - union acpi_operand_object *source_desc, - union acpi_operand_object *dest_desc); - -acpi_status acpi_ut_copy_iobject_to_iobject ( union acpi_operand_object *source_desc, union acpi_operand_object **dest_desc, @@ -330,9 +284,8 @@ acpi_ut_copy_iobject_to_iobject ( /* - * ut_create - Object creation + * utcreate - Object creation */ - acpi_status acpi_ut_update_object_reference ( union acpi_operand_object *object, @@ -340,9 +293,8 @@ acpi_ut_update_object_reference ( /* - * ut_debug - Debug interfaces + * utdebug - Debug interfaces */ - void acpi_ut_init_stack_ptr_trace ( void); @@ -440,11 +392,14 @@ acpi_ut_debug_print_raw ( /* - * ut_delete - Object deletion + * utdelete - Object deletion and reference counts */ +void +acpi_ut_add_reference ( + union acpi_operand_object *object); void -acpi_ut_delete_internal_obj ( +acpi_ut_remove_reference ( union acpi_operand_object *object); void @@ -461,25 +416,8 @@ acpi_ut_delete_internal_object_list ( /* - * ut_eval - object evaluation + * uteval - object evaluation */ - -/* Method name strings */ - -#define METHOD_NAME__HID "_HID" -#define METHOD_NAME__CID "_CID" -#define METHOD_NAME__UID "_UID" -#define METHOD_NAME__ADR "_ADR" -#define METHOD_NAME__STA "_STA" -#define METHOD_NAME__REG "_REG" -#define METHOD_NAME__SEG "_SEG" -#define METHOD_NAME__BBN "_BBN" -#define METHOD_NAME__PRT "_PRT" -#define METHOD_NAME__CRS "_CRS" -#define METHOD_NAME__PRS "_PRS" -#define METHOD_NAME__PRW "_PRW" - - acpi_status acpi_ut_osi_implementation ( struct acpi_walk_state *walk_state); @@ -522,39 +460,10 @@ acpi_ut_execute_sxds ( struct acpi_namespace_node *device_node, u8 *highest); -/* - * ut_mutex - mutual exclusion interfaces - */ - -acpi_status -acpi_ut_mutex_initialize ( - void); - -void -acpi_ut_mutex_terminate ( - void); - -acpi_status -acpi_ut_create_mutex ( - acpi_mutex_handle mutex_id); - -acpi_status -acpi_ut_delete_mutex ( - acpi_mutex_handle mutex_id); - -acpi_status -acpi_ut_acquire_mutex ( - acpi_mutex_handle mutex_id); - -acpi_status -acpi_ut_release_mutex ( - acpi_mutex_handle mutex_id); - /* - * ut_object - internal object create/delete/cache routines + * utobject - internal object create/delete/cache routines */ - union acpi_operand_object * acpi_ut_create_internal_object_dbg ( char *module_name, @@ -587,50 +496,15 @@ union acpi_operand_object * acpi_ut_create_string_object ( acpi_size string_size); - -/* - * ut_ref_cnt - Object reference count management - */ - -void -acpi_ut_add_reference ( - union acpi_operand_object *object); - -void -acpi_ut_remove_reference ( - union acpi_operand_object *object); - -/* - * ut_size - Object size routines - */ - -acpi_status -acpi_ut_get_simple_object_size ( - union acpi_operand_object *obj, - acpi_size *obj_length); - -acpi_status -acpi_ut_get_package_object_size ( - union acpi_operand_object *obj, - acpi_size *obj_length); - acpi_status acpi_ut_get_object_size( union acpi_operand_object *obj, acpi_size *obj_length); -acpi_status -acpi_ut_get_element_length ( - u8 object_type, - union acpi_operand_object *source_object, - union acpi_generic_state *state, - void *context); - /* - * ut_state - Generic state creation/cache routines + * utstate - Generic state creation/cache routines */ - void acpi_ut_push_generic_state ( union acpi_generic_state **list_head, @@ -666,14 +540,14 @@ acpi_ut_create_update_state_and_push ( u16 action, union acpi_generic_state **state_list); -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_ut_create_pkg_state_and_push ( void *internal_object, void *external_object, u16 index, union acpi_generic_state **state_list); -#endif +#endif /* ACPI_FUTURE_USAGE */ union acpi_generic_state * acpi_ut_create_control_state ( @@ -693,15 +567,10 @@ acpi_ut_delete_object_cache ( void); #endif + /* - * utmisc + * utmath */ - -void -acpi_ut_print_string ( - char *string, - u8 max_length); - acpi_status acpi_ut_divide ( acpi_integer in_dividend, @@ -716,6 +585,25 @@ acpi_ut_short_divide ( acpi_integer *out_quotient, u32 *out_remainder); +/* + * utmisc + */ +acpi_status +acpi_ut_walk_package_tree ( + union acpi_operand_object *source_object, + void *target_object, + acpi_pkg_callback walk_callback, + void *context); + +char * +acpi_ut_strupr ( + char *src_string); + +void +acpi_ut_print_string ( + char *string, + u8 max_length); + u8 acpi_ut_valid_acpi_name ( u32 name); @@ -734,11 +622,21 @@ acpi_ut_strtoul64 ( #define ACPI_ANY_BASE 0 -#ifdef ACPI_FUTURE_USAGE -char * -acpi_ut_strupr ( - char *src_string); -#endif +acpi_status +acpi_ut_mutex_initialize ( + void); + +void +acpi_ut_mutex_terminate ( + void); + +acpi_status +acpi_ut_acquire_mutex ( + acpi_mutex_handle mutex_id); + +acpi_status +acpi_ut_release_mutex ( + acpi_mutex_handle mutex_id); u8 * acpi_ut_get_resource_end_tag ( @@ -768,9 +666,8 @@ acpi_ut_display_init_pathname ( /* - * Utalloc - memory allocation and object caching + * utalloc - memory allocation and object caching */ - void * acpi_ut_acquire_from_cache ( u32 list_id); @@ -795,9 +692,6 @@ acpi_ut_initialize_buffer ( struct acpi_buffer *buffer, acpi_size required_length); - -/* Memory allocation functions */ - void * acpi_ut_allocate ( acpi_size size, @@ -812,9 +706,7 @@ acpi_ut_callocate ( char *module, u32 line); - #ifdef ACPI_DBG_TRACK_ALLOCATIONS - void * acpi_ut_allocate_and_track ( acpi_size size, @@ -836,34 +728,11 @@ acpi_ut_free_and_track ( char *module, u32 line); -struct acpi_debug_mem_block * -acpi_ut_find_allocation ( - u32 list_id, - void *allocation); - -acpi_status -acpi_ut_track_allocation ( - u32 list_id, - struct acpi_debug_mem_block *address, - acpi_size size, - u8 alloc_type, - u32 component, - char *module, - u32 line); - -acpi_status -acpi_ut_remove_allocation ( - u32 list_id, - struct acpi_debug_mem_block *address, - u32 component, - char *module, - u32 line); - -#ifdef ACPI_FUTURE_USAGE +#ifdef ACPI_FUTURE_USAGE void acpi_ut_dump_allocation_info ( void); -#endif +#endif /* ACPI_FUTURE_USAGE */ void acpi_ut_dump_allocations ( @@ -871,5 +740,4 @@ acpi_ut_dump_allocations ( char *module); #endif - #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 @@ /* prefixed opcodes */ -#define AML_EXTOP (u16) 0x005b - +#define AML_EXTOP (u16) 0x005b /* prefix for 2-byte opcodes */ #define AML_MUTEX_OP (u16) 0x5b01 #define AML_EVENT_OP (u16) 0x5b02 @@ -194,7 +193,6 @@ * Use only "Unknown" AML opcodes, don't attempt to use * any valid ACPI ASCII values (A-Z, 0-9, '-') */ - #define AML_INT_NAMEPATH_OP (u16) 0x002d #define AML_INT_NAMEDFIELD_OP (u16) 0x0030 #define AML_INT_RESERVEDFIELD_OP (u16) 0x0031 @@ -214,7 +212,6 @@ * There can be up to 31 unique argument types * Zero is reserved as end-of-list indicator */ - #define ARGP_BYTEDATA 0x01 #define ARGP_BYTELIST 0x02 #define ARGP_CHARLIST 0x03 @@ -295,7 +292,6 @@ /* * opcode groups and types */ - #define OPGRP_NAMED 0x01 #define OPGRP_FIELD 0x02 #define OPGRP_BYTELIST 0x04 @@ -381,6 +377,12 @@ #define AML_TYPE_UNDEFINED 0x19 #define AML_TYPE_BOGUS 0x1A +/* AML Package Length encodings */ + +#define ACPI_AML_PACKAGE_TYPE1 0x40 +#define ACPI_AML_PACKAGE_TYPE2 0x4000 +#define ACPI_AML_PACKAGE_TYPE3 0x400000 +#define ACPI_AML_PACKAGE_TYPE4 0x40000000 /* * 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 @@ #endif #endif /* !DEBUGGER_THREADING */ + /****************************************************************************** * * C library configuration @@ -209,7 +210,6 @@ * Use the standard C library headers. * We want to keep these to a minimum. */ - #ifdef ACPI_USE_STANDARD_HEADERS /* * Use the standard headers from the standard locations @@ -224,14 +224,8 @@ /* * We will be linking to the standard Clib functions */ - #define ACPI_STRSTR(s1,s2) strstr((s1), (s2)) #define ACPI_STRCHR(s1,c) strchr((s1), (c)) - -#ifdef ACPI_FUTURE_USAGE -#define ACPI_STRUPR(s) (void) acpi_ut_strupr ((s)) -#endif - #define ACPI_STRLEN(s) (acpi_size) strlen((s)) #define ACPI_STRCPY(d,s) (void) strcpy((d), (s)) #define ACPI_STRNCPY(d,s,n) (void) strncpy((d), (s), (acpi_size)(n)) @@ -254,14 +248,15 @@ #define ACPI_IS_ALPHA isalpha #define ACPI_IS_ASCII isascii +#else + /****************************************************************************** * * Not using native C library, use local implementations * *****************************************************************************/ -#else -/* + /* * Use local definitions of C library macros and functions * NOTE: The function implementations may not be as efficient * as an inline or assembly code implementation provided by a @@ -278,14 +273,12 @@ typedef char *va_list; /* * Storage alignment properties */ - #define _AUPBND (sizeof (acpi_native_int) - 1) #define _ADNBND (sizeof (acpi_native_int) - 1) /* * Variable argument list macro definitions */ - #define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd))) #define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND)))) #define va_end(ap) (void) 0 @@ -296,11 +289,6 @@ typedef char *va_list; #define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2)) #define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c)) - -#ifdef ACPI_FUTURE_USAGE -#define ACPI_STRUPR(s) (void) acpi_ut_strupr ((s)) -#endif - #define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s)) #define ACPI_STRCPY(d,s) (void) acpi_ut_strcpy ((d), (s)) #define ACPI_STRNCPY(d,s,n) (void) acpi_ut_strncpy ((d), (s), (acpi_size)(n)) |