aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-04-10 11:06:36 -0400
committerLen Brown <len.brown@intel.com>2008-04-22 14:29:20 -0400
commit773069d48030e670cf2032a13ddf16a2e0034df3 (patch)
tree2f45fd7e90600d26c08c641c75059eb0b15d6dcd /include
parent4b119e21d0c66c22e8ca03df05d9de623d0eb50f (diff)
ACPICA: Several fixes for internal method result stack
fixes STACK_OVERFLOW exception on nested method calls. internal bugzilla 262 and 275. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acconfig.h13
-rw-r--r--include/acpi/acdispat.h16
-rw-r--r--include/acpi/aclocal.h5
-rw-r--r--include/acpi/acstruct.h3
4 files changed, 18 insertions, 19 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 422f29c06c77..d13bab452b83 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -63,7 +63,7 @@
63 63
64/* Current ACPICA subsystem version in YYYYMMDD format */ 64/* Current ACPICA subsystem version in YYYYMMDD format */
65 65
66#define ACPI_CA_VERSION 0x20070126 66#define ACPI_CA_VERSION 0x20070307
67 67
68/* 68/*
69 * OS name, used for the _OS object. The _OS object is essentially obsolete, 69 * OS name, used for the _OS object. The _OS object is essentially obsolete,
@@ -150,6 +150,17 @@
150#define ACPI_OBJ_NUM_OPERANDS 8 150#define ACPI_OBJ_NUM_OPERANDS 8
151#define ACPI_OBJ_MAX_OPERAND 7 151#define ACPI_OBJ_MAX_OPERAND 7
152 152
153/* Number of elements in the Result Stack frame, can be an arbitrary value */
154
155#define ACPI_RESULTS_FRAME_OBJ_NUM 8
156
157/*
158 * Maximal number of elements the Result Stack can contain,
159 * it may be an arbitray value not exceeding the types of
160 * result_size and result_count (now u8).
161 */
162#define ACPI_RESULTS_OBJ_NUM_MAX 255
163
153/* Names within the namespace are 4 bytes long */ 164/* Names within the namespace are 4 bytes long */
154 165
155#define ACPI_NAME_SIZE 4 166#define ACPI_NAME_SIZE 4
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 7f690bb0f02f..70d649e92c41 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -303,7 +303,7 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
303 u32 aml_length, 303 u32 aml_length,
304 struct acpi_evaluate_info *info, u8 pass_number); 304 struct acpi_evaluate_info *info, u8 pass_number);
305 305
306acpi_status 306void
307acpi_ds_obj_stack_pop_and_delete(u32 pop_count, 307acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
308 struct acpi_walk_state *walk_state); 308 struct acpi_walk_state *walk_state);
309 309
@@ -316,21 +316,11 @@ void
316acpi_ds_push_walk_state(struct acpi_walk_state *walk_state, 316acpi_ds_push_walk_state(struct acpi_walk_state *walk_state,
317 struct acpi_thread_state *thread); 317 struct acpi_thread_state *thread);
318 318
319acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state);
320
321acpi_status acpi_ds_result_stack_push(struct acpi_walk_state *walk_state);
322
323acpi_status acpi_ds_result_stack_clear(struct acpi_walk_state *walk_state); 319acpi_status acpi_ds_result_stack_clear(struct acpi_walk_state *walk_state);
324 320
325struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state 321struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state
326 *thread); 322 *thread);
327 323
328#ifdef ACPI_FUTURE_USAGE
329acpi_status
330acpi_ds_result_remove(union acpi_operand_object **object,
331 u32 index, struct acpi_walk_state *walk_state);
332#endif
333
334acpi_status 324acpi_status
335acpi_ds_result_pop(union acpi_operand_object **object, 325acpi_ds_result_pop(union acpi_operand_object **object,
336 struct acpi_walk_state *walk_state); 326 struct acpi_walk_state *walk_state);
@@ -339,8 +329,4 @@ acpi_status
339acpi_ds_result_push(union acpi_operand_object *object, 329acpi_ds_result_push(union acpi_operand_object *object,
340 struct acpi_walk_state *walk_state); 330 struct acpi_walk_state *walk_state);
341 331
342acpi_status
343acpi_ds_result_pop_from_bottom(union acpi_operand_object **object,
344 struct acpi_walk_state *walk_state);
345
346#endif /* _ACDISPAT_H_ */ 332#endif /* _ACDISPAT_H_ */
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index 202cd4242ba1..0b7c9a9e3c84 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -522,9 +522,8 @@ struct acpi_thread_state {
522 * AML arguments 522 * AML arguments
523 */ 523 */
524struct acpi_result_values { 524struct acpi_result_values {
525 ACPI_STATE_COMMON u8 num_results; 525 ACPI_STATE_COMMON
526 u8 last_insert; 526 union acpi_operand_object *obj_desc[ACPI_RESULTS_FRAME_OBJ_NUM];
527 union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS];
528}; 527};
529 528
530typedef 529typedef
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
index 88482655407f..19b838dc1a16 100644
--- a/include/acpi/acstruct.h
+++ b/include/acpi/acstruct.h
@@ -80,12 +80,15 @@ struct acpi_walk_state {
80 u16 opcode; /* Current AML opcode */ 80 u16 opcode; /* Current AML opcode */
81 u8 next_op_info; /* Info about next_op */ 81 u8 next_op_info; /* Info about next_op */
82 u8 num_operands; /* Stack pointer for Operands[] array */ 82 u8 num_operands; /* Stack pointer for Operands[] array */
83 u8 operand_index; /* Index into operand stack, to be used by acpi_ds_obj_stack_push */
83 acpi_owner_id owner_id; /* Owner of objects created during the walk */ 84 acpi_owner_id owner_id; /* Owner of objects created during the walk */
84 u8 last_predicate; /* Result of last predicate */ 85 u8 last_predicate; /* Result of last predicate */
85 u8 current_result; 86 u8 current_result;
86 u8 return_used; 87 u8 return_used;
87 u8 scope_depth; 88 u8 scope_depth;
88 u8 pass_number; /* Parse pass during table load */ 89 u8 pass_number; /* Parse pass during table load */
90 u8 result_size; /* Total elements for the result stack */
91 u8 result_count; /* Current number of occupied elements of result stack */
89 u32 aml_offset; 92 u32 aml_offset;
90 u32 arg_types; 93 u32 arg_types;
91 u32 method_breakpoint; /* For single stepping */ 94 u32 method_breakpoint; /* For single stepping */