diff options
author | Bob Moore <robert.moore@intel.com> | 2008-09-26 23:08:41 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-22 23:14:45 -0400 |
commit | 1044f1f65b7df2aae979e397904c4985eeb99ba2 (patch) | |
tree | 8feb6f2db4f36b75d8c7126d51a7b35e57e13194 /include/acpi | |
parent | 2425a0967f29b196fad5d4f726c9502679284656 (diff) |
ACPICA: Cleanup for internal Reference Object
Fix some sloppiness in the Reference object. No longer use AML
opcodes to differentiate the types, introduce new reference
Class. Cleanup the debug output code.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acdebug.h | 4 | ||||
-rw-r--r-- | include/acpi/acdispat.h | 6 | ||||
-rw-r--r-- | include/acpi/acobject.h | 31 |
3 files changed, 30 insertions, 11 deletions
diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h index c5a1b50d8d94..a4fb001d96f1 100644 --- a/include/acpi/acdebug.h +++ b/include/acpi/acdebug.h | |||
@@ -123,6 +123,10 @@ void acpi_db_check_integrity(void); | |||
123 | 123 | ||
124 | void acpi_db_generate_gpe(char *gpe_arg, char *block_arg); | 124 | void acpi_db_generate_gpe(char *gpe_arg, char *block_arg); |
125 | 125 | ||
126 | void acpi_db_check_predefined_names(void); | ||
127 | |||
128 | void acpi_db_batch_execute(void); | ||
129 | |||
126 | /* | 130 | /* |
127 | * dbdisply - debug display commands | 131 | * dbdisply - debug display commands |
128 | */ | 132 | */ |
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h index 21a73a105d0a..6291904be01e 100644 --- a/include/acpi/acdispat.h +++ b/include/acpi/acdispat.h | |||
@@ -157,7 +157,7 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number); | |||
157 | * dsmthdat - method data (locals/args) | 157 | * dsmthdat - method data (locals/args) |
158 | */ | 158 | */ |
159 | acpi_status | 159 | acpi_status |
160 | acpi_ds_store_object_to_local(u16 opcode, | 160 | acpi_ds_store_object_to_local(u8 type, |
161 | u32 index, | 161 | u32 index, |
162 | union acpi_operand_object *src_desc, | 162 | union acpi_operand_object *src_desc, |
163 | struct acpi_walk_state *walk_state); | 163 | struct acpi_walk_state *walk_state); |
@@ -173,7 +173,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state); | |||
173 | u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc); | 173 | u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc); |
174 | 174 | ||
175 | acpi_status | 175 | acpi_status |
176 | acpi_ds_method_data_get_value(u16 opcode, | 176 | acpi_ds_method_data_get_value(u8 type, |
177 | u32 index, | 177 | u32 index, |
178 | struct acpi_walk_state *walk_state, | 178 | struct acpi_walk_state *walk_state, |
179 | union acpi_operand_object **dest_desc); | 179 | union acpi_operand_object **dest_desc); |
@@ -184,7 +184,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params, | |||
184 | struct acpi_walk_state *walk_state); | 184 | struct acpi_walk_state *walk_state); |
185 | 185 | ||
186 | acpi_status | 186 | acpi_status |
187 | acpi_ds_method_data_get_node(u16 opcode, | 187 | acpi_ds_method_data_get_node(u8 type, |
188 | u32 index, | 188 | u32 index, |
189 | struct acpi_walk_state *walk_state, | 189 | struct acpi_walk_state *walk_state, |
190 | struct acpi_namespace_node **node); | 190 | struct acpi_namespace_node **node); |
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 7a8a652ffb78..eb6f038b03d9 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h | |||
@@ -308,19 +308,34 @@ struct acpi_object_addr_handler { | |||
308 | *****************************************************************************/ | 308 | *****************************************************************************/ |
309 | 309 | ||
310 | /* | 310 | /* |
311 | * The Reference object type is used for these opcodes: | 311 | * The Reference object is used for these opcodes: |
312 | * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op | 312 | * Arg[0-6], Local[0-7], index_op, name_op, ref_of_op, load_op, load_table_op, debug_op |
313 | * The Reference.Class differentiates these types. | ||
313 | */ | 314 | */ |
314 | struct acpi_object_reference { | 315 | struct acpi_object_reference { |
315 | ACPI_OBJECT_COMMON_HEADER u8 target_type; /* Used for index_op */ | 316 | ACPI_OBJECT_COMMON_HEADER u8 class; /* Reference Class */ |
316 | u16 opcode; | 317 | u8 target_type; /* Used for Index Op */ |
318 | u8 reserved; | ||
317 | void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ | 319 | void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ |
318 | struct acpi_namespace_node *node; | 320 | struct acpi_namespace_node *node; /* ref_of or Namepath */ |
319 | union acpi_operand_object **where; | 321 | union acpi_operand_object **where; /* Target of Index */ |
320 | u32 offset; /* Used for arg_op, local_op, and index_op */ | 322 | u32 value; /* Used for Local/Arg/Index/ddb_handle */ |
321 | u32 value; /* Used for ddb_handle */ | ||
322 | }; | 323 | }; |
323 | 324 | ||
325 | /* Values for Reference.Class above */ | ||
326 | |||
327 | typedef enum { | ||
328 | ACPI_REFCLASS_LOCAL = 0, /* Method local */ | ||
329 | ACPI_REFCLASS_ARG = 1, /* Method argument */ | ||
330 | ACPI_REFCLASS_REFOF = 2, /* Result of ref_of() TBD: Split to Ref/Node and Ref/operand_obj? */ | ||
331 | ACPI_REFCLASS_INDEX = 3, /* Result of Index() */ | ||
332 | ACPI_REFCLASS_TABLE = 4, /* ddb_handle - Load(), load_table() */ | ||
333 | ACPI_REFCLASS_NAME = 5, /* Reference to a named object */ | ||
334 | ACPI_REFCLASS_DEBUG = 6, /* Debug object */ | ||
335 | |||
336 | ACPI_REFCLASS_MAX = 6 | ||
337 | } ACPI_REFERENCE_CLASSES; | ||
338 | |||
324 | /* | 339 | /* |
325 | * Extra object is used as additional storage for types that | 340 | * Extra object is used as additional storage for types that |
326 | * have AML code in their declarations (term_args) that must be | 341 | * have AML code in their declarations (term_args) that must be |