diff options
author | Robert Moore <robert.moore@intel.com> | 2005-04-18 22:49:35 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-07-12 00:08:52 -0400 |
commit | 44f6c01242da4e162f28d8e1216a8c7a91174605 (patch) | |
tree | 53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/executer/exoparg3.c | |
parent | ebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff) |
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index"
argument to an ASL function was still (internally) 32
bits instead of the required 64 bits. This was the Index
argument to the Index, Mid, and Match operators.
The "strupr" function is now permanently local
(acpi_ut_strupr), since this is not a POSIX-defined
function and not present in most kernel-level C
libraries. References to the C library strupr function
have been removed from the headers.
Completed the deployment of static
functions/prototypes. All prototypes with the static
attribute have been moved from the headers to the owning
C file.
ACPICA 20050329 from Bob Moore
An error is now generated if an attempt is made to create
a Buffer Field of length zero (A CreateField with a length
operand of zero.)
The interpreter now issues a warning whenever executable
code at the module level is detected during ACPI table
load. This will give some idea of the prevalence of this
type of code.
Implemented support for references to named objects (other
than control methods) within package objects.
Enhanced package object output for the debug
object. Package objects are now completely dumped, showing
all elements.
Enhanced miscellaneous object output for the debug
object. Any object can now be written to the debug object
(for example, a device object can be written, and the type
of the object will be displayed.)
The "static" qualifier has been added to all local
functions across the core subsystem.
The number of "long" lines (> 80 chars) within the source
has been significantly reduced, by about 1/3.
Cleaned up all header files to ensure that all CA/iASL
functions are prototyped (even static functions) and the
formatting is consistent.
Two new header files have been added, acopcode.h and
acnames.h.
Removed several obsolete functions that were no longer
used.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/executer/exoparg3.c')
-rw-r--r-- | drivers/acpi/executer/exoparg3.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c index 29d0b167745d..23b068adbf58 100644 --- a/drivers/acpi/executer/exoparg3.c +++ b/drivers/acpi/executer/exoparg3.c | |||
@@ -97,11 +97,12 @@ acpi_ex_opcode_3A_0T_0R ( | |||
97 | acpi_status status = AE_OK; | 97 | acpi_status status = AE_OK; |
98 | 98 | ||
99 | 99 | ||
100 | ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode)); | 100 | ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_0T_0R", |
101 | acpi_ps_get_opcode_name (walk_state->opcode)); | ||
101 | 102 | ||
102 | 103 | ||
103 | switch (walk_state->opcode) { | 104 | switch (walk_state->opcode) { |
104 | case AML_FATAL_OP: /* Fatal (fatal_type fatal_code fatal_arg) */ | 105 | case AML_FATAL_OP: /* Fatal (fatal_type fatal_code fatal_arg) */ |
105 | 106 | ||
106 | ACPI_DEBUG_PRINT ((ACPI_DB_INFO, | 107 | ACPI_DEBUG_PRINT ((ACPI_DB_INFO, |
107 | "fatal_op: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", | 108 | "fatal_op: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", |
@@ -116,9 +117,8 @@ acpi_ex_opcode_3A_0T_0R ( | |||
116 | fatal->argument = (u32) operand[2]->integer.value; | 117 | fatal->argument = (u32) operand[2]->integer.value; |
117 | } | 118 | } |
118 | 119 | ||
119 | /* | 120 | /* Always signal the OS! */ |
120 | * Always signal the OS! | 121 | |
121 | */ | ||
122 | status = acpi_os_signal (ACPI_SIGNAL_FATAL, fatal); | 122 | status = acpi_os_signal (ACPI_SIGNAL_FATAL, fatal); |
123 | 123 | ||
124 | /* Might return while OS is shutting down, just continue */ | 124 | /* Might return while OS is shutting down, just continue */ |
@@ -162,21 +162,23 @@ acpi_ex_opcode_3A_1T_1R ( | |||
162 | union acpi_operand_object *return_desc = NULL; | 162 | union acpi_operand_object *return_desc = NULL; |
163 | char *buffer; | 163 | char *buffer; |
164 | acpi_status status = AE_OK; | 164 | acpi_status status = AE_OK; |
165 | acpi_native_uint index; | 165 | acpi_integer index; |
166 | acpi_size length; | 166 | acpi_size length; |
167 | 167 | ||
168 | 168 | ||
169 | ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode)); | 169 | ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_1T_1R", |
170 | acpi_ps_get_opcode_name (walk_state->opcode)); | ||
170 | 171 | ||
171 | 172 | ||
172 | switch (walk_state->opcode) { | 173 | switch (walk_state->opcode) { |
173 | case AML_MID_OP: /* Mid (Source[0], Index[1], Length[2], Result[3]) */ | 174 | case AML_MID_OP: /* Mid (Source[0], Index[1], Length[2], Result[3]) */ |
174 | 175 | ||
175 | /* | 176 | /* |
176 | * Create the return object. The Source operand is guaranteed to be | 177 | * Create the return object. The Source operand is guaranteed to be |
177 | * either a String or a Buffer, so just use its type. | 178 | * either a String or a Buffer, so just use its type. |
178 | */ | 179 | */ |
179 | return_desc = acpi_ut_create_internal_object (ACPI_GET_OBJECT_TYPE (operand[0])); | 180 | return_desc = acpi_ut_create_internal_object ( |
181 | ACPI_GET_OBJECT_TYPE (operand[0])); | ||
180 | if (!return_desc) { | 182 | if (!return_desc) { |
181 | status = AE_NO_MEMORY; | 183 | status = AE_NO_MEMORY; |
182 | goto cleanup; | 184 | goto cleanup; |
@@ -184,7 +186,7 @@ acpi_ex_opcode_3A_1T_1R ( | |||
184 | 186 | ||
185 | /* Get the Integer values from the objects */ | 187 | /* Get the Integer values from the objects */ |
186 | 188 | ||
187 | index = (acpi_native_uint) operand[1]->integer.value; | 189 | index = operand[1]->integer.value; |
188 | length = (acpi_size) operand[2]->integer.value; | 190 | length = (acpi_size) operand[2]->integer.value; |
189 | 191 | ||
190 | /* | 192 | /* |
@@ -197,7 +199,8 @@ acpi_ex_opcode_3A_1T_1R ( | |||
197 | 199 | ||
198 | if ((index + length) > | 200 | if ((index + length) > |
199 | operand[0]->string.length) { | 201 | operand[0]->string.length) { |
200 | length = (acpi_size) operand[0]->string.length - index; | 202 | length = (acpi_size) operand[0]->string.length - |
203 | (acpi_size) index; | ||
201 | } | 204 | } |
202 | 205 | ||
203 | /* Allocate a new buffer for the String/Buffer */ | 206 | /* Allocate a new buffer for the String/Buffer */ |