u32 value;
acpi_status status = AE_OK;
- ACPI_FUNCTION_TRACE_STR(ex_opcode_2A_0T_0R,
+ ACPI_FUNCTION_TRACE_STR("ex_opcode_2A_0T_0R",
acpi_ps_get_opcode_name(walk_state->opcode));
/* Examine the opcode */
#ifdef ACPI_GPE_NOTIFY_CHECK
/*
* GPE method wake/notify check. Here, we want to ensure that we
- * don't receive any "DeviceWake" Notifies from a GPE _Lxx or _Exx
+ * don't receive any "device_wake" Notifies from a GPE _Lxx or _Exx
* GPE method during system runtime. If we do, the GPE is marked
* as "wake-only" and disabled.
*
acpi_ev_check_for_wake_only_gpe(walk_state->
gpe_event_info);
if (ACPI_FAILURE(status)) {
-
/* AE_WAKE_ONLY_GPE only error, means ignore this notify */
return_ACPI_STATUS(AE_OK)
union acpi_operand_object *return_desc2 = NULL;
acpi_status status;
- ACPI_FUNCTION_TRACE_STR(ex_opcode_2A_2T_1R,
+ ACPI_FUNCTION_TRACE_STR("ex_opcode_2A_2T_1R",
acpi_ps_get_opcode_name(walk_state->opcode));
/* Execute the opcode */
acpi_ut_remove_reference(return_desc2);
if (ACPI_FAILURE(status)) {
-
/* Delete the return object */
acpi_ut_remove_reference(return_desc1);
acpi_status status = AE_OK;
acpi_size length;
- ACPI_FUNCTION_TRACE_STR(ex_opcode_2A_1T_1R,
+ ACPI_FUNCTION_TRACE_STR("ex_opcode_2A_1T_1R",
acpi_ps_get_opcode_name(walk_state->opcode));
/* Execute the opcode */
if (walk_state->op_info->flags & AML_MATH) {
-
/* All simple math opcodes (add, etc.) */
return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER);
goto cleanup;
}
- /* Initialize the Index reference object */
-
index = operand[1]->integer.value;
- return_desc->reference.offset = (u32) index;
- return_desc->reference.opcode = AML_INDEX_OP;
- /*
- * At this point, the Source operand is a String, Buffer, or Package.
- * Verify that the index is within range.
- */
- switch (ACPI_GET_OBJECT_TYPE(operand[0])) {
- case ACPI_TYPE_STRING:
+ /* At this point, the Source operand is a Package, Buffer, or String */
- if (index >= operand[0]->string.length) {
- status = AE_AML_STRING_LIMIT;
- }
-
- return_desc->reference.target_type =
- ACPI_TYPE_BUFFER_FIELD;
- break;
-
- case ACPI_TYPE_BUFFER:
-
- if (index >= operand[0]->buffer.length) {
- status = AE_AML_BUFFER_LIMIT;
- }
-
- return_desc->reference.target_type =
- ACPI_TYPE_BUFFER_FIELD;
- break;
-
- case ACPI_TYPE_PACKAGE:
+ if (ACPI_GET_OBJECT_TYPE(operand[0]) == ACPI_TYPE_PACKAGE) {
+ /* Object to be indexed is a Package */
if (index >= operand[0]->package.count) {
+ ACPI_ERROR((AE_INFO,
+ "Index value (%X%8.8X) beyond package end (%X)",
+ ACPI_FORMAT_UINT64(index),
+ operand[0]->package.count));
status = AE_AML_PACKAGE_LIMIT;
+ goto cleanup;
}
return_desc->reference.target_type = ACPI_TYPE_PACKAGE;
+ return_desc->reference.object = operand[0];
return_desc->reference.where =
&operand[0]->package.elements[index];
- break;
-
- default:
-
- status = AE_AML_INTERNAL;
- goto cleanup;
- }
+ } else {
+ /* Object to be indexed is a Buffer/String */
- /* Failure means that the Index was beyond the end of the object */
+ if (index >= operand[0]->buffer.length) {
+ ACPI_ERROR((AE_INFO,
+ "Index value (%X%8.8X) beyond end of buffer (%X)",
+ ACPI_FORMAT_UINT64(index),
+ operand[0]->buffer.length));
+ status = AE_AML_BUFFER_LIMIT;
+ goto cleanup;
+ }
- if (ACPI_FAILURE(status)) {
- ACPI_EXCEPTION((AE_INFO, status,
- "Index (%X%8.8X) is beyond end of object",
- ACPI_FORMAT_UINT64(index)));
- goto cleanup;
+ return_desc->reference.target_type =
+ ACPI_TYPE_BUFFER_FIELD;
+ return_desc->reference.object = operand[0];
}
/*
- * Save the target object and add a reference to it for the life
- * of the index
+ * Add a reference to the target package/buffer/string for the life
+ * of the index.
*/
- return_desc->reference.object = operand[0];
acpi_ut_add_reference(operand[0]);
+ /* Complete the Index reference object */
+
+ return_desc->reference.opcode = AML_INDEX_OP;
+ return_desc->reference.offset = (u32) index;
+
/* Store the reference to the Target */
status = acpi_ex_store(return_desc, operand[2], walk_state);
acpi_status status = AE_OK;
u8 logical_result = FALSE;
- ACPI_FUNCTION_TRACE_STR(ex_opcode_2A_0T_1R,
+ ACPI_FUNCTION_TRACE_STR("ex_opcode_2A_0T_1R",
acpi_ps_get_opcode_name(walk_state->opcode));
/* Create the internal return object */
/* Execute the Opcode */
if (walk_state->op_info->flags & AML_LOGICAL_NUMERIC) {
-
/* logical_op (Operand0, Operand1) */
status = acpi_ex_do_logical_numeric_op(walk_state->opcode,
value, &logical_result);
goto store_logical_result;
} else if (walk_state->op_info->flags & AML_LOGICAL) {
-
/* logical_op (Operand0, Operand1) */
status = acpi_ex_do_logical_op(walk_state->opcode, operand[0],