summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-03-09 13:46:24 -0500
committerLen Brown <lenb@dhcppc3.>2005-03-09 13:46:24 -0500
commit4ca5d141df1bf28ec3047f8ef08041bb407452a8 (patch)
tree306394bc00648129fcdabb331d24c2e0ea3e0e31 /include
parentd1833bdaf4b380966686ba201640c6df139179e3 (diff)
[ACPI] ACPICA 20050309 from Bob Moore
The string-to-buffer implicit conversion code has been modified again after a change to the ACPI specification. In order to match the behavior of the other major ACPI implementation, the target buffer is no longer truncated if the source string is smaller than an existing target buffer. This change requires an update to the ACPI spec, and should eliminate the recent AE_AML_BUFFER_LIMIT issues. The "implicit return" support was rewritten to a new algorithm that solves the general case. Rather than attempt to determine when a method is about to exit, the result of every ASL operator is saved momentarily until the very next ASL operator is executed. Therefore, no matter how the method exits, there will always be a saved implicit return value. This feature is only enabled with the acpi_gbl_enable_interpreter_slack flag which Linux enables unless "acpi=strict". This should eliminate AE_AML_NO_RETURN_VALUE errors. Implemented implicit conversion support for the predicate (operand) of the If, Else, and While operators. String and Buffer arguments are automatically converted to Integers. Changed the string-to-integer conversion behavior to match the new ACPI errata: "If no integer object exists, a new integer is created. The ASCII string is interpreted as a hexadecimal constant. Each string character is interpreted as a hexadecimal value ('0'-'9', 'A'-'F', 'a', 'f'), starting with the first character as the most significant digit, and ending with the first non-hexadecimal character or end-of-string." This means that the first non-hex character terminates the conversion and this is the code that was changed. Fixed a problem where the ObjectType operator would fail (fault) when used on an Index of a Package which pointed to a null package element. The operator now properly returns zero (Uninitialized) in this case. Fixed a problem where the While operator used excessive memory by not properly popping the result stack during execution. There was no memory leak after execution, however. (Code provided by Valery Podrezov.) Fixed a problem where references to control methods within Package objects caused the method to be invoked, instead of producing a reference object pointing to the method. Restructured and simplified the pswalk.c module (acpi_ps_delete_parse_tree) to improve performance and reduce code size. (Code provided by Alexey Starikovskiy.) Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acdispat.h10
-rw-r--r--include/acpi/acinterp.h1
-rw-r--r--include/acpi/acstruct.h1
4 files changed, 12 insertions, 2 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 9a98d99a7932..2b41e47b7d80 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -64,7 +64,7 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20050303
+#define ACPI_CA_VERSION 0x20050309
/*
* OS name, used for the _OS object. The _OS object is essentially obsolete,
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 4efbb8d7e704..237d63433581 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -374,6 +374,16 @@ acpi_ds_create_node (
/* dsutils - Parser/Interpreter interface utility routines */
+void
+acpi_ds_clear_implicit_return (
+ struct acpi_walk_state *walk_state);
+
+u8
+acpi_ds_do_implicit_return (
+ union acpi_operand_object *return_desc,
+ struct acpi_walk_state *walk_state,
+ u8 add_reference);
+
u8
acpi_ds_is_result_used (
union acpi_parse_object *op,
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h
index 78395916e4cf..c5301f5ffaf4 100644
--- a/include/acpi/acinterp.h
+++ b/include/acpi/acinterp.h
@@ -617,7 +617,6 @@ acpi_ex_store_object_to_object (
acpi_status
acpi_ex_store_buffer_to_buffer (
- acpi_object_type original_src_type,
union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
index 6b2284c9e894..c97843f6bcbc 100644
--- a/include/acpi/acstruct.h
+++ b/include/acpi/acstruct.h
@@ -94,6 +94,7 @@ struct acpi_walk_state
union acpi_generic_state *control_state; /* List of control states (nested IFs) */
struct acpi_namespace_node *deferred_node; /* Used when executing deferred opcodes */
struct acpi_gpe_event_info *gpe_event_info; /* Info for GPE (_Lxx/_Exx methods only */
+ union acpi_operand_object *implicit_return_obj;
struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
struct acpi_namespace_node *method_call_node; /* Called method Node*/
union acpi_parse_object *method_call_op; /* method_call Op if running a method */