aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exoparg6.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/executer/exoparg6.c
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (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/exoparg6.c')
-rw-r--r--drivers/acpi/executer/exoparg6.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c
index d32624331626..17f81d42ee41 100644
--- a/drivers/acpi/executer/exoparg6.c
+++ b/drivers/acpi/executer/exoparg6.c
@@ -75,6 +75,14 @@
75 * fully resolved operands. 75 * fully resolved operands.
76!*/ 76!*/
77 77
78/* Local prototypes */
79
80static u8
81acpi_ex_do_match (
82 u32 match_op,
83 union acpi_operand_object *package_obj,
84 union acpi_operand_object *match_obj);
85
78 86
79/******************************************************************************* 87/*******************************************************************************
80 * 88 *
@@ -92,7 +100,7 @@
92 * 100 *
93 ******************************************************************************/ 101 ******************************************************************************/
94 102
95u8 103static u8
96acpi_ex_do_match ( 104acpi_ex_do_match (
97 u32 match_op, 105 u32 match_op,
98 union acpi_operand_object *package_obj, 106 union acpi_operand_object *package_obj,
@@ -216,11 +224,12 @@ acpi_ex_opcode_6A_0T_1R (
216 union acpi_operand_object **operand = &walk_state->operands[0]; 224 union acpi_operand_object **operand = &walk_state->operands[0];
217 union acpi_operand_object *return_desc = NULL; 225 union acpi_operand_object *return_desc = NULL;
218 acpi_status status = AE_OK; 226 acpi_status status = AE_OK;
219 u32 index; 227 acpi_integer index;
220 union acpi_operand_object *this_element; 228 union acpi_operand_object *this_element;
221 229
222 230
223 ACPI_FUNCTION_TRACE_STR ("ex_opcode_6A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode)); 231 ACPI_FUNCTION_TRACE_STR ("ex_opcode_6A_0T_1R",
232 acpi_ps_get_opcode_name (walk_state->opcode));
224 233
225 234
226 switch (walk_state->opcode) { 235 switch (walk_state->opcode) {
@@ -241,9 +250,11 @@ acpi_ex_opcode_6A_0T_1R (
241 250
242 /* Get the package start_index, validate against the package length */ 251 /* Get the package start_index, validate against the package length */
243 252
244 index = (u32) operand[5]->integer.value; 253 index = operand[5]->integer.value;
245 if (index >= (u32) operand[0]->package.count) { 254 if (index >= operand[0]->package.count) {
246 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Index beyond package end\n")); 255 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
256 "Index (%X%8.8X) beyond package end (%X)\n",
257 ACPI_FORMAT_UINT64 (index), operand[0]->package.count));
247 status = AE_AML_PACKAGE_LIMIT; 258 status = AE_AML_PACKAGE_LIMIT;
248 goto cleanup; 259 goto cleanup;
249 } 260 }
@@ -314,13 +325,12 @@ acpi_ex_opcode_6A_0T_1R (
314 325
315 default: 326 default:
316 327
317 ACPI_REPORT_ERROR (("acpi_ex_opcode_3A_0T_0R: Unknown opcode %X\n", 328 ACPI_REPORT_ERROR (("acpi_ex_opcode_6A_0T_1R: Unknown opcode %X\n",
318 walk_state->opcode)); 329 walk_state->opcode));
319 status = AE_AML_BAD_OPCODE; 330 status = AE_AML_BAD_OPCODE;
320 goto cleanup; 331 goto cleanup;
321 } 332 }
322 333
323
324 walk_state->result_obj = return_desc; 334 walk_state->result_obj = return_desc;
325 335
326 336