[ACPI] ACPICA 20060127

Implemented support in the Resource Manager to allow
unresolved namestring references within resource package
objects for the _PRT method. This support is in addition
to the previously implemented unresolved reference
support within the AML parser. If the interpreter slack
mode is enabled (true on Linux unless acpi=strict),
these unresolved references will be passed through
to the caller as a NULL package entry.
http://bugzilla.kernel.org/show_bug.cgi?id=5741

Implemented and deployed new macros and functions for
error and warning messages across the subsystem. These
macros are simpler and generate less code than their
predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION,
ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_*
macros.

Implemented the acpi_cpu_flags type to simplify host OS
integration of the Acquire/Release Lock OSL interfaces.
Suggested by Steven Rostedt and Andrew Morton.

Fixed a problem where Alias ASL operators are sometimes
not correctly resolved. causing AE_AML_INTERNAL
http://bugzilla.kernel.org/show_bug.cgi?id=5189
http://bugzilla.kernel.org/show_bug.cgi?id=5674

Fixed several problems with the implementation of the
ConcatenateResTemplate ASL operator. As per the ACPI
specification, zero length buffers are now treated as a
single EndTag. One-length buffers always cause a fatal
exception. Non-zero length buffers that do not end with
a full 2-byte EndTag cause a fatal exception.

Fixed a possible structure overwrite in the
AcpiGetObjectInfo external interface. (With assistance
from Thomas Renninger)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Bob Moore 2006-01-27 16:43:00 -05:00 committed by Len Brown
parent 292dd876ee
commit b8e4d89357
95 changed files with 1352 additions and 828 deletions

View File

@ -128,7 +128,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
ACPI_IMODE_LOAD_PASS1, flags, walk_state,
&(node));
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(arg->common.value.string, status);
ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
return_ACPI_STATUS(status);
}
}
@ -232,7 +232,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
+ (acpi_integer) arg->common.value.size;
if (position > ACPI_UINT32_MAX) {
ACPI_REPORT_ERROR(("Bit offset within field too large (> 0xFFFFFFFF)\n"));
ACPI_ERROR((AE_INFO,
"Bit offset within field too large (> 0xFFFFFFFF)"));
return_ACPI_STATUS(AE_SUPPORT);
}
@ -268,7 +269,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
ACPI_NS_DONT_OPEN_SCOPE,
walk_state, &info->field_node);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR((char *)&arg->named.name,
ACPI_ERROR_NAMESPACE((char *)&arg->named.name,
status);
if (status != AE_ALREADY_EXISTS) {
return_ACPI_STATUS(status);
@ -293,7 +294,11 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
+ (acpi_integer) arg->common.value.size;
if (position > ACPI_UINT32_MAX) {
ACPI_REPORT_ERROR(("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", ACPI_CAST_PTR(char, &info->field_node->name)));
ACPI_ERROR((AE_INFO,
"Field [%4.4s] bit offset too large (> 0xFFFFFFFF)",
ACPI_CAST_PTR(char,
&info->field_node->
name)));
return_ACPI_STATUS(AE_SUPPORT);
}
@ -302,7 +307,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
default:
ACPI_REPORT_ERROR(("Invalid opcode in field list: %X\n",
ACPI_ERROR((AE_INFO,
"Invalid opcode in field list: %X",
arg->common.aml_opcode));
return_ACPI_STATUS(AE_AML_BAD_OPCODE);
}
@ -348,7 +354,7 @@ acpi_ds_create_field(union acpi_parse_object *op,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
walk_state, &region_node);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(arg->common.value.name, status);
ACPI_ERROR_NAMESPACE(arg->common.value.name, status);
return_ACPI_STATUS(status);
}
}
@ -430,7 +436,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
ACPI_NS_ERROR_IF_FOUND,
walk_state, &node);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR((char *)&arg->named.name,
ACPI_ERROR_NAMESPACE((char *)&arg->named.name,
status);
if (status != AE_ALREADY_EXISTS) {
return_ACPI_STATUS(status);
@ -487,7 +493,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
walk_state, &region_node);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(arg->common.value.name, status);
ACPI_ERROR_NAMESPACE(arg->common.value.name, status);
return_ACPI_STATUS(status);
}
}
@ -501,7 +507,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
ACPI_NS_SEARCH_PARENT, walk_state,
&info.register_node);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(arg->common.value.string, status);
ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
return_ACPI_STATUS(status);
}
@ -559,7 +565,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
ACPI_NS_SEARCH_PARENT, walk_state,
&info.register_node);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(arg->common.value.string, status);
ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
return_ACPI_STATUS(status);
}
@ -572,7 +578,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
ACPI_NS_SEARCH_PARENT, walk_state,
&info.data_register_node);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(arg->common.value.string, status);
ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
return_ACPI_STATUS(status);
}

View File

@ -105,7 +105,10 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
status = acpi_ds_initialize_region(obj_handle);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Region %p [%4.4s] - Init failure, %s\n", obj_handle, acpi_ut_get_node_name(obj_handle), acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"During Region initialization %p [%4.4s]",
obj_handle,
acpi_ut_get_node_name(obj_handle)));
}
info->op_region_count++;
@ -144,7 +147,11 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
*/
status = acpi_ds_parse_method(obj_handle);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("\n+Method %p [%4.4s] - parse failure, %s\n", obj_handle, acpi_ut_get_node_name(obj_handle), acpi_format_exception(status)));
ACPI_ERROR((AE_INFO,
"Method %p [%4.4s] - parse failure, %s",
obj_handle,
acpi_ut_get_node_name(obj_handle),
acpi_format_exception(status)));
/* This parse failed, but we will continue parsing more methods */
}
@ -206,8 +213,7 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc,
status = acpi_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX,
acpi_ds_init_one_object, &info, NULL);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("walk_namespace failed, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace"));
}
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,

View File

@ -141,7 +141,8 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
/* Prevent wraparound of thread count */
if (obj_desc->method.thread_count == ACPI_UINT8_MAX) {
ACPI_REPORT_ERROR(("Method reached maximum reentrancy limit (255)\n"));
ACPI_ERROR((AE_INFO,
"Method reached maximum reentrancy limit (255)"));
return_ACPI_STATUS(AE_AML_METHOD_LIMIT);
}
@ -470,7 +471,8 @@ void acpi_ds_terminate_control_method(struct acpi_walk_state *walk_state)
acpi_os_signal_semaphore(walk_state->method_desc->method.
semaphore, 1);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not signal method semaphore\n"));
ACPI_ERROR((AE_INFO,
"Could not signal method semaphore"));
/* Ignore error and continue cleanup */
}

View File

@ -260,7 +260,9 @@ acpi_ds_method_data_get_node(u16 opcode,
case AML_LOCAL_OP:
if (index > ACPI_METHOD_MAX_LOCAL) {
ACPI_REPORT_ERROR(("Local index %d is invalid (max %d)\n", index, ACPI_METHOD_MAX_LOCAL));
ACPI_ERROR((AE_INFO,
"Local index %d is invalid (max %d)",
index, ACPI_METHOD_MAX_LOCAL));
return_ACPI_STATUS(AE_AML_INVALID_INDEX);
}
@ -272,7 +274,8 @@ acpi_ds_method_data_get_node(u16 opcode,
case AML_ARG_OP:
if (index > ACPI_METHOD_MAX_ARG) {
ACPI_REPORT_ERROR(("Arg index %d is invalid (max %d)\n",
ACPI_ERROR((AE_INFO,
"Arg index %d is invalid (max %d)",
index, ACPI_METHOD_MAX_ARG));
return_ACPI_STATUS(AE_AML_INVALID_INDEX);
}
@ -283,7 +286,7 @@ acpi_ds_method_data_get_node(u16 opcode,
break;
default:
ACPI_REPORT_ERROR(("Opcode %d is invalid\n", opcode));
ACPI_ERROR((AE_INFO, "Opcode %d is invalid", opcode));
return_ACPI_STATUS(AE_AML_BAD_OPCODE);
}
@ -374,7 +377,7 @@ acpi_ds_method_data_get_value(u16 opcode,
/* Validate the object descriptor */
if (!dest_desc) {
ACPI_REPORT_ERROR(("Null object descriptor pointer\n"));
ACPI_ERROR((AE_INFO, "Null object descriptor pointer"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
@ -419,18 +422,24 @@ acpi_ds_method_data_get_value(u16 opcode,
switch (opcode) {
case AML_ARG_OP:
ACPI_REPORT_ERROR(("Uninitialized Arg[%d] at node %p\n", index, node));
ACPI_ERROR((AE_INFO,
"Uninitialized Arg[%d] at node %p",
index, node));
return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG);
case AML_LOCAL_OP:
ACPI_REPORT_ERROR(("Uninitialized Local[%d] at node %p\n", index, node));
ACPI_ERROR((AE_INFO,
"Uninitialized Local[%d] at node %p",
index, node));
return_ACPI_STATUS(AE_AML_UNINITIALIZED_LOCAL);
default:
ACPI_REPORT_ERROR(("Not a Arg/Local opcode: %X\n", opcode));
ACPI_ERROR((AE_INFO,
"Not a Arg/Local opcode: %X",
opcode));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
}

View File

@ -129,7 +129,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
return_ACPI_STATUS(AE_OK);
} else {
ACPI_REPORT_NSERROR(op->common.value.
ACPI_ERROR_NAMESPACE(op->common.value.
string, status);
}
@ -214,7 +214,9 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
byte_list = arg->named.next;
if (byte_list) {
if (byte_list->common.aml_opcode != AML_INT_BYTELIST_OP) {
ACPI_REPORT_ERROR(("Expecting bytelist, got AML opcode %X in op %p\n", byte_list->common.aml_opcode, byte_list));
ACPI_ERROR((AE_INFO,
"Expecting bytelist, got AML opcode %X in op %p",
byte_list->common.aml_opcode, byte_list));
acpi_ut_remove_reference(obj_desc);
return (AE_TYPE);
@ -540,7 +542,9 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
default:
ACPI_REPORT_ERROR(("Unknown constant opcode %X\n", opcode));
ACPI_ERROR((AE_INFO,
"Unknown constant opcode %X",
opcode));
status = AE_AML_OPERAND_TYPE;
break;
}
@ -555,7 +559,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
break;
default:
ACPI_REPORT_ERROR(("Unknown Integer type %X\n",
ACPI_ERROR((AE_INFO, "Unknown Integer type %X",
op_info->type));
status = AE_AML_OPERAND_TYPE;
break;
@ -634,7 +638,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
default:
ACPI_REPORT_ERROR(("Unimplemented data type: %X\n",
ACPI_ERROR((AE_INFO, "Unimplemented data type: %X",
ACPI_GET_OBJECT_TYPE(obj_desc)));
status = AE_AML_OPERAND_TYPE;

View File

@ -245,7 +245,9 @@ acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc)
node = obj_desc->buffer.node;
if (!node) {
ACPI_REPORT_ERROR(("No pointer back to NS node in buffer obj %p\n", obj_desc));
ACPI_ERROR((AE_INFO,
"No pointer back to NS node in buffer obj %p",
obj_desc));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -287,7 +289,8 @@ acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc)
node = obj_desc->package.node;
if (!node) {
ACPI_REPORT_ERROR(("No pointer back to NS node in package %p\n",
ACPI_ERROR((AE_INFO,
"No pointer back to NS node in package %p",
obj_desc));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -413,7 +416,9 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
/* Host object must be a Buffer */
if (ACPI_GET_OBJECT_TYPE(buffer_desc) != ACPI_TYPE_BUFFER) {
ACPI_REPORT_ERROR(("Target of Create Field is not a Buffer object - %s\n", acpi_ut_get_object_type_name(buffer_desc)));
ACPI_ERROR((AE_INFO,
"Target of Create Field is not a Buffer object - %s",
acpi_ut_get_object_type_name(buffer_desc)));
status = AE_AML_OPERAND_TYPE;
goto cleanup;
@ -425,7 +430,8 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
* after resolution in acpi_ex_resolve_operands().
*/
if (ACPI_GET_DESCRIPTOR_TYPE(result_desc) != ACPI_DESC_TYPE_NAMED) {
ACPI_REPORT_ERROR(("(%s) destination not a NS Node [%s]\n",
ACPI_ERROR((AE_INFO,
"(%s) destination not a NS Node [%s]",
acpi_ps_get_opcode_name(aml_opcode),
acpi_ut_get_descriptor_name(result_desc)));
@ -450,7 +456,8 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
/* Must have a valid (>0) bit count */
if (bit_count == 0) {
ACPI_REPORT_ERROR(("Attempt to create_field of length 0\n"));
ACPI_ERROR((AE_INFO,
"Attempt to create_field of length zero"));
status = AE_AML_OPERAND_VALUE;
goto cleanup;
}
@ -503,8 +510,8 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
default:
ACPI_REPORT_ERROR(("Unknown field creation opcode %02x\n",
aml_opcode));
ACPI_ERROR((AE_INFO,
"Unknown field creation opcode %02x", aml_opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;
}
@ -512,7 +519,12 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
/* Entire field must fit within the current length of the buffer */
if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) {
ACPI_REPORT_ERROR(("Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n", acpi_ut_get_node_name(result_desc), bit_offset + bit_count, acpi_ut_get_node_name(buffer_desc->buffer.node), 8 * (u32) buffer_desc->buffer.length));
ACPI_ERROR((AE_INFO,
"Field [%4.4s] at %d exceeds Buffer [%4.4s] size %d (bits)",
acpi_ut_get_node_name(result_desc),
bit_offset + bit_count,
acpi_ut_get_node_name(buffer_desc->buffer.node),
8 * (u32) buffer_desc->buffer.length));
status = AE_AML_BUFFER_LIMIT;
goto cleanup;
}
@ -618,9 +630,8 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
"after acpi_ex_resolve_operands");
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("(%s) bad operand(s) (%X)\n",
acpi_ps_get_opcode_name(op->common.
aml_opcode),
ACPI_ERROR((AE_INFO, "(%s) bad operand(s) (%X)",
acpi_ps_get_opcode_name(op->common.aml_opcode),
status));
return_ACPI_STATUS(status);
@ -1145,7 +1156,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
default:
ACPI_REPORT_ERROR(("Unknown control opcode=%X Op=%p\n",
ACPI_ERROR((AE_INFO, "Unknown control opcode=%X Op=%p",
op->common.aml_opcode, op));
status = AE_AML_BAD_OPCODE;

View File

@ -176,7 +176,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
/* Must have both an Op and a Result Object */
if (!op) {
ACPI_REPORT_ERROR(("Null Op\n"));
ACPI_ERROR((AE_INFO, "Null Op"));
return_UINT8(TRUE);
}
@ -216,7 +216,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
parent_info =
acpi_ps_get_opcode_info(op->common.parent->common.aml_opcode);
if (parent_info->class == AML_CLASS_UNKNOWN) {
ACPI_REPORT_ERROR(("Unknown parent opcode Op=%p\n", op));
ACPI_ERROR((AE_INFO, "Unknown parent opcode Op=%p", op));
return_UINT8(FALSE);
}
@ -343,7 +343,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
ACPI_FUNCTION_TRACE_PTR("ds_delete_result_if_not_used", result_obj);
if (!op) {
ACPI_REPORT_ERROR(("Null Op\n"));
ACPI_ERROR((AE_INFO, "Null Op"));
return_VOID;
}
@ -566,7 +566,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
}
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(name_string, status);
ACPI_ERROR_NAMESPACE(name_string, status);
}
}
@ -634,7 +634,8 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
* Only error is underflow, and this indicates
* a missing or null operand!
*/
ACPI_REPORT_ERROR(("Missing or null operand, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Missing or null operand"));
return_ACPI_STATUS(status);
}
} else {
@ -726,7 +727,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
*/
(void)acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state);
ACPI_REPORT_ERROR(("While creating Arg %d - %s\n",
(arg_count + 1), acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %d",
(arg_count + 1)));
return_ACPI_STATUS(status);
}

View File

@ -100,7 +100,8 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
if (result_obj) {
status = acpi_ds_result_pop(&obj_desc, walk_state);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not get result from predicate evaluation, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not get result from predicate evaluation"));
return_ACPI_STATUS(status);
}
@ -121,7 +122,8 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
}
if (!obj_desc) {
ACPI_REPORT_ERROR(("No predicate obj_desc=%p State=%p\n",
ACPI_ERROR((AE_INFO,
"No predicate obj_desc=%p State=%p",
obj_desc, walk_state));
return_ACPI_STATUS(AE_AML_NO_OPERAND);
@ -137,7 +139,10 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
}
if (ACPI_GET_OBJECT_TYPE(local_obj_desc) != ACPI_TYPE_INTEGER) {
ACPI_REPORT_ERROR(("Bad predicate (not an integer) obj_desc=%p State=%p Type=%X\n", obj_desc, walk_state, ACPI_GET_OBJECT_TYPE(obj_desc)));
ACPI_ERROR((AE_INFO,
"Bad predicate (not an integer) obj_desc=%p State=%p Type=%X",
obj_desc, walk_state,
ACPI_GET_OBJECT_TYPE(obj_desc)));
status = AE_AML_OPERAND_TYPE;
goto cleanup;
@ -356,7 +361,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
op_class = walk_state->op_info->class;
if (op_class == AML_CLASS_UNKNOWN) {
ACPI_REPORT_ERROR(("Unknown opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown opcode %X",
op->common.aml_opcode));
return_ACPI_STATUS(AE_NOT_IMPLEMENTED);
}
@ -447,7 +452,10 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
walk_state->operands[1]->reference.offset)) {
status = AE_OK;
} else {
ACPI_REPORT_ERROR(("[%s]: Could not resolve operands, %s\n", acpi_ps_get_opcode_name(walk_state->opcode), acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"While resolving operands for [%s]",
acpi_ps_get_opcode_name
(walk_state->opcode)));
}
}
@ -666,8 +674,8 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
case AML_TYPE_UNDEFINED:
ACPI_REPORT_ERROR(("Undefined opcode type Op=%p\n",
op));
ACPI_ERROR((AE_INFO,
"Undefined opcode type Op=%p", op));
return_ACPI_STATUS(AE_NOT_IMPLEMENTED);
case AML_TYPE_BOGUS:
@ -679,7 +687,10 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unimplemented opcode, class=%X type=%X Opcode=%X Op=%p\n", op_class, op_type, op->common.aml_opcode, op));
ACPI_ERROR((AE_INFO,
"Unimplemented opcode, class=%X type=%X Opcode=%X Op=%p",
op_class, op_type, op->common.aml_opcode,
op));
status = AE_NOT_IMPLEMENTED;
break;

View File

@ -187,7 +187,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
}
#endif
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(path, status);
ACPI_ERROR_NAMESPACE(path, status);
return_ACPI_STATUS(status);
}
@ -233,7 +233,9 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
/* All other types are an error */
ACPI_REPORT_ERROR(("Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)\n", acpi_ut_get_type_name(node->type), path));
ACPI_ERROR((AE_INFO,
"Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)",
acpi_ut_get_type_name(node->type), path));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -300,7 +302,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
ACPI_IMODE_LOAD_PASS1, flags, walk_state,
&(node));
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(path, status);
ACPI_ERROR_NAMESPACE(path, status);
return_ACPI_STATUS(status);
}
break;
@ -618,10 +620,10 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
if (status == AE_NOT_FOUND) {
status = AE_OK;
} else {
ACPI_REPORT_NSERROR(buffer_ptr, status);
ACPI_ERROR_NAMESPACE(buffer_ptr, status);
}
#else
ACPI_REPORT_NSERROR(buffer_ptr, status);
ACPI_ERROR_NAMESPACE(buffer_ptr, status);
#endif
return_ACPI_STATUS(status);
}
@ -651,7 +653,10 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
* Scope (DEB) { ... }
*/
ACPI_REPORT_WARNING(("Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n", buffer_ptr, acpi_ut_get_type_name(node->type)));
ACPI_WARNING((AE_INFO,
"Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)",
buffer_ptr,
acpi_ut_get_type_name(node->type)));
node->type = ACPI_TYPE_ANY;
walk_state->scope_info->common.value = ACPI_TYPE_ANY;
@ -661,7 +666,10 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
/* All other types are an error */
ACPI_REPORT_ERROR(("Invalid type (%s) for target of Scope operator [%4.4s]\n", acpi_ut_get_type_name(node->type), buffer_ptr));
ACPI_ERROR((AE_INFO,
"Invalid type (%s) for target of Scope operator [%4.4s]",
acpi_ut_get_type_name(node->type),
buffer_ptr));
return (AE_AML_OPERAND_TYPE);
}
@ -714,7 +722,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
}
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(buffer_ptr, status);
ACPI_ERROR_NAMESPACE(buffer_ptr, status);
return_ACPI_STATUS(status);
}
@ -1112,7 +1120,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
*/
op->common.node = new_node;
} else {
ACPI_REPORT_NSERROR(arg->common.value.string, status);
ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
}
break;

View File

@ -107,14 +107,14 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
if (!node) {
/* Invalid scope */
ACPI_REPORT_ERROR(("Null scope parameter\n"));
ACPI_ERROR((AE_INFO, "Null scope parameter"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
/* Make sure object type is valid */
if (!acpi_ut_valid_object_type(type)) {
ACPI_REPORT_WARNING(("Invalid object type: 0x%X\n", type));
ACPI_WARNING((AE_INFO, "Invalid object type: 0x%X", type));
}
/* Allocate a new scope object */

View File

@ -92,23 +92,23 @@ acpi_ds_result_remove(union acpi_operand_object **object,
state = walk_state->results;
if (!state) {
ACPI_REPORT_ERROR(("No result object pushed! State=%p\n",
ACPI_ERROR((AE_INFO, "No result object pushed! State=%p",
walk_state));
return (AE_NOT_EXIST);
}
if (index >= ACPI_OBJ_MAX_OPERAND) {
ACPI_REPORT_ERROR(("Index out of range: %X State=%p Num=%X\n",
index, walk_state,
state->results.num_results));
ACPI_ERROR((AE_INFO,
"Index out of range: %X State=%p Num=%X",
index, walk_state, state->results.num_results));
}
/* Check for a valid result object */
if (!state->results.obj_desc[index]) {
ACPI_REPORT_ERROR(("Null operand! State=%p #Ops=%X, Index=%X\n",
walk_state, state->results.num_results,
index));
ACPI_ERROR((AE_INFO,
"Null operand! State=%p #Ops=%X, Index=%X",
walk_state, state->results.num_results, index));
return (AE_AML_NO_RETURN_VALUE);
}
@ -160,7 +160,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object,
}
if (!state->results.num_results) {
ACPI_REPORT_ERROR(("Result stack is empty! State=%p\n",
ACPI_ERROR((AE_INFO, "Result stack is empty! State=%p",
walk_state));
return (AE_AML_NO_RETURN_VALUE);
}
@ -188,7 +188,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object,
}
}
ACPI_REPORT_ERROR(("No result objects! State=%p\n", walk_state));
ACPI_ERROR((AE_INFO, "No result objects! State=%p", walk_state));
return (AE_AML_NO_RETURN_VALUE);
}
@ -217,13 +217,13 @@ acpi_ds_result_pop_from_bottom(union acpi_operand_object ** object,
state = walk_state->results;
if (!state) {
ACPI_REPORT_ERROR(("No result object pushed! State=%p\n",
walk_state));
ACPI_ERROR((AE_INFO,
"No result object pushed! State=%p", walk_state));
return (AE_NOT_EXIST);
}
if (!state->results.num_results) {
ACPI_REPORT_ERROR(("No result objects! State=%p\n",
ACPI_ERROR((AE_INFO, "No result objects! State=%p",
walk_state));
return (AE_AML_NO_RETURN_VALUE);
}
@ -244,7 +244,8 @@ acpi_ds_result_pop_from_bottom(union acpi_operand_object ** object,
/* Check for a valid result object */
if (!*object) {
ACPI_REPORT_ERROR(("Null operand! State=%p #Ops=%X Index=%X\n",
ACPI_ERROR((AE_INFO,
"Null operand! State=%p #Ops=%X Index=%X",
walk_state, state->results.num_results,
(u32) index));
return (AE_AML_NO_RETURN_VALUE);
@ -281,19 +282,21 @@ acpi_ds_result_push(union acpi_operand_object * object,
state = walk_state->results;
if (!state) {
ACPI_REPORT_ERROR(("No result stack frame during push\n"));
ACPI_ERROR((AE_INFO, "No result stack frame during push"));
return (AE_AML_INTERNAL);
}
if (state->results.num_results == ACPI_OBJ_NUM_OPERANDS) {
ACPI_REPORT_ERROR(("Result stack overflow: Obj=%p State=%p Num=%X\n", object, walk_state, state->results.num_results));
ACPI_ERROR((AE_INFO,
"Result stack overflow: Obj=%p State=%p Num=%X",
object, walk_state, state->results.num_results));
return (AE_STACK_OVERFLOW);
}
if (!object) {
ACPI_REPORT_ERROR(("Null Object! Obj=%p State=%p Num=%X\n",
object, walk_state,
state->results.num_results));
ACPI_ERROR((AE_INFO,
"Null Object! Obj=%p State=%p Num=%X",
object, walk_state, state->results.num_results));
return (AE_BAD_PARAMETER);
}
@ -402,7 +405,9 @@ acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state)
/* Check for stack overflow */
if (walk_state->num_operands >= ACPI_OBJ_NUM_OPERANDS) {
ACPI_REPORT_ERROR(("Object stack overflow! Obj=%p State=%p #Ops=%X\n", object, walk_state, walk_state->num_operands));
ACPI_ERROR((AE_INFO,
"Object stack overflow! Obj=%p State=%p #Ops=%X",
object, walk_state, walk_state->num_operands));
return (AE_STACK_OVERFLOW);
}
@ -446,7 +451,10 @@ acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state * walk_state)
/* Check for stack underflow */
if (walk_state->num_operands == 0) {
ACPI_REPORT_ERROR(("Object stack underflow! Count=%X State=%p #Ops=%X\n", pop_count, walk_state, walk_state->num_operands));
ACPI_ERROR((AE_INFO,
"Object stack underflow! Count=%X State=%p #Ops=%X",
pop_count, walk_state,
walk_state->num_operands));
return (AE_STACK_UNDERFLOW);
}
@ -489,7 +497,10 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
/* Check for stack underflow */
if (walk_state->num_operands == 0) {
ACPI_REPORT_ERROR(("Object stack underflow! Count=%X State=%p #Ops=%X\n", pop_count, walk_state, walk_state->num_operands));
ACPI_ERROR((AE_INFO,
"Object stack underflow! Count=%X State=%p #Ops=%X",
pop_count, walk_state,
walk_state->num_operands));
return (AE_STACK_UNDERFLOW);
}
@ -806,13 +817,13 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state)
}
if (walk_state->data_type != ACPI_DESC_TYPE_WALK) {
ACPI_REPORT_ERROR(("%p is not a valid walk state\n",
ACPI_ERROR((AE_INFO, "%p is not a valid walk state",
walk_state));
return;
}
if (walk_state->parser_state.scope) {
ACPI_REPORT_ERROR(("%p walk still has a scope list\n",
ACPI_ERROR((AE_INFO, "%p walk still has a scope list",
walk_state));
}
@ -872,18 +883,24 @@ acpi_ds_result_insert(void *object,
state = walk_state->results;
if (!state) {
ACPI_REPORT_ERROR(("No result object pushed! State=%p\n",
ACPI_ERROR((AE_INFO, "No result object pushed! State=%p",
walk_state));
return (AE_NOT_EXIST);
}
if (index >= ACPI_OBJ_NUM_OPERANDS) {
ACPI_REPORT_ERROR(("Index out of range: %X Obj=%p State=%p Num=%X\n", index, object, walk_state, state->results.num_results));
ACPI_ERROR((AE_INFO,
"Index out of range: %X Obj=%p State=%p Num=%X",
index, object, walk_state,
state->results.num_results));
return (AE_BAD_PARAMETER);
}
if (!object) {
ACPI_REPORT_ERROR(("Null Object! Index=%X Obj=%p State=%p Num=%X\n", index, object, walk_state, state->results.num_results));
ACPI_ERROR((AE_INFO,
"Null Object! Index=%X Obj=%p State=%p Num=%X",
index, object, walk_state,
state->results.num_results));
return (AE_BAD_PARAMETER);
}
@ -957,7 +974,9 @@ acpi_ds_obj_stack_pop_object(union acpi_operand_object **object,
/* Check for stack underflow */
if (walk_state->num_operands == 0) {
ACPI_REPORT_ERROR(("Missing operand/stack empty! State=%p #Ops=%X\n", walk_state, walk_state->num_operands));
ACPI_ERROR((AE_INFO,
"Missing operand/stack empty! State=%p #Ops=%X",
walk_state, walk_state->num_operands));
*object = NULL;
return (AE_AML_NO_OPERAND);
}
@ -969,7 +988,8 @@ acpi_ds_obj_stack_pop_object(union acpi_operand_object **object,
/* Check for a valid operand */
if (!walk_state->operands[walk_state->num_operands]) {
ACPI_REPORT_ERROR(("Null operand! State=%p #Ops=%X\n",
ACPI_ERROR((AE_INFO,
"Null operand! State=%p #Ops=%X",
walk_state, walk_state->num_operands));
*object = NULL;
return (AE_AML_NO_OPERAND);

View File

@ -73,7 +73,7 @@ acpi_status acpi_ev_initialize_events(void)
/* Make sure we have ACPI tables */
if (!acpi_gbl_DSDT) {
ACPI_REPORT_WARNING(("No ACPI tables present!\n"));
ACPI_WARNING((AE_INFO, "No ACPI tables present!"));
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
}
@ -84,14 +84,15 @@ acpi_status acpi_ev_initialize_events(void)
*/
status = acpi_ev_fixed_event_initialize();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Unable to initialize fixed events, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Unable to initialize fixed events"));
return_ACPI_STATUS(status);
}
status = acpi_ev_gpe_initialize();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Unable to initialize general purpose events, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Unable to initialize general purpose events"));
return_ACPI_STATUS(status);
}
@ -162,7 +163,8 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
status = acpi_ev_install_sci_handler();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Unable to install System Control Interrupt Handler, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Unable to install System Control Interrupt handler"));
return_ACPI_STATUS(status);
}
@ -170,7 +172,8 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
status = acpi_ev_init_global_lock_handler();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Unable to initialize Global Lock handler, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Unable to initialize Global Lock handler"));
return_ACPI_STATUS(status);
}
@ -304,7 +307,9 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
enable_register_id, 0,
ACPI_MTX_DO_NOT_LOCK);
ACPI_REPORT_ERROR(("No installed handler for fixed event [%08X]\n", event));
ACPI_ERROR((AE_INFO,
"No installed handler for fixed event [%08X]",
event));
return (ACPI_INTERRUPT_NOT_HANDLED);
}

View File

@ -379,7 +379,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
u8 enabled_status_byte;
u32 status_reg;
u32 enable_reg;
acpi_native_uint flags;
acpi_cpu_flags flags;
acpi_native_uint i;
acpi_native_uint j;
@ -546,7 +546,11 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
status = acpi_ns_evaluate_by_handle(&info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s while evaluating method [%4.4s] for GPE[%2X]\n", acpi_format_exception(status), acpi_ut_get_node_name(local_gpe_event_info.dispatch.method_node), gpe_number));
ACPI_EXCEPTION((AE_INFO, status,
"While evaluating method [%4.4s] for GPE[%2X]",
acpi_ut_get_node_name
(local_gpe_event_info.dispatch.
method_node), gpe_number));
}
}
@ -599,8 +603,8 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
ACPI_GPE_EDGE_TRIGGERED) {
status = acpi_hw_clear_gpe(gpe_event_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s, Unable to clear GPE[%2X]\n",
acpi_format_exception(status),
ACPI_EXCEPTION((AE_INFO, status,
"Unable to clear GPE[%2X]",
gpe_number));
return_UINT32(ACPI_INTERRUPT_NOT_HANDLED);
}
@ -639,7 +643,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
ACPI_GPE_LEVEL_TRIGGERED) {
status = acpi_hw_clear_gpe(gpe_event_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s, Unable to clear GPE[%2X]\n", acpi_format_exception(status), gpe_number));
ACPI_EXCEPTION((AE_INFO, status,
"Unable to clear GPE[%2X]",
gpe_number));
return_UINT32(ACPI_INTERRUPT_NOT_HANDLED);
}
}
@ -653,8 +659,8 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
*/
status = acpi_ev_disable_gpe(gpe_event_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s, Unable to disable GPE[%2X]\n",
acpi_format_exception(status),
ACPI_EXCEPTION((AE_INFO, status,
"Unable to disable GPE[%2X]",
gpe_number));
return_UINT32(ACPI_INTERRUPT_NOT_HANDLED);
}
@ -667,7 +673,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
acpi_ev_asynch_execute_gpe_method,
gpe_event_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s, Unable to queue handler for GPE[%2X] - event disabled\n", acpi_format_exception(status), gpe_number));
ACPI_EXCEPTION((AE_INFO, status,
"Unable to queue handler for GPE[%2X] - event disabled",
gpe_number));
}
break;
@ -675,7 +683,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
/* No handler or method to run! */
ACPI_REPORT_ERROR(("No handler or method for GPE[%2X], disabling event\n", gpe_number));
ACPI_ERROR((AE_INFO,
"No handler or method for GPE[%2X], disabling event",
gpe_number));
/*
* Disable the GPE. The GPE will remain disabled until the ACPI
@ -683,8 +693,8 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
*/
status = acpi_ev_disable_gpe(gpe_event_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s, Unable to disable GPE[%2X]\n",
acpi_format_exception(status),
ACPI_EXCEPTION((AE_INFO, status,
"Unable to disable GPE[%2X]",
gpe_number));
return_UINT32(ACPI_INTERRUPT_NOT_HANDLED);
}
@ -728,7 +738,9 @@ acpi_ev_check_for_wake_only_gpe(struct acpi_gpe_event_info *gpe_event_info)
acpi_ev_set_gpe_type(gpe_event_info, ACPI_GPE_TYPE_WAKE);
ACPI_REPORT_INFO(("GPE %p was updated from wake/run to wake-only\n", gpe_event_info));
ACPI_INFO((AE_INFO,
"GPE %p was updated from wake/run to wake-only",
gpe_event_info));
/* This was a wake-only GPE */

View File

@ -136,7 +136,7 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback)
struct acpi_gpe_block_info *gpe_block;
struct acpi_gpe_xrupt_info *gpe_xrupt_info;
acpi_status status = AE_OK;
acpi_native_uint flags;
acpi_cpu_flags flags;
ACPI_FUNCTION_TRACE("ev_walk_gpe_list");
@ -279,7 +279,9 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
default:
/* Unknown method type, just ignore it! */
ACPI_REPORT_ERROR(("Unknown GPE method type: %s (name not of form _Lxx or _Exx)\n", name));
ACPI_ERROR((AE_INFO,
"Unknown GPE method type: %s (name not of form _Lxx or _Exx)",
name));
return_ACPI_STATUS(AE_OK);
}
@ -289,7 +291,9 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
if (gpe_number == ACPI_UINT32_MAX) {
/* Conversion failed; invalid method, just ignore it */
ACPI_REPORT_ERROR(("Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)\n", name));
ACPI_ERROR((AE_INFO,
"Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)",
name));
return_ACPI_STATUS(AE_OK);
}
@ -476,7 +480,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
struct acpi_gpe_xrupt_info *next_gpe_xrupt;
struct acpi_gpe_xrupt_info *gpe_xrupt;
acpi_status status;
acpi_native_uint flags;
acpi_cpu_flags flags;
ACPI_FUNCTION_TRACE("ev_get_gpe_xrupt_block");
@ -523,7 +527,9 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
acpi_ev_gpe_xrupt_handler,
gpe_xrupt);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not install GPE interrupt handler at level 0x%X\n", interrupt_number));
ACPI_ERROR((AE_INFO,
"Could not install GPE interrupt handler at level 0x%X",
interrupt_number));
return_PTR(NULL);
}
}
@ -548,7 +554,7 @@ static acpi_status
acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
{
acpi_status status;
acpi_native_uint flags;
acpi_cpu_flags flags;
ACPI_FUNCTION_TRACE("ev_delete_gpe_xrupt");
@ -606,7 +612,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
struct acpi_gpe_block_info *next_gpe_block;
struct acpi_gpe_xrupt_info *gpe_xrupt_block;
acpi_status status;
acpi_native_uint flags;
acpi_cpu_flags flags;
ACPI_FUNCTION_TRACE("ev_install_gpe_block");
@ -659,7 +665,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
{
acpi_status status;
acpi_native_uint flags;
acpi_cpu_flags flags;
ACPI_FUNCTION_TRACE("ev_install_gpe_block");
@ -739,7 +745,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
sizeof(struct
acpi_gpe_register_info));
if (!gpe_register_info) {
ACPI_REPORT_ERROR(("Could not allocate the gpe_register_info table\n"));
ACPI_ERROR((AE_INFO,
"Could not allocate the gpe_register_info table"));
return_ACPI_STATUS(AE_NO_MEMORY);
}
@ -752,7 +759,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
ACPI_GPE_REGISTER_WIDTH) *
sizeof(struct acpi_gpe_event_info));
if (!gpe_event_info) {
ACPI_REPORT_ERROR(("Could not allocate the gpe_event_info table\n"));
ACPI_ERROR((AE_INFO,
"Could not allocate the gpe_event_info table"));
status = AE_NO_MEMORY;
goto error_exit;
}
@ -1032,7 +1040,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
status = acpi_hw_enable_runtime_gpe_block(NULL, gpe_block);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not enable GPEs in gpe_block %p\n",
ACPI_ERROR((AE_INFO, "Could not enable GPEs in gpe_block %p",
gpe_block));
}
@ -1107,8 +1115,8 @@ acpi_status acpi_ev_gpe_initialize(void)
&acpi_gbl_gpe_fadt_blocks[0]);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not create GPE Block 0, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not create GPE Block 0"));
}
}
@ -1121,7 +1129,12 @@ acpi_status acpi_ev_gpe_initialize(void)
if ((register_count0) &&
(gpe_number_max >= acpi_gbl_FADT->gpe1_base)) {
ACPI_REPORT_ERROR(("GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1\n", gpe_number_max, acpi_gbl_FADT->gpe1_base, acpi_gbl_FADT->gpe1_base + ((register_count1 * ACPI_GPE_REGISTER_WIDTH) - 1)));
ACPI_ERROR((AE_INFO,
"GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1",
gpe_number_max, acpi_gbl_FADT->gpe1_base,
acpi_gbl_FADT->gpe1_base +
((register_count1 *
ACPI_GPE_REGISTER_WIDTH) - 1)));
/* Ignore GPE1 block by setting the register count to zero */
@ -1139,7 +1152,8 @@ acpi_status acpi_ev_gpe_initialize(void)
[1]);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not create GPE Block 1, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not create GPE Block 1"));
}
/*
@ -1165,7 +1179,9 @@ acpi_status acpi_ev_gpe_initialize(void)
/* Check for Max GPE number out-of-range */
if (gpe_number_max > ACPI_GPE_MAX) {
ACPI_REPORT_ERROR(("Maximum GPE number from FADT is too large: 0x%X\n", gpe_number_max));
ACPI_ERROR((AE_INFO,
"Maximum GPE number from FADT is too large: 0x%X",
gpe_number_max));
status = AE_BAD_VALUE;
goto cleanup;
}

View File

@ -303,7 +303,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_global_lock_thread(void *context)
acpi_os_signal_semaphore(acpi_gbl_global_lock_semaphore,
acpi_gbl_global_lock_thread_count);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not signal Global Lock semaphore\n"));
ACPI_ERROR((AE_INFO,
"Could not signal Global Lock semaphore"));
}
}
}
@ -344,7 +345,8 @@ static u32 acpi_ev_global_lock_handler(void *context)
acpi_ev_global_lock_thread,
context);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not queue Global Lock thread, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not queue Global Lock thread"));
return (ACPI_INTERRUPT_NOT_HANDLED);
}
@ -384,7 +386,8 @@ acpi_status acpi_ev_init_global_lock_handler(void)
* with an error.
*/
if (status == AE_NO_HARDWARE_RESPONSE) {
ACPI_REPORT_ERROR(("No response from Global Lock hardware, disabling lock\n"));
ACPI_ERROR((AE_INFO,
"No response from Global Lock hardware, disabling lock"));
acpi_gbl_global_lock_present = FALSE;
status = AE_OK;
@ -480,7 +483,8 @@ acpi_status acpi_ev_release_global_lock(void)
ACPI_FUNCTION_TRACE("ev_release_global_lock");
if (!acpi_gbl_global_lock_thread_count) {
ACPI_REPORT_WARNING(("Cannot release HW Global Lock, it has not been acquired\n"));
ACPI_WARNING((AE_INFO,
"Cannot release HW Global Lock, it has not been acquired"));
return_ACPI_STATUS(AE_NOT_ACQUIRED);
}
@ -542,7 +546,9 @@ void acpi_ev_terminate(void)
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) {
status = acpi_disable_event((u32) i, 0);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not disable fixed event %d\n", (u32) i));
ACPI_ERROR((AE_INFO,
"Could not disable fixed event %d",
(u32) i));
}
}
@ -554,7 +560,7 @@ void acpi_ev_terminate(void)
status = acpi_ev_remove_sci_handler();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not remove SCI handler\n"));
ACPI_ERROR((AE_INFO, "Could not remove SCI handler"));
}
}
@ -567,7 +573,7 @@ void acpi_ev_terminate(void)
if (acpi_gbl_original_mode == ACPI_SYS_MODE_LEGACY) {
status = acpi_disable();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_WARNING(("acpi_disable failed\n"));
ACPI_WARNING((AE_INFO, "acpi_disable failed"));
}
}
return_VOID;

View File

@ -295,9 +295,10 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
handler_desc = region_obj->region.handler;
if (!handler_desc) {
ACPI_REPORT_ERROR(("No handler for Region [%4.4s] (%p) [%s]\n",
acpi_ut_get_node_name(region_obj->region.
node), region_obj,
ACPI_ERROR((AE_INFO,
"No handler for Region [%4.4s] (%p) [%s]",
acpi_ut_get_node_name(region_obj->region.node),
region_obj,
acpi_ut_get_region_name(region_obj->region.
space_id)));
@ -316,7 +317,11 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
if (!region_setup) {
/* No initialization routine, exit with error */
ACPI_REPORT_ERROR(("No init routine for region(%p) [%s]\n", region_obj, acpi_ut_get_region_name(region_obj->region.space_id)));
ACPI_ERROR((AE_INFO,
"No init routine for region(%p) [%s]",
region_obj,
acpi_ut_get_region_name(region_obj->region.
space_id)));
return_ACPI_STATUS(AE_NOT_EXIST);
}
@ -341,8 +346,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
/* Check for failure of the Region Setup */
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Region Initialization: %s [%s]\n",
acpi_format_exception(status),
ACPI_EXCEPTION((AE_INFO, status,
"During region initialization: [%s]",
acpi_ut_get_region_name(region_obj->
region.
space_id)));
@ -399,10 +404,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
region_obj2->extra.region_context);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Handler for [%s] returned %s\n",
ACPI_EXCEPTION((AE_INFO, status, "Returned by Handler for [%s]",
acpi_ut_get_region_name(region_obj->region.
space_id),
acpi_format_exception(status)));
space_id)));
}
if (!
@ -494,7 +498,10 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
status = acpi_ev_execute_reg_method(region_obj, 0);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s from region _REG, [%s]\n", acpi_format_exception(status), acpi_ut_get_region_name(region_obj->region.space_id)));
ACPI_EXCEPTION((AE_INFO, status,
"from region _REG, [%s]",
acpi_ut_get_region_name
(region_obj->region.space_id)));
}
if (acpi_ns_is_locked) {
@ -516,7 +523,10 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
/* Init routine may fail, Just ignore errors */
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s from region init, [%s]\n", acpi_format_exception(status), acpi_ut_get_region_name(region_obj->region.space_id)));
ACPI_EXCEPTION((AE_INFO, status,
"from region init, [%s]",
acpi_ut_get_region_name
(region_obj->region.space_id)));
}
region_obj->region.flags &= ~(AOPOBJ_SETUP_COMPLETE);

View File

@ -233,7 +233,11 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
*/
status = AE_OK;
} else {
ACPI_REPORT_ERROR(("Could not install pci_config handler for Root Bridge %4.4s, %s\n", acpi_ut_get_node_name(pci_root_node), acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO,
status,
"Could not install pci_config handler for Root Bridge %4.4s",
acpi_ut_get_node_name
(pci_root_node)));
}
}
break;

View File

@ -143,7 +143,7 @@ acpi_install_fixed_event_handler(u32 event,
if (ACPI_SUCCESS(status))
status = acpi_enable_event(event, 0);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_WARNING(("Could not enable fixed event %X\n",
ACPI_WARNING((AE_INFO, "Could not enable fixed event %X",
event));
/* Remove the handler */
@ -204,7 +204,9 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler)
acpi_gbl_fixed_event_handlers[event].context = NULL;
if (ACPI_FAILURE(status)) {
ACPI_REPORT_WARNING(("Could not write to fixed event enable register %X\n", event));
ACPI_WARNING((AE_INFO,
"Could not write to fixed event enable register %X",
event));
} else {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Disabled fixed event %X\n",
event));
@ -561,7 +563,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
struct acpi_gpe_event_info *gpe_event_info;
struct acpi_handler_info *handler;
acpi_status status;
acpi_native_uint flags;
acpi_cpu_flags flags;
ACPI_FUNCTION_TRACE("acpi_install_gpe_handler");
@ -652,7 +654,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
struct acpi_gpe_event_info *gpe_event_info;
struct acpi_handler_info *handler;
acpi_status status;
acpi_native_uint flags;
acpi_cpu_flags flags;
ACPI_FUNCTION_TRACE("acpi_remove_gpe_handler");

View File

@ -70,7 +70,7 @@ acpi_status acpi_enable(void)
/* Make sure we have the FADT */
if (!acpi_gbl_FADT) {
ACPI_REPORT_WARNING(("No FADT information present!\n"));
ACPI_WARNING((AE_INFO, "No FADT information present!"));
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
}
@ -82,7 +82,8 @@ acpi_status acpi_enable(void)
status = acpi_hw_set_mode(ACPI_SYS_MODE_ACPI);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not transition to ACPI mode\n"));
ACPI_ERROR((AE_INFO,
"Could not transition to ACPI mode"));
return_ACPI_STATUS(status);
}
@ -112,7 +113,7 @@ acpi_status acpi_disable(void)
ACPI_FUNCTION_TRACE("acpi_disable");
if (!acpi_gbl_FADT) {
ACPI_REPORT_WARNING(("No FADT information present!\n"));
ACPI_WARNING((AE_INFO, "No FADT information present!"));
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
}
@ -125,7 +126,8 @@ acpi_status acpi_disable(void)
status = acpi_hw_set_mode(ACPI_SYS_MODE_LEGACY);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not exit ACPI mode to legacy mode"));
ACPI_ERROR((AE_INFO,
"Could not exit ACPI mode to legacy mode"));
return_ACPI_STATUS(status);
}
@ -182,7 +184,8 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
}
if (value != 1) {
ACPI_REPORT_ERROR(("Could not enable %s event\n",
ACPI_ERROR((AE_INFO,
"Could not enable %s event",
acpi_ut_get_event_name(event)));
return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
}
@ -380,7 +383,8 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
}
if (value != 0) {
ACPI_REPORT_ERROR(("Could not disable %s events\n",
ACPI_ERROR((AE_INFO,
"Could not disable %s events",
acpi_ut_get_event_name(event)));
return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
}

View File

@ -413,7 +413,9 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
(!ACPI_STRNCMP(table_ptr->signature,
acpi_gbl_table_data[ACPI_TABLE_SSDT].signature,
acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) {
ACPI_REPORT_ERROR(("Table has invalid signature [%4.4s], must be SSDT or PSDT\n", table_ptr->signature));
ACPI_ERROR((AE_INFO,
"Table has invalid signature [%4.4s], must be SSDT or PSDT",
table_ptr->signature));
status = AE_BAD_SIGNATURE;
goto cleanup;
}

View File

@ -641,7 +641,9 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
break;
default:
ACPI_REPORT_ERROR(("Bad destination type during conversion: %X\n", destination_type));
ACPI_ERROR((AE_INFO,
"Bad destination type during conversion: %X",
destination_type));
status = AE_AML_INTERNAL;
break;
}
@ -654,7 +656,12 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
break;
default:
ACPI_REPORT_ERROR(("Unknown Target type ID 0x%X aml_opcode %X dest_type %s\n", GET_CURRENT_ARG_TYPE(walk_state->op_info->runtime_args), walk_state->opcode, acpi_ut_get_type_name(destination_type)));
ACPI_ERROR((AE_INFO,
"Unknown Target type ID 0x%X aml_opcode %X dest_type %s",
GET_CURRENT_ARG_TYPE(walk_state->op_info->
runtime_args),
walk_state->opcode,
acpi_ut_get_type_name(destination_type)));
status = AE_AML_INTERNAL;
}

View File

@ -300,7 +300,7 @@ acpi_ex_create_region(u8 * aml_start,
*/
if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) &&
(region_space < ACPI_USER_REGION_BEGIN)) {
ACPI_REPORT_ERROR(("Invalid address_space type %X\n",
ACPI_ERROR((AE_INFO, "Invalid address_space type %X",
region_space));
return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID);
}

View File

@ -249,13 +249,18 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
* Source must be a buffer of sufficient size (ACPI_SMBUS_BUFFER_SIZE).
*/
if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) {
ACPI_REPORT_ERROR(("SMBus write requires Buffer, found type %s\n", acpi_ut_get_object_type_name(source_desc)));
ACPI_ERROR((AE_INFO,
"SMBus write requires Buffer, found type %s",
acpi_ut_get_object_type_name(source_desc)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
if (source_desc->buffer.length < ACPI_SMBUS_BUFFER_SIZE) {
ACPI_REPORT_ERROR(("SMBus write requires Buffer of length %X, found length %X\n", ACPI_SMBUS_BUFFER_SIZE, source_desc->buffer.length));
ACPI_ERROR((AE_INFO,
"SMBus write requires Buffer of length %X, found length %X",
ACPI_SMBUS_BUFFER_SIZE,
source_desc->buffer.length));
return_ACPI_STATUS(AE_AML_BUFFER_LIMIT);
}

View File

@ -94,7 +94,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
/* We must have a valid region */
if (ACPI_GET_OBJECT_TYPE(rgn_desc) != ACPI_TYPE_REGION) {
ACPI_REPORT_ERROR(("Needed Region, found type %X (%s)\n",
ACPI_ERROR((AE_INFO, "Needed Region, found type %X (%s)",
ACPI_GET_OBJECT_TYPE(rgn_desc),
acpi_ut_get_object_type_name(rgn_desc)));
@ -161,14 +161,28 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
* than the region itself. For example, a region of length one
* byte, and a field with Dword access specified.
*/
ACPI_REPORT_ERROR(("Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n", acpi_ut_get_node_name(obj_desc->common_field.node), obj_desc->common_field.access_byte_width, acpi_ut_get_node_name(rgn_desc->region.node), rgn_desc->region.length));
ACPI_ERROR((AE_INFO,
"Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)",
acpi_ut_get_node_name(obj_desc->
common_field.node),
obj_desc->common_field.access_byte_width,
acpi_ut_get_node_name(rgn_desc->region.
node),
rgn_desc->region.length));
}
/*
* Offset rounded up to next multiple of field width
* exceeds region length, indicate an error
*/
ACPI_REPORT_ERROR(("Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n", acpi_ut_get_node_name(obj_desc->common_field.node), obj_desc->common_field.base_byte_offset, field_datum_byte_offset, obj_desc->common_field.access_byte_width, acpi_ut_get_node_name(rgn_desc->region.node), rgn_desc->region.length));
ACPI_ERROR((AE_INFO,
"Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)",
acpi_ut_get_node_name(obj_desc->common_field.node),
obj_desc->common_field.base_byte_offset,
field_datum_byte_offset,
obj_desc->common_field.access_byte_width,
acpi_ut_get_node_name(rgn_desc->region.node),
rgn_desc->region.length));
return_ACPI_STATUS(AE_AML_REGION_LIMIT);
}
@ -252,15 +266,15 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
if (ACPI_FAILURE(status)) {
if (status == AE_NOT_IMPLEMENTED) {
ACPI_REPORT_ERROR(("Region %s(%X) not implemented\n",
acpi_ut_get_region_name(rgn_desc->
region.
ACPI_ERROR((AE_INFO,
"Region %s(%X) not implemented",
acpi_ut_get_region_name(rgn_desc->region.
space_id),
rgn_desc->region.space_id));
} else if (status == AE_NOT_EXIST) {
ACPI_REPORT_ERROR(("Region %s(%X) has no handler\n",
acpi_ut_get_region_name(rgn_desc->
region.
ACPI_ERROR((AE_INFO,
"Region %s(%X) has no handler",
acpi_ut_get_region_name(rgn_desc->region.
space_id),
rgn_desc->region.space_id));
}
@ -495,7 +509,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
default:
ACPI_REPORT_ERROR(("Wrong object type in field I/O %X\n",
ACPI_ERROR((AE_INFO, "Wrong object type in field I/O %X",
ACPI_GET_OBJECT_TYPE(obj_desc)));
status = AE_AML_INTERNAL;
break;
@ -599,7 +613,8 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
default:
ACPI_REPORT_ERROR(("Unknown update_rule value: %X\n",
ACPI_ERROR((AE_INFO,
"Unknown update_rule value: %X",
(obj_desc->common_field.
field_flags &
AML_FIELD_UPDATE_RULE_MASK)));
@ -657,7 +672,9 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
if (buffer_length <
ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) {
ACPI_REPORT_ERROR(("Field size %X (bits) is too large for buffer (%X)\n", obj_desc->common_field.bit_length, buffer_length));
ACPI_ERROR((AE_INFO,
"Field size %X (bits) is too large for buffer (%X)",
obj_desc->common_field.bit_length, buffer_length));
return_ACPI_STATUS(AE_BUFFER_OVERFLOW);
}
@ -769,7 +786,9 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
if (buffer_length <
ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) {
ACPI_REPORT_ERROR(("Field size %X (bits) is too large for buffer (%X)\n", obj_desc->common_field.bit_length, buffer_length));
ACPI_ERROR((AE_INFO,
"Field size %X (bits) is too large for buffer (%X)",
obj_desc->common_field.bit_length, buffer_length));
return_ACPI_STATUS(AE_BUFFER_OVERFLOW);
}

View File

@ -98,7 +98,7 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,
default:
ACPI_REPORT_ERROR(("Unknown Reference opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown Reference opcode %X",
obj_desc->reference.opcode));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -114,7 +114,7 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,
default:
ACPI_REPORT_ERROR(("Invalid descriptor type %X\n",
ACPI_ERROR((AE_INFO, "Invalid descriptor type %X",
ACPI_GET_DESCRIPTOR_TYPE(obj_desc)));
return_ACPI_STATUS(AE_TYPE);
}
@ -166,15 +166,18 @@ acpi_ex_concat_template(union acpi_operand_object *operand0,
u8 *end_tag;
acpi_size length0;
acpi_size length1;
acpi_size new_length;
ACPI_FUNCTION_TRACE("ex_concat_template");
/*
* Find the end_tag descriptor in each resource template.
* Note: returned pointers point TO the end_tag, not past it.
*
* Compute the length of each resource template
* Note1: returned pointers point TO the end_tag, not past it.
* Note2: zero-length buffers are allowed; treated like one end_tag
*/
/* Get the length of the first resource template */
status = acpi_ut_get_resource_end_tag(operand0, &end_tag);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
@ -182,19 +185,22 @@ acpi_ex_concat_template(union acpi_operand_object *operand0,
length0 = ACPI_PTR_DIFF(end_tag, operand0->buffer.pointer);
/* Get the length of the second resource template */
status = acpi_ut_get_resource_end_tag(operand1, &end_tag);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
/* Include the end_tag in the second template length */
length1 = ACPI_PTR_DIFF(end_tag, operand1->buffer.pointer);
length1 = ACPI_PTR_DIFF(end_tag, operand1->buffer.pointer) +
sizeof(struct aml_resource_end_tag);
/* Combine both lengths, minimum size will be 2 for end_tag */
/* Create a new buffer object for the result */
new_length = length0 + length1 + sizeof(struct aml_resource_end_tag);
return_desc = acpi_ut_create_buffer_object(length0 + length1);
/* Create a new buffer object for the result (with one end_tag) */
return_desc = acpi_ut_create_buffer_object(new_length);
if (!return_desc) {
return_ACPI_STATUS(AE_NO_MEMORY);
}
@ -207,9 +213,10 @@ acpi_ex_concat_template(union acpi_operand_object *operand0,
ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0);
ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1);
/* Set the end_tag checksum to zero, means "ignore checksum" */
/* Insert end_tag and set the checksum to zero, means "ignore checksum" */
new_buf[return_desc->buffer.length - 1] = 0;
new_buf[new_length - 1] = 0;
new_buf[new_length - 2] = ACPI_RESOURCE_NAME_END_TAG | 1;
/* Return the completed resource template */
@ -268,7 +275,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
break;
default:
ACPI_REPORT_ERROR(("Invalid object type: %X\n",
ACPI_ERROR((AE_INFO, "Invalid object type: %X",
ACPI_GET_OBJECT_TYPE(operand0)));
status = AE_AML_INTERNAL;
}
@ -370,7 +377,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
/* Invalid object type, should not happen here */
ACPI_REPORT_ERROR(("Invalid object type: %X\n",
ACPI_ERROR((AE_INFO, "Invalid object type: %X",
ACPI_GET_OBJECT_TYPE(operand0)));
status = AE_AML_INTERNAL;
goto cleanup;

View File

@ -153,7 +153,9 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
/* Sanity check -- we must have a valid thread ID */
if (!walk_state->thread) {
ACPI_REPORT_ERROR(("Cannot acquire Mutex [%4.4s], null thread info\n", acpi_ut_get_node_name(obj_desc->mutex.node)));
ACPI_ERROR((AE_INFO,
"Cannot acquire Mutex [%4.4s], null thread info",
acpi_ut_get_node_name(obj_desc->mutex.node)));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -162,7 +164,9 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
* mutex. This mechanism provides some deadlock prevention
*/
if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) {
ACPI_REPORT_ERROR(("Cannot acquire Mutex [%4.4s], incorrect sync_level\n", acpi_ut_get_node_name(obj_desc->mutex.node)));
ACPI_ERROR((AE_INFO,
"Cannot acquire Mutex [%4.4s], incorrect sync_level",
acpi_ut_get_node_name(obj_desc->mutex.node)));
return_ACPI_STATUS(AE_AML_MUTEX_ORDER);
}
@ -237,14 +241,18 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
/* The mutex must have been previously acquired in order to release it */
if (!obj_desc->mutex.owner_thread) {
ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], not acquired\n", acpi_ut_get_node_name(obj_desc->mutex.node)));
ACPI_ERROR((AE_INFO,
"Cannot release Mutex [%4.4s], not acquired",
acpi_ut_get_node_name(obj_desc->mutex.node)));
return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED);
}
/* Sanity check -- we must have a valid thread ID */
if (!walk_state->thread) {
ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], null thread info\n", acpi_ut_get_node_name(obj_desc->mutex.node)));
ACPI_ERROR((AE_INFO,
"Cannot release Mutex [%4.4s], null thread info",
acpi_ut_get_node_name(obj_desc->mutex.node)));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -255,7 +263,11 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
if ((obj_desc->mutex.owner_thread->thread_id !=
walk_state->thread->thread_id)
&& (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) {
ACPI_REPORT_ERROR(("Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n", walk_state->thread->thread_id, acpi_ut_get_node_name(obj_desc->mutex.node), obj_desc->mutex.owner_thread->thread_id));
ACPI_ERROR((AE_INFO,
"Thread %X cannot release Mutex [%4.4s] acquired by thread %X",
walk_state->thread->thread_id,
acpi_ut_get_node_name(obj_desc->mutex.node),
obj_desc->mutex.owner_thread->thread_id));
return_ACPI_STATUS(AE_AML_NOT_OWNER);
}
@ -264,7 +276,9 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
* equal to the current sync level
*/
if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) {
ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], incorrect sync_level\n", acpi_ut_get_node_name(obj_desc->mutex.node)));
ACPI_ERROR((AE_INFO,
"Cannot release Mutex [%4.4s], incorrect sync_level",
acpi_ut_get_node_name(obj_desc->mutex.node)));
return_ACPI_STATUS(AE_AML_MUTEX_ORDER);
}

View File

@ -99,8 +99,8 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
*/
name_string = ACPI_MEM_ALLOCATE(size_needed);
if (!name_string) {
ACPI_REPORT_ERROR(("Could not allocate size %d\n",
size_needed));
ACPI_ERROR((AE_INFO,
"Could not allocate size %d", size_needed));
return_PTR(NULL);
}
@ -168,7 +168,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
char_buf[0] = *aml_address;
if ('0' <= char_buf[0] && char_buf[0] <= '9') {
ACPI_REPORT_ERROR(("Invalid leading digit: %c\n", char_buf[0]));
ACPI_ERROR((AE_INFO, "Invalid leading digit: %c", char_buf[0]));
return_ACPI_STATUS(AE_CTRL_PENDING);
}
@ -211,7 +211,8 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
* the required 4
*/
status = AE_AML_BAD_NAME;
ACPI_REPORT_ERROR(("Bad character %02x in name, at %p\n",
ACPI_ERROR((AE_INFO,
"Bad character %02x in name, at %p",
*aml_address, aml_address));
}
@ -411,7 +412,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
if (AE_CTRL_PENDING == status && has_prefix) {
/* Ran out of segments after processing a prefix */
ACPI_REPORT_ERROR(("Malformed Name at %p\n", name_string));
ACPI_ERROR((AE_INFO, "Malformed Name at %p", name_string));
status = AE_AML_BAD_NAME;
}

View File

@ -111,7 +111,7 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state)
default: /* Unknown opcode */
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
break;
@ -189,7 +189,7 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state)
default: /* Unknown opcode */
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
break;
@ -229,7 +229,7 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state)
default: /* Unknown opcode */
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;
@ -349,7 +349,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
/* Check the range of the digit */
if (temp32 > 9) {
ACPI_REPORT_ERROR(("BCD digit too large (not decimal): 0x%X\n", temp32));
ACPI_ERROR((AE_INFO,
"BCD digit too large (not decimal): 0x%X",
temp32));
status = AE_AML_NUMERIC_OVERFLOW;
goto cleanup;
@ -394,7 +396,10 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
/* Overflow if there is any data left in Digit */
if (digit > 0) {
ACPI_REPORT_ERROR(("Integer too large to convert to BCD: %8.8X%8.8X\n", ACPI_FORMAT_UINT64(operand[0]->integer.value)));
ACPI_ERROR((AE_INFO,
"Integer too large to convert to BCD: %8.8X%8.8X",
ACPI_FORMAT_UINT64(operand[0]->
integer.value)));
status = AE_AML_NUMERIC_OVERFLOW;
goto cleanup;
}
@ -521,15 +526,15 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
/* These are two obsolete opcodes */
ACPI_REPORT_ERROR(("%s is obsolete and not implemented\n",
acpi_ps_get_opcode_name(walk_state->
opcode)));
ACPI_ERROR((AE_INFO,
"%s is obsolete and not implemented",
acpi_ps_get_opcode_name(walk_state->opcode)));
status = AE_SUPPORT;
goto cleanup;
default: /* Unknown opcode */
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;
@ -636,10 +641,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc,
walk_state);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s: bad operand(s) %s\n",
ACPI_EXCEPTION((AE_INFO, status,
"While resolving operands for [%s]",
acpi_ps_get_opcode_name(walk_state->
opcode),
acpi_format_exception(status)));
opcode)));
goto cleanup;
}
@ -738,7 +743,9 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
break;
default:
ACPI_REPORT_ERROR(("Operand is not Buf/Int/Str/Pkg - found type %s\n", acpi_ut_get_type_name(type)));
ACPI_ERROR((AE_INFO,
"Operand is not Buf/Int/Str/Pkg - found type %s",
acpi_ut_get_type_name(type)));
status = AE_AML_OPERAND_TYPE;
goto cleanup;
}
@ -935,7 +942,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unknown Index target_type %X in obj %p\n", operand[0]->reference.target_type, operand[0]));
ACPI_ERROR((AE_INFO,
"Unknown Index target_type %X in obj %p",
operand[0]->reference.
target_type, operand[0]));
status = AE_AML_OPERAND_TYPE;
goto cleanup;
}
@ -961,7 +971,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
break;
default:
ACPI_REPORT_ERROR(("Unknown opcode in ref(%p) - %X\n", operand[0], operand[0]->reference.opcode));
ACPI_ERROR((AE_INFO,
"Unknown opcode in ref(%p) - %X",
operand[0],
operand[0]->reference.opcode));
status = AE_TYPE;
goto cleanup;
@ -971,7 +984,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;

View File

@ -111,7 +111,9 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state)
/* Are notifies allowed on this object? */
if (!acpi_ev_is_notify_object(node)) {
ACPI_REPORT_ERROR(("Unexpected notify object type [%s]\n", acpi_ut_get_type_name(node->type)));
ACPI_ERROR((AE_INFO,
"Unexpected notify object type [%s]",
acpi_ut_get_type_name(node->type)));
status = AE_AML_OPERAND_TYPE;
break;
@ -155,7 +157,7 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
}
@ -220,7 +222,7 @@ acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;
@ -389,7 +391,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
/* Object to be indexed is a Package */
if (index >= operand[0]->package.count) {
ACPI_REPORT_ERROR(("Index value (%X%8.8X) beyond package end (%X)\n", ACPI_FORMAT_UINT64(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;
}
@ -402,7 +407,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
/* Object to be indexed is a Buffer/String */
if (index >= operand[0]->buffer.length) {
ACPI_REPORT_ERROR(("Index value (%X%8.8X) beyond end of buffer (%X)\n", ACPI_FORMAT_UINT64(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;
}
@ -434,7 +442,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
break;
@ -539,7 +547,7 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;

View File

@ -119,7 +119,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;
@ -243,7 +243,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
default:
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;

View File

@ -234,7 +234,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) ||
(operand[3]->integer.value > MAX_MATCH_OPERATOR)) {
ACPI_REPORT_ERROR(("Match operator out of range\n"));
ACPI_ERROR((AE_INFO, "Match operator out of range"));
status = AE_AML_OPERAND_VALUE;
goto cleanup;
}
@ -243,7 +243,10 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
index = operand[5]->integer.value;
if (index >= operand[0]->package.count) {
ACPI_REPORT_ERROR(("Index (%X%8.8X) beyond package end (%X)\n", ACPI_FORMAT_UINT64(index), operand[0]->package.count));
ACPI_ERROR((AE_INFO,
"Index (%X%8.8X) beyond package end (%X)",
ACPI_FORMAT_UINT64(index),
operand[0]->package.count));
status = AE_AML_PACKAGE_LIMIT;
goto cleanup;
}
@ -312,7 +315,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
default:
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X",
walk_state->opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;

View File

@ -274,7 +274,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc,
default:
/* Invalid field access type */
ACPI_REPORT_ERROR(("Unknown field access type %X\n", access));
ACPI_ERROR((AE_INFO, "Unknown field access type %X", access));
return_UINT32(0);
}
@ -421,13 +421,15 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) {
if (!info->region_node) {
ACPI_REPORT_ERROR(("Null region_node\n"));
ACPI_ERROR((AE_INFO, "Null region_node"));
return_ACPI_STATUS(AE_AML_NO_OPERAND);
}
type = acpi_ns_get_type(info->region_node);
if (type != ACPI_TYPE_REGION) {
ACPI_REPORT_ERROR(("Needed Region, found type %X (%s)\n", type, acpi_ut_get_type_name(type)));
ACPI_ERROR((AE_INFO,
"Needed Region, found type %X (%s)",
type, acpi_ut_get_type_name(type)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -496,17 +498,17 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
case ACPI_TYPE_LOCAL_INDEX_FIELD:
/* Get the Index and Data registers */
obj_desc->index_field.index_obj =
acpi_ns_get_attached_object(info->register_node);
obj_desc->index_field.data_obj =
acpi_ns_get_attached_object(info->data_register_node);
obj_desc->index_field.value = (u32)
(info->field_bit_position /
ACPI_MUL_8(obj_desc->field.access_byte_width));
if (!obj_desc->index_field.data_obj
|| !obj_desc->index_field.index_obj) {
ACPI_REPORT_ERROR(("Null Index Object during field prep\n"));
ACPI_ERROR((AE_INFO,
"Null Index Object during field prep"));
acpi_ut_delete_object_desc(obj_desc);
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -516,6 +518,15 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
acpi_ut_add_reference(obj_desc->index_field.data_obj);
acpi_ut_add_reference(obj_desc->index_field.index_obj);
/*
* The value written to the Index register is the byte offset of the
* target field
* Note: may change code to: ACPI_DIV_8 (Info->field_bit_position)
*/
obj_desc->index_field.value = (u32)
(info->field_bit_position /
ACPI_MUL_8(obj_desc->field.access_byte_width));
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
"index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n",
obj_desc->index_field.start_field_bit_offset,

View File

@ -103,7 +103,7 @@ acpi_ex_system_memory_space_handler(u32 function,
break;
default:
ACPI_REPORT_ERROR(("Invalid system_memory width %d\n",
ACPI_ERROR((AE_INFO, "Invalid system_memory width %d",
bit_width));
return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
}
@ -158,7 +158,10 @@ acpi_ex_system_memory_space_handler(u32 function,
(void **)&mem_info->
mapped_logical_address);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not map memory at %8.8X%8.8X, size %X\n", ACPI_FORMAT_UINT64(address), (u32) window_size));
ACPI_ERROR((AE_INFO,
"Could not map memory at %8.8X%8.8X, size %X",
ACPI_FORMAT_UINT64(address),
(u32) window_size));
mem_info->mapped_length = 0;
return_ACPI_STATUS(status);
}

View File

@ -122,7 +122,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
}
if (!source_desc) {
ACPI_REPORT_ERROR(("No object attached to node %p\n", node));
ACPI_ERROR((AE_INFO, "No object attached to node %p", node));
return_ACPI_STATUS(AE_AML_NO_OPERAND);
}
@ -134,9 +134,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
case ACPI_TYPE_PACKAGE:
if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_PACKAGE) {
ACPI_REPORT_ERROR(("Object not a Package, type %s\n",
acpi_ut_get_object_type_name
(source_desc)));
ACPI_ERROR((AE_INFO, "Object not a Package, type %s",
acpi_ut_get_object_type_name(source_desc)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -152,9 +151,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
case ACPI_TYPE_BUFFER:
if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) {
ACPI_REPORT_ERROR(("Object not a Buffer, type %s\n",
acpi_ut_get_object_type_name
(source_desc)));
ACPI_ERROR((AE_INFO, "Object not a Buffer, type %s",
acpi_ut_get_object_type_name(source_desc)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -170,9 +168,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
case ACPI_TYPE_STRING:
if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) {
ACPI_REPORT_ERROR(("Object not a String, type %s\n",
acpi_ut_get_object_type_name
(source_desc)));
ACPI_ERROR((AE_INFO, "Object not a String, type %s",
acpi_ut_get_object_type_name(source_desc)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -185,9 +182,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
case ACPI_TYPE_INTEGER:
if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) {
ACPI_REPORT_ERROR(("Object not a Integer, type %s\n",
acpi_ut_get_object_type_name
(source_desc)));
ACPI_ERROR((AE_INFO, "Object not a Integer, type %s",
acpi_ut_get_object_type_name(source_desc)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -231,8 +227,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
case ACPI_TYPE_ANY:
ACPI_REPORT_ERROR(("Untyped entry %p, no attached object!\n",
node));
ACPI_ERROR((AE_INFO,
"Untyped entry %p, no attached object!", node));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE); /* Cannot be AE_TYPE */
@ -251,7 +247,11 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
default:
/* No named references are allowed here */
ACPI_REPORT_ERROR(("Unsupported Reference opcode %X (%s)\n", source_desc->reference.opcode, acpi_ps_get_opcode_name(source_desc->reference.opcode)));
ACPI_ERROR((AE_INFO,
"Unsupported Reference opcode %X (%s)",
source_desc->reference.opcode,
acpi_ps_get_opcode_name(source_desc->
reference.opcode)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -261,7 +261,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
/* Default case is for unknown types */
ACPI_REPORT_ERROR(("Node %p - Unknown object type %X\n",
ACPI_ERROR((AE_INFO,
"Node %p - Unknown object type %X",
node, entry_type));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);

View File

@ -81,7 +81,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr,
ACPI_FUNCTION_TRACE_PTR("ex_resolve_to_value", stack_ptr);
if (!stack_ptr || !*stack_ptr) {
ACPI_REPORT_ERROR(("Internal - null pointer\n"));
ACPI_ERROR((AE_INFO, "Internal - null pointer"));
return_ACPI_STATUS(AE_AML_NO_OPERAND);
}
@ -97,7 +97,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr,
}
if (!*stack_ptr) {
ACPI_REPORT_ERROR(("Internal - null pointer\n"));
ACPI_ERROR((AE_INFO, "Internal - null pointer"));
return_ACPI_STATUS(AE_AML_NO_OPERAND);
}
}
@ -227,7 +227,9 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
* A NULL object descriptor means an unitialized element of
* the package, can't dereference it
*/
ACPI_REPORT_ERROR(("Attempt to deref an Index to NULL pkg element Idx=%p\n", stack_desc));
ACPI_ERROR((AE_INFO,
"Attempt to deref an Index to NULL pkg element Idx=%p",
stack_desc));
status = AE_AML_UNINITIALIZED_ELEMENT;
}
break;
@ -236,7 +238,10 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
/* Invalid reference object */
ACPI_REPORT_ERROR(("Unknown target_type %X in Index/Reference obj %p\n", stack_desc->reference.target_type, stack_desc));
ACPI_ERROR((AE_INFO,
"Unknown target_type %X in Index/Reference obj %p",
stack_desc->reference.target_type,
stack_desc));
status = AE_AML_INTERNAL;
break;
}
@ -261,7 +266,10 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
default:
ACPI_REPORT_ERROR(("Unknown Reference opcode %X (%s) in %p\n", opcode, acpi_ps_get_opcode_name(opcode), stack_desc));
ACPI_ERROR((AE_INFO,
"Unknown Reference opcode %X (%s) in %p",
opcode, acpi_ps_get_opcode_name(opcode),
stack_desc));
status = AE_AML_INTERNAL;
break;
}
@ -383,10 +391,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
if (ACPI_GET_DESCRIPTOR_TYPE(node) !=
ACPI_DESC_TYPE_NAMED) {
ACPI_REPORT_ERROR(("Not a NS node %p [%s]\n",
ACPI_ERROR((AE_INFO, "Not a NS node %p [%s]",
node,
acpi_ut_get_descriptor_name
(node)));
acpi_ut_get_descriptor_name(node)));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -442,10 +449,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
if (ACPI_GET_DESCRIPTOR_TYPE(node) !=
ACPI_DESC_TYPE_NAMED) {
ACPI_REPORT_ERROR(("Not a NS node %p [%s]\n",
ACPI_ERROR((AE_INFO, "Not a NS node %p [%s]",
node,
acpi_ut_get_descriptor_name
(node)));
acpi_ut_get_descriptor_name(node)));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -514,7 +520,8 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
default:
ACPI_REPORT_ERROR(("Unknown Reference subtype %X\n",
ACPI_ERROR((AE_INFO,
"Unknown Reference subtype %X",
obj_desc->reference.opcode));
return_ACPI_STATUS(AE_AML_INTERNAL);
}

View File

@ -46,6 +46,7 @@
#include <acpi/amlcode.h>
#include <acpi/acparser.h>
#include <acpi/acinterp.h>
#include <acpi/acnamesp.h>
#define _COMPONENT ACPI_EXECUTER
ACPI_MODULE_NAME("exresop")
@ -95,7 +96,8 @@ acpi_ex_check_object_type(acpi_object_type type_needed,
}
if (type_needed != this_type) {
ACPI_REPORT_ERROR(("Needed type [%s], found [%s] %p\n",
ACPI_ERROR((AE_INFO,
"Needed type [%s], found [%s] %p",
acpi_ut_get_type_name(type_needed),
acpi_ut_get_type_name(this_type), object));
@ -150,7 +152,7 @@ acpi_ex_resolve_operands(u16 opcode,
arg_types = op_info->runtime_args;
if (arg_types == ARGI_INVALID_OPCODE) {
ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", opcode));
ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", opcode));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -168,7 +170,7 @@ acpi_ex_resolve_operands(u16 opcode,
*/
while (GET_CURRENT_ARG_TYPE(arg_types)) {
if (!stack_ptr || !*stack_ptr) {
ACPI_REPORT_ERROR(("Null stack entry at %p\n",
ACPI_ERROR((AE_INFO, "Null stack entry at %p",
stack_ptr));
return_ACPI_STATUS(AE_AML_INTERNAL);
@ -187,6 +189,22 @@ acpi_ex_resolve_operands(u16 opcode,
object_type =
((struct acpi_namespace_node *)obj_desc)->type;
/*
* Resolve an alias object. The construction of these objects
* guarantees that there is only one level of alias indirection;
* thus, the attached object is always the aliased namespace node
*/
if (object_type == ACPI_TYPE_LOCAL_ALIAS) {
obj_desc =
acpi_ns_get_attached_object((struct
acpi_namespace_node
*)obj_desc);
*stack_ptr = obj_desc;
object_type =
((struct acpi_namespace_node *)obj_desc)->
type;
}
break;
case ACPI_DESC_TYPE_OPERAND:
@ -198,7 +216,9 @@ acpi_ex_resolve_operands(u16 opcode,
/* Check for bad acpi_object_type */
if (!acpi_ut_valid_object_type(object_type)) {
ACPI_REPORT_ERROR(("Bad operand object type [%X]\n", object_type));
ACPI_ERROR((AE_INFO,
"Bad operand object type [%X]",
object_type));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -236,7 +256,10 @@ acpi_ex_resolve_operands(u16 opcode,
break;
default:
ACPI_REPORT_ERROR(("Operand is a Reference, Unknown Reference Opcode: %X\n", obj_desc->reference.opcode));
ACPI_ERROR((AE_INFO,
"Operand is a Reference, Unknown Reference Opcode: %X",
obj_desc->reference.
opcode));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -247,10 +270,10 @@ acpi_ex_resolve_operands(u16 opcode,
/* Invalid descriptor */
ACPI_REPORT_ERROR(("Invalid descriptor %p [%s]\n",
ACPI_ERROR((AE_INFO,
"Invalid descriptor %p [%s]",
obj_desc,
acpi_ut_get_descriptor_name
(obj_desc)));
acpi_ut_get_descriptor_name(obj_desc)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -408,7 +431,10 @@ acpi_ex_resolve_operands(u16 opcode,
acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16);
if (ACPI_FAILURE(status)) {
if (status == AE_TYPE) {
ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed [Integer/String/Buffer], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -431,7 +457,10 @@ acpi_ex_resolve_operands(u16 opcode,
status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr);
if (ACPI_FAILURE(status)) {
if (status == AE_TYPE) {
ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed [Integer/String/Buffer], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -455,7 +484,10 @@ acpi_ex_resolve_operands(u16 opcode,
ACPI_IMPLICIT_CONVERT_HEX);
if (ACPI_FAILURE(status)) {
if (status == AE_TYPE) {
ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed [Integer/String/Buffer], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -481,7 +513,10 @@ acpi_ex_resolve_operands(u16 opcode,
break;
default:
ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed [Integer/String/Buffer], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -515,7 +550,10 @@ acpi_ex_resolve_operands(u16 opcode,
break;
default:
ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed [Integer/String/Buffer], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -539,7 +577,10 @@ acpi_ex_resolve_operands(u16 opcode,
break;
default:
ACPI_REPORT_ERROR(("Needed [Buffer/String/Package/Reference], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed [Buffer/String/Package/Reference], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -558,7 +599,10 @@ acpi_ex_resolve_operands(u16 opcode,
break;
default:
ACPI_REPORT_ERROR(("Needed [Buffer/String/Package], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed [Buffer/String/Package], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -578,7 +622,10 @@ acpi_ex_resolve_operands(u16 opcode,
break;
default:
ACPI_REPORT_ERROR(("Needed [Region/region_field], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed [Region/region_field], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -620,7 +667,10 @@ acpi_ex_resolve_operands(u16 opcode,
break;
}
ACPI_REPORT_ERROR(("Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc));
ACPI_ERROR((AE_INFO,
"Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p",
acpi_ut_get_object_type_name
(obj_desc), obj_desc));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -630,7 +680,9 @@ acpi_ex_resolve_operands(u16 opcode,
/* Unknown type */
ACPI_REPORT_ERROR(("Internal - Unknown ARGI (required operand) type %X\n", this_arg_type));
ACPI_ERROR((AE_INFO,
"Internal - Unknown ARGI (required operand) type %X",
this_arg_type));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}

View File

@ -250,7 +250,7 @@ acpi_ex_store(union acpi_operand_object *source_desc,
/* Validate parameters */
if (!source_desc || !dest_desc) {
ACPI_REPORT_ERROR(("Null parameter\n"));
ACPI_ERROR((AE_INFO, "Null parameter"));
return_ACPI_STATUS(AE_AML_NO_OPERAND);
}
@ -290,7 +290,10 @@ acpi_ex_store(union acpi_operand_object *source_desc,
/* Destination is not a Reference object */
ACPI_REPORT_ERROR(("Target is not a Reference or Constant object - %s [%p]\n", acpi_ut_get_object_type_name(dest_desc), dest_desc));
ACPI_ERROR((AE_INFO,
"Target is not a Reference or Constant object - %s [%p]",
acpi_ut_get_object_type_name(dest_desc),
dest_desc));
ACPI_DUMP_STACK_ENTRY(source_desc);
ACPI_DUMP_STACK_ENTRY(dest_desc);
@ -357,7 +360,7 @@ acpi_ex_store(union acpi_operand_object *source_desc,
default:
ACPI_REPORT_ERROR(("Unknown Reference opcode %X\n",
ACPI_ERROR((AE_INFO, "Unknown Reference opcode %X",
ref_desc->reference.opcode));
ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR);
@ -487,7 +490,9 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
/* All other types are invalid */
ACPI_REPORT_ERROR(("Source must be Integer/Buffer/String type, not %s\n", acpi_ut_get_object_type_name(source_desc)));
ACPI_ERROR((AE_INFO,
"Source must be Integer/Buffer/String type, not %s",
acpi_ut_get_object_type_name(source_desc)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
@ -497,7 +502,8 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
break;
default:
ACPI_REPORT_ERROR(("Target is not a Package or buffer_field\n"));
ACPI_ERROR((AE_INFO,
"Target is not a Package or buffer_field"));
status = AE_AML_OPERAND_TYPE;
break;
}

View File

@ -123,7 +123,10 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
&& (source_desc->reference.opcode == AML_LOAD_OP))) {
/* Conversion successful but still not a valid type */
ACPI_REPORT_ERROR(("Cannot assign type %s to %s (must be type Int/Str/Buf)\n", acpi_ut_get_object_type_name(source_desc), acpi_ut_get_type_name(target_type)));
ACPI_ERROR((AE_INFO,
"Cannot assign type %s to %s (must be type Int/Str/Buf)",
acpi_ut_get_object_type_name(source_desc),
acpi_ut_get_type_name(target_type)));
status = AE_AML_OPERAND_TYPE;
}
break;
@ -131,9 +134,11 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
case ACPI_TYPE_LOCAL_ALIAS:
case ACPI_TYPE_LOCAL_METHOD_ALIAS:
/* Aliases are resolved by acpi_ex_prep_operands */
ACPI_REPORT_ERROR(("Store into Alias - should never happen\n"));
/*
* All aliases should have been resolved earlier, during the
* operand resolution phase.
*/
ACPI_ERROR((AE_INFO, "Store into an unresolved Alias object"));
status = AE_AML_INTERNAL;
break;
@ -276,7 +281,7 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc,
/*
* All other types come here.
*/
ACPI_REPORT_WARNING(("Store into type %s not implemented\n",
ACPI_WARNING((AE_INFO, "Store into type %s not implemented",
acpi_ut_get_object_type_name(dest_desc)));
status = AE_NOT_IMPLEMENTED;

View File

@ -129,7 +129,7 @@ acpi_status acpi_ex_system_do_stall(u32 how_long)
* (ACPI specifies 100 usec as max, but this gives some slack in
* order to support existing BIOSs)
*/
ACPI_REPORT_ERROR(("Time parameter is too large (%d)\n",
ACPI_ERROR((AE_INFO, "Time parameter is too large (%d)",
how_long));
status = AE_AML_OPERAND_VALUE;
} else {

View File

@ -91,7 +91,7 @@ acpi_status acpi_ex_enter_interpreter(void)
status = acpi_ut_acquire_mutex(ACPI_MTX_EXECUTE);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not acquire interpreter mutex\n"));
ACPI_ERROR((AE_INFO, "Could not acquire interpreter mutex"));
}
return_ACPI_STATUS(status);
@ -127,7 +127,7 @@ void acpi_ex_exit_interpreter(void)
status = acpi_ut_release_mutex(ACPI_MTX_EXECUTE);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not release interpreter mutex\n"));
ACPI_ERROR((AE_INFO, "Could not release interpreter mutex"));
}
return_VOID;
@ -200,7 +200,8 @@ u8 acpi_ex_acquire_global_lock(u32 field_flags)
if (ACPI_SUCCESS(status)) {
locked = TRUE;
} else {
ACPI_REPORT_ERROR(("Could not acquire Global Lock, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not acquire Global Lock"));
}
}
@ -235,7 +236,8 @@ void acpi_ex_release_global_lock(u8 locked_by_me)
if (ACPI_FAILURE(status)) {
/* Report the error, but there isn't much else we can do */
ACPI_REPORT_ERROR(("Could not release ACPI Global Lock, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not release ACPI Global Lock"));
}
}

View File

@ -68,7 +68,7 @@ acpi_status acpi_hw_initialize(void)
/* We must have the ACPI tables by the time we get here */
if (!acpi_gbl_FADT) {
ACPI_REPORT_ERROR(("No FADT is present\n"));
ACPI_ERROR((AE_INFO, "No FADT is present"));
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
}
@ -107,7 +107,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
* system does not support mode transition.
*/
if (!acpi_gbl_FADT->smi_cmd) {
ACPI_REPORT_ERROR(("No SMI_CMD in FADT, mode transition failed\n"));
ACPI_ERROR((AE_INFO,
"No SMI_CMD in FADT, mode transition failed"));
return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
}
@ -119,7 +120,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
* transitions are not supported.
*/
if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) {
ACPI_REPORT_ERROR(("No ACPI mode transition supported in this system (enable/disable both zero)\n"));
ACPI_ERROR((AE_INFO,
"No ACPI mode transition supported in this system (enable/disable both zero)"));
return_ACPI_STATUS(AE_OK);
}
@ -153,8 +155,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
}
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not write mode change, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not write ACPI mode change"));
return_ACPI_STATUS(status);
}
@ -174,7 +176,7 @@ acpi_status acpi_hw_set_mode(u32 mode)
retry--;
}
ACPI_REPORT_ERROR(("Hardware never changed modes\n"));
ACPI_ERROR((AE_INFO, "Hardware did not change modes"));
return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
}

View File

@ -160,7 +160,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
/* Must have a return object */
if (!info.return_object) {
ACPI_REPORT_ERROR(("No Sleep State object returned from [%s]\n",
ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]",
sleep_state_name));
status = AE_NOT_EXIST;
}
@ -168,7 +168,8 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
/* It must be of type Package */
else if (ACPI_GET_OBJECT_TYPE(info.return_object) != ACPI_TYPE_PACKAGE) {
ACPI_REPORT_ERROR(("Sleep State return object is not a Package\n"));
ACPI_ERROR((AE_INFO,
"Sleep State return object is not a Package"));
status = AE_AML_OPERAND_TYPE;
}
@ -180,7 +181,8 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
* one per sleep type (A/B).
*/
else if (info.return_object->package.count < 2) {
ACPI_REPORT_ERROR(("Sleep State return package does not have at least two elements\n"));
ACPI_ERROR((AE_INFO,
"Sleep State return package does not have at least two elements"));
status = AE_AML_NO_OPERAND;
}
@ -190,7 +192,12 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
!= ACPI_TYPE_INTEGER) ||
(ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[1])
!= ACPI_TYPE_INTEGER)) {
ACPI_REPORT_ERROR(("Sleep State return package elements are not both Integers (%s, %s)\n", acpi_ut_get_object_type_name(info.return_object->package.elements[0]), acpi_ut_get_object_type_name(info.return_object->package.elements[1])));
ACPI_ERROR((AE_INFO,
"Sleep State return package elements are not both Integers (%s, %s)",
acpi_ut_get_object_type_name(info.return_object->
package.elements[0]),
acpi_ut_get_object_type_name(info.return_object->
package.elements[1])));
status = AE_AML_OPERAND_TYPE;
} else {
/* Valid _Sx_ package size, type, and value */
@ -202,7 +209,11 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
}
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("%s While evaluating sleep_state [%s], bad Sleep object %p type %s\n", acpi_format_exception(status), sleep_state_name, info.return_object, acpi_ut_get_object_type_name(info.return_object)));
ACPI_EXCEPTION((AE_INFO, status,
"While evaluating sleep_state [%s], bad Sleep object %p type %s",
sleep_state_name, info.return_object,
acpi_ut_get_object_type_name(info.
return_object)));
}
acpi_ut_remove_reference(info.return_object);
@ -228,7 +239,7 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
ACPI_FUNCTION_ENTRY();
if (register_id > ACPI_BITREG_MAX) {
ACPI_REPORT_ERROR(("Invalid bit_register ID: %X\n",
ACPI_ERROR((AE_INFO, "Invalid bit_register ID: %X",
register_id));
return (NULL);
}
@ -329,7 +340,7 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags)
bit_reg_info = acpi_hw_get_bit_register_info(register_id);
if (!bit_reg_info) {
ACPI_REPORT_ERROR(("Bad ACPI HW register_id: %X\n",
ACPI_ERROR((AE_INFO, "Bad ACPI HW register_id: %X",
register_id));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
@ -564,7 +575,7 @@ acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value)
break;
default:
ACPI_REPORT_ERROR(("Unknown Register ID: %X\n", register_id));
ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id));
status = AE_BAD_PARAMETER;
break;
}
@ -759,7 +770,8 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)
break;
default:
ACPI_REPORT_ERROR(("Unsupported address space: %X\n",
ACPI_ERROR((AE_INFO,
"Unsupported address space: %X",
reg->address_space_id));
return (AE_BAD_PARAMETER);
}
@ -829,7 +841,8 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)
break;
default:
ACPI_REPORT_ERROR(("Unsupported address space: %X\n",
ACPI_ERROR((AE_INFO,
"Unsupported address space: %X",
reg->address_space_id));
return (AE_BAD_PARAMETER);
}

View File

@ -199,8 +199,8 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
ACPI_REPORT_ERROR(("Method _SST failed, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"While executing method _SST"));
}
return_ACPI_STATUS(AE_OK);
@ -232,9 +232,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) ||
(acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) {
ACPI_REPORT_ERROR(("Sleep values out of range: A=%X B=%X\n",
acpi_gbl_sleep_type_a,
acpi_gbl_sleep_type_b));
ACPI_ERROR((AE_INFO, "Sleep values out of range: A=%X B=%X",
acpi_gbl_sleep_type_a, acpi_gbl_sleep_type_b));
return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
}
@ -533,21 +532,18 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
arg.integer.value = ACPI_SST_WAKING;
status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
ACPI_REPORT_ERROR(("Method _SST failed, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During Method _SST"));
}
arg.integer.value = sleep_state;
status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
ACPI_REPORT_ERROR(("Method _BFS failed, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS"));
}
status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
ACPI_REPORT_ERROR(("Method _WAK failed, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK"));
}
/* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
@ -582,8 +578,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
arg.integer.value = ACPI_SST_WORKING;
status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
ACPI_REPORT_ERROR(("Method _SST failed, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During Method _SST"));
}
return_ACPI_STATUS(status);

View File

@ -110,7 +110,9 @@ acpi_status acpi_ns_root_initialize(void)
ACPI_NS_NO_UPSEARCH, NULL, &new_node);
if (ACPI_FAILURE(status) || (!new_node)) { /* Must be on same line for code converter */
ACPI_REPORT_ERROR(("Could not create predefined name %s, %s\n", init_val->name, acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not create predefined name %s",
init_val->name));
}
/*
@ -121,7 +123,9 @@ acpi_status acpi_ns_root_initialize(void)
if (init_val->val) {
status = acpi_os_predefined_override(init_val, &val);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not override predefined %s\n", init_val->name));
ACPI_ERROR((AE_INFO,
"Could not override predefined %s",
init_val->name));
}
if (!val) {
@ -228,7 +232,9 @@ acpi_status acpi_ns_root_initialize(void)
default:
ACPI_REPORT_ERROR(("Unsupported initial type value %X\n", init_val->type));
ACPI_ERROR((AE_INFO,
"Unsupported initial type value %X",
init_val->type));
acpi_ut_remove_reference(obj_desc);
obj_desc = NULL;
continue;
@ -334,10 +340,9 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
prefix_node = scope_info->scope.node;
if (ACPI_GET_DESCRIPTOR_TYPE(prefix_node) !=
ACPI_DESC_TYPE_NAMED) {
ACPI_REPORT_ERROR(("%p is not a namespace node [%s]\n",
ACPI_ERROR((AE_INFO, "%p is not a namespace node [%s]",
prefix_node,
acpi_ut_get_descriptor_name
(prefix_node)));
acpi_ut_get_descriptor_name(prefix_node)));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -427,7 +432,8 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
if (!this_node) {
/* Current scope has no parent scope */
ACPI_REPORT_ERROR(("ACPI path has too many parent prefixes (^) - reached beyond root node\n"));
ACPI_ERROR((AE_INFO,
"ACPI path has too many parent prefixes (^) - reached beyond root node"));
return_ACPI_STATUS(AE_NOT_FOUND);
}
}
@ -598,7 +604,12 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
(this_node->type != type_to_check_for)) {
/* Complain about a type mismatch */
ACPI_REPORT_WARNING(("ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)\n", ACPI_CAST_PTR(char, &simple_name), acpi_ut_get_type_name(this_node->type), acpi_ut_get_type_name(type_to_check_for)));
ACPI_WARNING((AE_INFO,
"ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)",
ACPI_CAST_PTR(char, &simple_name),
acpi_ut_get_type_name(this_node->type),
acpi_ut_get_type_name
(type_to_check_for)));
}
/*

View File

@ -272,7 +272,7 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node)
/* Grandchildren should have all been deleted already */
if (child_node->child) {
ACPI_REPORT_ERROR(("Found a grandchild! P=%p C=%p\n",
ACPI_ERROR((AE_INFO, "Found a grandchild! P=%p C=%p",
parent_node, child_node));
}
@ -301,7 +301,9 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node)
/* There should be only one reference remaining on this node */
if (child_node->reference_count != 1) {
ACPI_REPORT_WARNING(("Existing references (%d) on node being deleted (%p)\n", child_node->reference_count, child_node));
ACPI_WARNING((AE_INFO,
"Existing references (%d) on node being deleted (%p)",
child_node->reference_count, child_node));
}
/* Now we can delete the node */

View File

@ -198,12 +198,12 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
/* Check the node type and name */
if (type > ACPI_TYPE_LOCAL_MAX) {
ACPI_REPORT_WARNING(("Invalid ACPI Object Type %08X\n",
ACPI_WARNING((AE_INFO, "Invalid ACPI Object Type %08X",
type));
}
if (!acpi_ut_valid_acpi_name(this_node->name.integer)) {
ACPI_REPORT_WARNING(("Invalid ACPI Name %08X\n",
ACPI_WARNING((AE_INFO, "Invalid ACPI Name %08X",
this_node->name.integer));
}

View File

@ -373,7 +373,7 @@ acpi_ns_execute_control_method(struct acpi_parameter_info *info)
info->obj_desc = acpi_ns_get_attached_object(info->node);
if (!info->obj_desc) {
ACPI_REPORT_ERROR(("No attached method object\n"));
ACPI_ERROR((AE_INFO, "No attached method object"));
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(AE_NULL_OBJECT);

View File

@ -93,8 +93,7 @@ acpi_status acpi_ns_initialize_objects(void)
ACPI_UINT32_MAX, acpi_ns_init_one_object,
&info, NULL);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("walk_namespace failed! %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace"));
}
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
@ -159,12 +158,11 @@ acpi_status acpi_ns_initialize_devices(void)
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("walk_namespace failed! %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace"));
}
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
"\n%hd Devices found containing: %hd _STA, %hd _INI methods\n",
"\n%hd Devices found - executed %hd _STA, %hd _INI methods\n",
info.device_count, info.num_STA, info.num_INI));
return_ACPI_STATUS(status);
@ -289,7 +287,10 @@ acpi_ns_init_one_object(acpi_handle obj_handle,
}
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("\nCould not execute arguments for [%4.4s] (%s), %s\n", acpi_ut_get_node_name(node), acpi_ut_get_type_name(type), acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not execute arguments for [%4.4s] (%s)",
acpi_ut_get_node_name(node),
acpi_ut_get_type_name(type)));
}
/*
@ -416,9 +417,8 @@ acpi_ns_init_one_device(acpi_handle obj_handle,
#ifdef ACPI_DEBUG_OUTPUT
char *scope_name = acpi_ns_get_external_pathname(ini_node);
ACPI_REPORT_WARNING(("%s._INI failed: %s\n",
scope_name,
acpi_format_exception(status)));
ACPI_WARNING((AE_INFO, "%s._INI failed: %s",
scope_name, acpi_format_exception(status)));
ACPI_MEM_FREE(scope_name);
#endif

View File

@ -92,7 +92,7 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc,
/* Check validity of the AML start and length */
if (!table_desc->aml_start) {
ACPI_REPORT_ERROR(("Null AML pointer\n"));
ACPI_ERROR((AE_INFO, "Null AML pointer"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
@ -102,7 +102,7 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc,
/* Ignore table if there is no AML contained within */
if (!table_desc->aml_length) {
ACPI_REPORT_WARNING(("Zero-length AML block in table [%4.4s]\n",
ACPI_WARNING((AE_INFO, "Zero-length AML block in table [%4.4s]",
table_desc->pointer->signature));
return_ACPI_STATUS(AE_OK);
}
@ -263,7 +263,7 @@ acpi_status acpi_ns_load_namespace(void)
/* There must be at least a DSDT installed */
if (acpi_gbl_DSDT == NULL) {
ACPI_REPORT_ERROR(("DSDT is not in memory\n"));
ACPI_ERROR((AE_INFO, "DSDT is not in memory"));
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
}

View File

@ -110,7 +110,9 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node,
name_buffer[index] = AML_ROOT_PREFIX;
if (index != 0) {
ACPI_REPORT_ERROR(("Could not construct pathname; index=%X, size=%X, Path=%s\n", (u32) index, (u32) size, &name_buffer[size]));
ACPI_ERROR((AE_INFO,
"Could not construct pathname; index=%X, size=%X, Path=%s",
(u32) index, (u32) size, &name_buffer[size]));
}
return;
@ -146,7 +148,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
name_buffer = ACPI_MEM_CALLOCATE(size);
if (!name_buffer) {
ACPI_REPORT_ERROR(("Allocation failure\n"));
ACPI_ERROR((AE_INFO, "Allocation failure"));
return_PTR(NULL);
}

View File

@ -84,21 +84,22 @@ acpi_ns_attach_object(struct acpi_namespace_node *node,
if (!node) {
/* Invalid handle */
ACPI_REPORT_ERROR(("Null named_obj handle\n"));
ACPI_ERROR((AE_INFO, "Null named_obj handle"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
if (!object && (ACPI_TYPE_ANY != type)) {
/* Null object */
ACPI_REPORT_ERROR(("Null object, but type not ACPI_TYPE_ANY\n"));
ACPI_ERROR((AE_INFO,
"Null object, but type not ACPI_TYPE_ANY"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) {
/* Not a name handle */
ACPI_REPORT_ERROR(("Invalid handle %p [%s]\n",
ACPI_ERROR((AE_INFO, "Invalid handle %p [%s]",
node, acpi_ut_get_descriptor_name(node)));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
@ -254,7 +255,7 @@ union acpi_operand_object *acpi_ns_get_attached_object(struct
ACPI_FUNCTION_TRACE_PTR("ns_get_attached_object", node);
if (!node) {
ACPI_REPORT_WARNING(("Null Node ptr\n"));
ACPI_WARNING((AE_INFO, "Null Node ptr"));
return_PTR(NULL);
}

View File

@ -298,14 +298,16 @@ acpi_ns_search_and_enter(u32 target_name,
/* Parameter validation */
if (!node || !target_name || !return_node) {
ACPI_REPORT_ERROR(("Null param: Node %p Name %X return_node %p\n", node, target_name, return_node));
ACPI_ERROR((AE_INFO,
"Null param: Node %p Name %X return_node %p",
node, target_name, return_node));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
/* Name must consist of printable characters */
if (!acpi_ut_valid_acpi_name(target_name)) {
ACPI_REPORT_ERROR(("Bad character in ACPI Name: %X\n",
ACPI_ERROR((AE_INFO, "Bad character in ACPI Name: %X",
target_name));
return_ACPI_STATUS(AE_BAD_CHARACTER);
}

View File

@ -85,7 +85,7 @@ acpi_ns_report_error(char *module_name,
if (lookup_status == AE_BAD_CHARACTER) {
/* There is a non-ascii character in the name */
acpi_os_printf("[0x%4.4X] (NON-ASCII)\n",
acpi_os_printf("[0x%4.4X] (NON-ASCII)",
*(ACPI_CAST_PTR(u32, internal_name)));
} else {
/* Convert path to external format */
@ -242,7 +242,7 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node)
ACPI_FUNCTION_TRACE("ns_get_type");
if (!node) {
ACPI_REPORT_WARNING(("Null Node parameter\n"));
ACPI_WARNING((AE_INFO, "Null Node parameter"));
return_UINT32(ACPI_TYPE_ANY);
}
@ -269,7 +269,7 @@ u32 acpi_ns_local(acpi_object_type type)
if (!acpi_ut_valid_object_type(type)) {
/* Type code out of range */
ACPI_REPORT_WARNING(("Invalid Object Type %X\n", type));
ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type));
return_UINT32(ACPI_NS_NORMAL);
}
@ -621,7 +621,7 @@ acpi_ns_externalize_name(u32 internal_name_length,
* with internal_name (invalid format).
*/
if (required_length > internal_name_length) {
ACPI_REPORT_ERROR(("Invalid internal name\n"));
ACPI_ERROR((AE_INFO, "Invalid internal name"));
return_ACPI_STATUS(AE_BAD_PATHNAME);
}
@ -797,7 +797,7 @@ u32 acpi_ns_opens_scope(acpi_object_type type)
if (!acpi_ut_valid_object_type(type)) {
/* type code out of range */
ACPI_REPORT_WARNING(("Invalid Object Type %X\n", type));
ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type));
return_UINT32(ACPI_NS_NORMAL);
}

View File

@ -112,7 +112,7 @@ acpi_evaluate_object_typed(acpi_handle handle,
if (return_buffer->length == 0) {
/* Error because caller specifically asked for a return value */
ACPI_REPORT_ERROR(("No return value\n"));
ACPI_ERROR((AE_INFO, "No return value"));
return_ACPI_STATUS(AE_NULL_OBJECT);
}
@ -124,10 +124,10 @@ acpi_evaluate_object_typed(acpi_handle handle,
/* Return object type does not match requested type */
ACPI_REPORT_ERROR(("Incorrect return type [%s] requested [%s]\n",
acpi_ut_get_type_name(((union acpi_object *)
return_buffer->pointer)->
type),
ACPI_ERROR((AE_INFO,
"Incorrect return type [%s] requested [%s]",
acpi_ut_get_type_name(((union acpi_object *)return_buffer->
pointer)->type),
acpi_ut_get_type_name(return_type)));
if (must_free) {
@ -235,9 +235,11 @@ acpi_evaluate_object(acpi_handle handle,
* qualified names above, this is an error
*/
if (!pathname) {
ACPI_REPORT_ERROR(("Both Handle and Pathname are NULL\n"));
ACPI_ERROR((AE_INFO,
"Both Handle and Pathname are NULL"));
} else {
ACPI_REPORT_ERROR(("Handle is NULL and Pathname is relative\n"));
ACPI_ERROR((AE_INFO,
"Handle is NULL and Pathname is relative"));
}
status = AE_BAD_PARAMETER;

View File

@ -300,8 +300,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer)
status = acpi_ut_execute_CID(node, &cid_list);
if (ACPI_SUCCESS(status)) {
size += ((acpi_size) cid_list->count - 1) *
sizeof(struct acpi_compatible_id);
size += cid_list->size;
info->valid |= ACPI_VALID_CID;
}

View File

@ -1062,9 +1062,9 @@ EXPORT_SYMBOL(max_cstate);
* handle is a pointer to the spinlock_t.
*/
acpi_native_uint acpi_os_acquire_lock(acpi_handle handle)
acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle)
{
unsigned long flags;
acpi_cpu_flags flags;
spin_lock_irqsave((spinlock_t *) handle, flags);
return flags;
}
@ -1073,9 +1073,9 @@ acpi_native_uint acpi_os_acquire_lock(acpi_handle handle)
* Release a spinlock. See above.
*/
void acpi_os_release_lock(acpi_handle handle, acpi_native_uint flags)
void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags)
{
spin_unlock_irqrestore((spinlock_t *) handle, (unsigned long) flags);
spin_unlock_irqrestore((spinlock_t *) handle, flags);
}
#ifndef ACPI_USE_LOCAL_CACHE

View File

@ -298,7 +298,9 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
acpi_ps_append_arg(arg, name_op);
if (!method_desc) {
ACPI_REPORT_ERROR(("Control Method %p has no attached object\n", node));
ACPI_ERROR((AE_INFO,
"Control Method %p has no attached object",
node));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
@ -348,7 +350,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
/* Final exception check (may have been changed from code above) */
if (ACPI_FAILURE(status)) {
ACPI_REPORT_NSERROR(path, status);
ACPI_ERROR_NAMESPACE(path, status);
if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) ==
ACPI_PARSE_EXECUTE) {
@ -451,7 +453,7 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state,
default:
ACPI_REPORT_ERROR(("Invalid arg_type %X\n", arg_type));
ACPI_ERROR((AE_INFO, "Invalid arg_type %X", arg_type));
return_VOID;
}
@ -709,7 +711,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
default:
ACPI_REPORT_ERROR(("Invalid arg_type: %X\n", arg_type));
ACPI_ERROR((AE_INFO, "Invalid arg_type: %X", arg_type));
status = AE_AML_OPERAND_TYPE;
break;
}

View File

@ -123,10 +123,12 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
&& ((status & AE_CODE_MASK) !=
AE_CODE_CONTROL)) {
if (status == AE_AML_NO_RETURN_VALUE) {
ACPI_REPORT_ERROR(("Invoked method did not return a value, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Invoked method did not return a value"));
}
ACPI_REPORT_ERROR(("get_predicate Failed, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"get_predicate Failed"));
return_ACPI_STATUS(status);
}
@ -184,7 +186,11 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
/* The opcode is unrecognized. Just skip unknown opcodes */
ACPI_REPORT_ERROR(("Found unknown opcode %X at AML address %p offset %X, ignoring\n", walk_state->opcode, parser_state->aml, walk_state->aml_offset));
ACPI_ERROR((AE_INFO,
"Found unknown opcode %X at AML address %p offset %X, ignoring",
walk_state->opcode,
parser_state->aml,
walk_state->aml_offset));
ACPI_DUMP_BUFFER(parser_state->aml, 128);
@ -271,7 +277,8 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
walk_state->descending_callback(walk_state,
&op);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("During name lookup/catalog, %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"During name lookup/catalog"));
goto close_this_op;
}

View File

@ -512,7 +512,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
} else if ((status != AE_OK) && (walk_state->method_desc)) {
/* Either the method parse or actual execution failed */
ACPI_REPORT_MTERROR("Method parse/execution failed",
ACPI_ERROR_METHOD("Method parse/execution failed",
walk_state->method_node, NULL,
status);
@ -558,7 +558,8 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
walk_state->method_desc->method.
thread_count--;
} else {
ACPI_REPORT_ERROR(("Invalid zero thread count in method\n"));
ACPI_ERROR((AE_INFO,
"Invalid zero thread count in method"));
}
}

View File

@ -132,7 +132,7 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg)
if (op_info->class == AML_CLASS_UNKNOWN) {
/* Invalid opcode */
ACPI_REPORT_ERROR(("Invalid AML Opcode: 0x%2.2X\n",
ACPI_ERROR((AE_INFO, "Invalid AML Opcode: 0x%2.2X",
op->common.aml_opcode));
return;
}

View File

@ -541,13 +541,13 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
for (table_index = 0; table_index < 4 && !name_found;
table_index++) {
if ((ACPI_TYPE_STRING ==
ACPI_GET_OBJECT_TYPE(*sub_object_list))
||
if (*sub_object_list && /* Null object allowed */
((ACPI_TYPE_STRING ==
ACPI_GET_OBJECT_TYPE(*sub_object_list)) ||
((ACPI_TYPE_LOCAL_REFERENCE ==
ACPI_GET_OBJECT_TYPE(*sub_object_list))
&& ((*sub_object_list)->reference.opcode ==
AML_INT_NAMEPATH_OP))) {
ACPI_GET_OBJECT_TYPE(*sub_object_list)) &&
((*sub_object_list)->reference.opcode ==
AML_INT_NAMEPATH_OP)))) {
name_found = TRUE;
} else {
/* Look at the next element */

View File

@ -207,14 +207,20 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
/* Each element of the top-level package must also be a package */
if (ACPI_GET_OBJECT_TYPE(*top_object_list) != ACPI_TYPE_PACKAGE) {
ACPI_REPORT_ERROR(("(PRT[%X]) Need sub-package, found %s\n", index, acpi_ut_get_object_type_name(*top_object_list)));
ACPI_ERROR((AE_INFO,
"(PRT[%X]) Need sub-package, found %s",
index,
acpi_ut_get_object_type_name
(*top_object_list)));
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
/* Each sub-package must be of length 4 */
if ((*top_object_list)->package.count != 4) {
ACPI_REPORT_ERROR(("(PRT[%X]) Need package of length 4, found length %d\n", index, (*top_object_list)->package.count));
ACPI_ERROR((AE_INFO,
"(PRT[%X]) Need package of length 4, found length %d",
index, (*top_object_list)->package.count));
return_ACPI_STATUS(AE_AML_PACKAGE_LIMIT);
}
@ -231,7 +237,10 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
user_prt->address = obj_desc->integer.value;
} else {
ACPI_REPORT_ERROR(("(PRT[%X].Address) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc)));
ACPI_ERROR((AE_INFO,
"(PRT[%X].Address) Need Integer, found %s",
index,
acpi_ut_get_object_type_name(obj_desc)));
return_ACPI_STATUS(AE_BAD_DATA);
}
@ -241,18 +250,29 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
user_prt->pin = (u32) obj_desc->integer.value;
} else {
ACPI_REPORT_ERROR(("(PRT[%X].Pin) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc)));
ACPI_ERROR((AE_INFO,
"(PRT[%X].Pin) Need Integer, found %s",
index,
acpi_ut_get_object_type_name(obj_desc)));
return_ACPI_STATUS(AE_BAD_DATA);
}
/* 3) Third subobject: Dereference the PRT.source_name */
/*
* 3) Third subobject: Dereference the PRT.source_name
* The name may be unresolved (slack mode), so allow a null object
*/
obj_desc = sub_object_list[2];
if (obj_desc) {
switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
case ACPI_TYPE_LOCAL_REFERENCE:
if (obj_desc->reference.opcode != AML_INT_NAMEPATH_OP) {
ACPI_REPORT_ERROR(("(PRT[%X].Source) Need name, found reference op %X\n", index, obj_desc->reference.opcode));
if (obj_desc->reference.opcode !=
AML_INT_NAMEPATH_OP) {
ACPI_ERROR((AE_INFO,
"(PRT[%X].Source) Need name, found reference op %X",
index,
obj_desc->reference.
opcode));
return_ACPI_STATUS(AE_BAD_DATA);
}
@ -266,7 +286,8 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
path_buffer.pointer = user_prt->source;
status =
acpi_ns_handle_to_pathname((acpi_handle) node,
acpi_ns_handle_to_pathname((acpi_handle)
node,
&path_buffer);
/* +1 to include null terminator */
@ -277,7 +298,8 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
case ACPI_TYPE_STRING:
ACPI_STRCPY(user_prt->source, obj_desc->string.pointer);
ACPI_STRCPY(user_prt->source,
obj_desc->string.pointer);
/*
* Add to the Length field the length of the string
@ -298,9 +320,14 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
default:
ACPI_REPORT_ERROR(("(PRT[%X].Source) Need Ref/String/Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc)));
ACPI_ERROR((AE_INFO,
"(PRT[%X].Source) Need Ref/String/Integer, found %s",
index,
acpi_ut_get_object_type_name
(obj_desc)));
return_ACPI_STATUS(AE_BAD_DATA);
}
}
/* Now align the current length */
@ -313,7 +340,10 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
user_prt->source_index = (u32) obj_desc->integer.value;
} else {
ACPI_REPORT_ERROR(("(PRT[%X].source_index) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc)));
ACPI_ERROR((AE_INFO,
"(PRT[%X].source_index) Need Integer, found %s",
index,
acpi_ut_get_object_type_name(obj_desc)));
return_ACPI_STATUS(AE_BAD_DATA);
}

View File

@ -692,7 +692,11 @@ void acpi_rs_dump_irq_list(u8 * route_table)
static void acpi_rs_out_string(char *title, char *value)
{
acpi_os_printf("%27s : %s\n", title, value);
acpi_os_printf("%27s : %s", title, value);
if (!*value) {
acpi_os_printf("[NULL NAMESTRING]");
}
acpi_os_printf("\n");
}
static void acpi_rs_out_integer8(char *title, u8 value)

View File

@ -94,7 +94,9 @@ acpi_rs_convert_aml_to_resources(u8 * aml, u32 aml_length, u8 * output_buffer)
acpi_gbl_get_resource_dispatch
[resource_index]);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not convert AML resource (Type %X) to resource, %s\n", *aml, acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not convert AML resource (Type %X)",
*aml));
return_ACPI_STATUS(status);
}
@ -156,7 +158,9 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
/* Validate the (internal) Resource Type */
if (resource->type > ACPI_RESOURCE_TYPE_MAX) {
ACPI_REPORT_ERROR(("Invalid descriptor type (%X) in resource list\n", resource->type));
ACPI_ERROR((AE_INFO,
"Invalid descriptor type (%X) in resource list",
resource->type));
return_ACPI_STATUS(AE_BAD_DATA);
}
@ -169,7 +173,9 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
acpi_gbl_set_resource_dispatch
[resource->type]);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not convert resource (type %X) to AML, %s\n", resource->type, acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not convert resource (type %X) to AML",
resource->type));
return_ACPI_STATUS(status);
}

View File

@ -84,9 +84,11 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
ACPI_FUNCTION_TRACE("rs_get_resource");
if (((acpi_native_uint) resource) & 0x3) {
acpi_os_printf
("**** GET: Misaligned resource pointer: %p Type %2.2X Len %X\n",
resource, resource->type, resource->length);
/* Each internal resource struct is expected to be 32-bit aligned */
ACPI_WARNING((AE_INFO,
"Misaligned resource pointer (get): %p Type %2.2X Len %X",
resource, resource->type, resource->length));
}
/* Extract the resource Length field (does not include header length) */
@ -274,15 +276,16 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
break;
default:
acpi_os_printf
("*** Invalid conversion sub-opcode\n");
ACPI_ERROR((AE_INFO,
"Invalid conversion sub-opcode"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
break;
default:
acpi_os_printf("*** Invalid conversion opcode\n");
ACPI_ERROR((AE_INFO, "Invalid conversion opcode"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
@ -486,15 +489,16 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
break;
default:
acpi_os_printf
("*** Invalid conversion sub-opcode\n");
ACPI_ERROR((AE_INFO,
"Invalid conversion sub-opcode"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
break;
default:
acpi_os_printf("*** Invalid conversion opcode\n");
ACPI_ERROR((AE_INFO, "Invalid conversion opcode"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
@ -523,7 +527,9 @@ if (((aml->irq.flags & 0x09) == 0x00) || ((aml->irq.flags & 0x09) == 0x09)) {
* polarity/trigger interrupts are allowed (ACPI spec, section
* "IRQ Format"), so 0x00 and 0x09 are illegal.
*/
ACPI_REPORT_ERROR(("Invalid interrupt polarity/trigger in resource list, %X\n", aml->irq.flags));
ACPI_ERROR((AE_INFO,
"Invalid interrupt polarity/trigger in resource list, %X",
aml->irq.flags));
return_ACPI_STATUS(AE_BAD_DATA);
}
@ -535,7 +541,7 @@ if (temp8 < 1) {
}
if (resource->data.dma.transfer == 0x03) {
ACPI_REPORT_ERROR(("Invalid DMA.Transfer preference (3)\n"));
ACPI_ERROR((AE_INFO, "Invalid DMA.Transfer preference (3)"));
return_ACPI_STATUS(AE_BAD_DATA);
}
#endif

View File

@ -501,7 +501,7 @@ acpi_status acpi_tb_convert_table_fadt(void)
* at least as long as the version 1.0 FADT
*/
if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev1)) {
ACPI_REPORT_ERROR(("FADT is invalid, too short: 0x%X\n",
ACPI_ERROR((AE_INFO, "FADT is invalid, too short: 0x%X",
acpi_gbl_FADT->length));
return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
}
@ -517,7 +517,10 @@ acpi_status acpi_tb_convert_table_fadt(void)
if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) {
/* Length is too short to be a V2.0 table */
ACPI_REPORT_WARNING(("Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table\n", acpi_gbl_FADT->length, acpi_gbl_FADT->revision));
ACPI_WARNING((AE_INFO,
"Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table",
acpi_gbl_FADT->length,
acpi_gbl_FADT->revision));
acpi_tb_convert_fadt1(local_fadt,
(void *)acpi_gbl_FADT);
@ -582,13 +585,15 @@ acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info)
/* Absolute minimum length is 24, but the ACPI spec says 64 */
if (acpi_gbl_FACS->length < 24) {
ACPI_REPORT_ERROR(("Invalid FACS table length: 0x%X\n",
ACPI_ERROR((AE_INFO, "Invalid FACS table length: 0x%X",
acpi_gbl_FACS->length));
return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
}
if (acpi_gbl_FACS->length < 64) {
ACPI_REPORT_WARNING(("FACS is shorter than the ACPI specification allows: 0x%X, using anyway\n", acpi_gbl_FACS->length));
ACPI_WARNING((AE_INFO,
"FACS is shorter than the ACPI specification allows: 0x%X, using anyway",
acpi_gbl_FACS->length));
}
/* Copy fields to the new FACS */

View File

@ -91,9 +91,9 @@ acpi_tb_get_table(struct acpi_pointer *address,
status = acpi_tb_get_table_body(address, &header, table_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not get ACPI table (size %X), %s\n",
header.length,
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not get ACPI table (size %X)",
header.length));
return_ACPI_STATUS(status);
}
@ -148,7 +148,6 @@ acpi_tb_get_table_header(struct acpi_pointer *address,
sizeof(struct acpi_table_header),
(void *)&header);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not map memory at %8.8X%8.8X for length %X\n", ACPI_FORMAT_UINT64(address->pointer.physical), sizeof(struct acpi_table_header)));
return_ACPI_STATUS(status);
}
@ -161,7 +160,7 @@ acpi_tb_get_table_header(struct acpi_pointer *address,
default:
ACPI_REPORT_ERROR(("Invalid address flags %X\n",
ACPI_ERROR((AE_INFO, "Invalid address flags %X",
address->pointer_type));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
@ -253,8 +252,8 @@ acpi_tb_table_override(struct acpi_table_header *header,
if (ACPI_FAILURE(status)) {
/* Some severe error from the OSL, but we basically ignore it */
ACPI_REPORT_ERROR(("Could not override ACPI table, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not override ACPI table"));
return_ACPI_STATUS(status);
}
@ -273,14 +272,13 @@ acpi_tb_table_override(struct acpi_table_header *header,
status = acpi_tb_get_this_table(&address, new_table, table_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not copy override ACPI table, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "Could not copy ACPI table"));
return_ACPI_STATUS(status);
}
/* Copy the table info */
ACPI_REPORT_INFO(("Table [%4.4s] replaced by host OS\n",
ACPI_INFO((AE_INFO, "Table [%4.4s] replaced by host OS",
table_info->pointer->signature));
return_ACPI_STATUS(AE_OK);
@ -327,7 +325,9 @@ acpi_tb_get_this_table(struct acpi_pointer *address,
full_table = ACPI_MEM_ALLOCATE(header->length);
if (!full_table) {
ACPI_REPORT_ERROR(("Could not allocate table memory for [%4.4s] length %X\n", header->signature, header->length));
ACPI_ERROR((AE_INFO,
"Could not allocate table memory for [%4.4s] length %X",
header->signature, header->length));
return_ACPI_STATUS(AE_NO_MEMORY);
}
@ -351,7 +351,12 @@ acpi_tb_get_this_table(struct acpi_pointer *address,
(acpi_size) header->length,
(void *)&full_table);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n", header->signature, ACPI_FORMAT_UINT64(address->pointer.physical), header->length));
ACPI_ERROR((AE_INFO,
"Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X",
header->signature,
ACPI_FORMAT_UINT64(address->pointer.
physical),
header->length));
return (status);
}
@ -362,7 +367,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address,
default:
ACPI_REPORT_ERROR(("Invalid address flags %X\n",
ACPI_ERROR((AE_INFO, "Invalid address flags %X",
address->pointer_type));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}

View File

@ -152,7 +152,9 @@ acpi_tb_get_secondary_table(struct acpi_pointer *address,
/* Signature must match request */
if (ACPI_STRNCMP(header.signature, signature, ACPI_NAME_SIZE)) {
ACPI_REPORT_ERROR(("Incorrect table signature - wanted [%s] found [%4.4s]\n", signature, header.signature));
ACPI_ERROR((AE_INFO,
"Incorrect table signature - wanted [%s] found [%4.4s]",
signature, header.signature));
return_ACPI_STATUS(AE_BAD_SIGNATURE);
}
@ -231,14 +233,18 @@ acpi_status acpi_tb_get_required_tables(void)
*/
status = acpi_tb_get_primary_table(&address, &table_info);
if ((status != AE_OK) && (status != AE_TABLE_NOT_SUPPORTED)) {
ACPI_REPORT_WARNING(("%s, while getting table at %8.8X%8.8X\n", acpi_format_exception(status), ACPI_FORMAT_UINT64(address.pointer.value)));
ACPI_WARNING((AE_INFO,
"%s, while getting table at %8.8X%8.8X",
acpi_format_exception(status),
ACPI_FORMAT_UINT64(address.pointer.
value)));
}
}
/* We must have a FADT to continue */
if (!acpi_gbl_FADT) {
ACPI_REPORT_ERROR(("No FADT present in RSDT/XSDT\n"));
ACPI_ERROR((AE_INFO, "No FADT present in RSDT/XSDT"));
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
}
@ -248,7 +254,8 @@ acpi_status acpi_tb_get_required_tables(void)
*/
status = acpi_tb_convert_table_fadt();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not convert FADT to internal common format\n"));
ACPI_ERROR((AE_INFO,
"Could not convert FADT to internal common format"));
return_ACPI_STATUS(status);
}
@ -258,8 +265,8 @@ acpi_status acpi_tb_get_required_tables(void)
status = acpi_tb_get_secondary_table(&address, FACS_SIG, &table_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not get/install the FACS, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not get/install the FACS"));
return_ACPI_STATUS(status);
}
@ -278,7 +285,7 @@ acpi_status acpi_tb_get_required_tables(void)
status = acpi_tb_get_secondary_table(&address, DSDT_SIG, &table_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not get/install the DSDT\n"));
ACPI_ERROR((AE_INFO, "Could not get/install the DSDT"));
return_ACPI_STATUS(status);
}

View File

@ -128,8 +128,8 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info)
status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not acquire table mutex, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not acquire table mutex"));
return_ACPI_STATUS(status);
}
@ -146,9 +146,9 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info)
status = acpi_tb_init_table_descriptor(table_info->type, table_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not install table [%4.4s], %s\n",
table_info->pointer->signature,
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not install table [%4.4s]",
table_info->pointer->signature));
}
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s located at %p\n",

View File

@ -192,16 +192,21 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr)
if (no_match) {
/* Invalid RSDT or XSDT signature */
ACPI_REPORT_ERROR(("Invalid signature where RSDP indicates RSDT/XSDT should be located. RSDP:\n"));
ACPI_ERROR((AE_INFO,
"Invalid signature where RSDP indicates RSDT/XSDT should be located. RSDP:"));
ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20);
ACPI_REPORT_ERROR(("RSDT/XSDT signature at %X (%p) is invalid\n", acpi_gbl_RSDP->rsdt_physical_address, (void *)(acpi_native_uint) acpi_gbl_RSDP->rsdt_physical_address));
ACPI_ERROR((AE_INFO,
"RSDT/XSDT signature at %X (%p) is invalid",
acpi_gbl_RSDP->rsdt_physical_address,
(void *)(acpi_native_uint) acpi_gbl_RSDP->
rsdt_physical_address));
if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
ACPI_REPORT_ERROR(("Looking for RSDT\n"))
ACPI_ERROR((AE_INFO, "Looking for RSDT"));
} else {
ACPI_REPORT_ERROR(("Looking for XSDT\n"))
ACPI_ERROR((AE_INFO, "Looking for XSDT"));
}
ACPI_DUMP_BUFFER((char *)table_ptr, 48);
@ -238,9 +243,8 @@ acpi_status acpi_tb_get_table_rsdt(void)
table_info.type = ACPI_TABLE_XSDT;
status = acpi_tb_get_table(&address, &table_info);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not get the RSDT/XSDT, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not get the RSDT/XSDT"));
return_ACPI_STATUS(status);
}

View File

@ -149,8 +149,8 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
/* Verify that this is a valid address */
if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) {
ACPI_REPORT_ERROR(("Cannot read table header at %p\n",
table_header));
ACPI_ERROR((AE_INFO,
"Cannot read table header at %p", table_header));
return (AE_BAD_ADDRESS);
}
@ -159,9 +159,11 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
ACPI_MOVE_32_TO_32(&signature, table_header->signature);
if (!acpi_ut_valid_acpi_name(signature)) {
ACPI_REPORT_ERROR(("Table signature at %p [%p] has invalid characters\n", table_header, &signature));
ACPI_ERROR((AE_INFO,
"Table signature at %p [%p] has invalid characters",
table_header, &signature));
ACPI_REPORT_WARNING(("Invalid table signature found: [%4.4s]\n",
ACPI_WARNING((AE_INFO, "Invalid table signature found: [%4.4s]",
ACPI_CAST_PTR(char, &signature)));
ACPI_DUMP_BUFFER(table_header,
@ -172,9 +174,13 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
/* Validate the table length */
if (table_header->length < sizeof(struct acpi_table_header)) {
ACPI_REPORT_ERROR(("Invalid length in table header %p name %4.4s\n", table_header, (char *)&signature));
ACPI_ERROR((AE_INFO,
"Invalid length in table header %p name %4.4s",
table_header, (char *)&signature));
ACPI_REPORT_WARNING(("Invalid table header length (0x%X) found\n", (u32) table_header->length));
ACPI_WARNING((AE_INFO,
"Invalid table header length (0x%X) found",
(u32) table_header->length));
ACPI_DUMP_BUFFER(table_header,
sizeof(struct acpi_table_header));
@ -213,7 +219,10 @@ acpi_tb_verify_table_checksum(struct acpi_table_header * table_header)
/* Return the appropriate exception */
if (checksum) {
ACPI_REPORT_WARNING(("Invalid checksum in table [%4.4s] (%02X, sum %02X is not zero)\n", table_header->signature, (u32) table_header->checksum, (u32) checksum));
ACPI_WARNING((AE_INFO,
"Invalid checksum in table [%4.4s] (%02X, sum %02X is not zero)",
table_header->signature,
(u32) table_header->checksum, (u32) checksum));
status = AE_BAD_CHECKSUM;
}
@ -286,7 +295,7 @@ acpi_tb_handle_to_object(u16 table_id,
}
}
ACPI_REPORT_ERROR(("table_id=%X does not exist\n", table_id));
ACPI_ERROR((AE_INFO, "table_id=%X does not exist", table_id));
return (AE_BAD_PARAMETER);
}
#endif

View File

@ -75,8 +75,7 @@ acpi_status acpi_load_tables(void)
status = acpi_os_get_root_pointer(ACPI_LOGICAL_ADDRESSING,
&rsdp_address);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not get RSDP, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "Could not get the RSDP"));
goto error_exit;
}
@ -86,8 +85,7 @@ acpi_status acpi_load_tables(void)
status = acpi_tb_verify_rsdp(&rsdp_address);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("RSDP Failed validation: %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During RSDP validation"));
goto error_exit;
}
@ -95,8 +93,7 @@ acpi_status acpi_load_tables(void)
status = acpi_tb_get_table_rsdt();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not load RSDT: %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "Could not load RSDT"));
goto error_exit;
}
@ -104,7 +101,8 @@ acpi_status acpi_load_tables(void)
status = acpi_tb_get_required_tables();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not get all required tables (DSDT/FADT/FACS): %s\n", acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not get all required tables (DSDT/FADT/FACS)"));
goto error_exit;
}
@ -114,17 +112,14 @@ acpi_status acpi_load_tables(void)
status = acpi_ns_load_namespace();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not load namespace: %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "Could not load namespace"));
goto error_exit;
}
return_ACPI_STATUS(AE_OK);
error_exit:
ACPI_REPORT_ERROR(("Could not load tables: %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "Could not load tables"));
return_ACPI_STATUS(status);
}

View File

@ -396,8 +396,8 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address)
status = acpi_tb_find_rsdp(&table_info, flags);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("RSDP structure not found, %s Flags=%X\n",
acpi_format_exception(status), flags));
ACPI_EXCEPTION((AE_INFO, status,
"RSDP structure not found - Flags=%X", flags));
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
}
@ -502,7 +502,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
ACPI_EBDA_PTR_LENGTH,
(void *)&table_ptr);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not map memory at %8.8X for length %X\n", ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
ACPI_ERROR((AE_INFO,
"Could not map memory at %8.8X for length %X",
ACPI_EBDA_PTR_LOCATION,
ACPI_EBDA_PTR_LENGTH));
return_ACPI_STATUS(status);
}
@ -526,7 +529,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
ACPI_EBDA_WINDOW_SIZE,
(void *)&table_ptr);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not map memory at %8.8X for length %X\n", physical_address, ACPI_EBDA_WINDOW_SIZE));
ACPI_ERROR((AE_INFO,
"Could not map memory at %8.8X for length %X",
physical_address,
ACPI_EBDA_WINDOW_SIZE));
return_ACPI_STATUS(status);
}
@ -556,7 +562,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
(void *)&table_ptr);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not map memory at %8.8X for length %X\n", ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
ACPI_ERROR((AE_INFO,
"Could not map memory at %8.8X for length %X",
ACPI_HI_RSDP_WINDOW_BASE,
ACPI_HI_RSDP_WINDOW_SIZE));
return_ACPI_STATUS(status);
}
@ -625,7 +634,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags)
/* A valid RSDP was not found */
ACPI_REPORT_ERROR(("No valid RSDP was found\n"));
ACPI_ERROR((AE_INFO, "No valid RSDP was found"));
return_ACPI_STATUS(AE_NOT_FOUND);
}

View File

@ -301,8 +301,8 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line)
/* Check for an inadvertent size of zero bytes */
if (!size) {
_ACPI_REPORT_ERROR(module, line,
("ut_allocate: Attempt to allocate zero bytes, allocating 1 byte\n"));
ACPI_ERROR((module, line,
"ut_allocate: Attempt to allocate zero bytes, allocating 1 byte"));
size = 1;
}
@ -310,8 +310,8 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line)
if (!allocation) {
/* Report allocation error */
_ACPI_REPORT_ERROR(module, line,
("ut_allocate: Could not allocate size %X\n",
ACPI_ERROR((module, line,
"ut_allocate: Could not allocate size %X",
(u32) size));
return_PTR(NULL);
@ -344,8 +344,8 @@ void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line)
/* Check for an inadvertent size of zero bytes */
if (!size) {
_ACPI_REPORT_ERROR(module, line,
("ut_callocate: Attempt to allocate zero bytes, allocating 1 byte\n"));
ACPI_ERROR((module, line,
"Attempt to allocate zero bytes, allocating 1 byte"));
size = 1;
}
@ -353,9 +353,8 @@ void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line)
if (!allocation) {
/* Report allocation error */
_ACPI_REPORT_ERROR(module, line,
("ut_callocate: Could not allocate size %X\n",
(u32) size));
ACPI_ERROR((module, line,
"Could not allocate size %X", (u32) size));
return_PTR(NULL);
}
@ -480,9 +479,8 @@ void *acpi_ut_callocate_and_track(acpi_size size,
if (!allocation) {
/* Report allocation error */
_ACPI_REPORT_ERROR(module, line,
("ut_callocate: Could not allocate size %X\n",
(u32) size));
ACPI_ERROR((module, line,
"Could not allocate size %X", (u32) size));
return (NULL);
}
@ -524,8 +522,7 @@ acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line)
ACPI_FUNCTION_TRACE_PTR("ut_free", allocation);
if (NULL == allocation) {
_ACPI_REPORT_ERROR(module, line,
("acpi_ut_free: Attempt to delete a NULL address\n"));
ACPI_ERROR((module, line, "Attempt to delete a NULL address"));
return_VOID;
}
@ -540,14 +537,11 @@ acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line)
status = acpi_ut_remove_allocation(debug_block,
component, module, line);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not free memory, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "Could not free memory"));
}
acpi_os_free(debug_block);
ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p freed\n", allocation));
return_VOID;
}
@ -624,9 +618,11 @@ acpi_ut_track_allocation(struct acpi_debug_mem_block *allocation,
*/
element = acpi_ut_find_allocation(allocation);
if (element) {
ACPI_REPORT_ERROR(("ut_track_allocation: Allocation already present in list! (%p)\n", allocation));
ACPI_ERROR((AE_INFO,
"ut_track_allocation: Allocation already present in list! (%p)",
allocation));
ACPI_REPORT_ERROR(("Element %p Address %p\n",
ACPI_ERROR((AE_INFO, "Element %p Address %p",
element, allocation));
goto unlock_and_exit;
@ -687,8 +683,8 @@ acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation,
if (NULL == mem_list->list_head) {
/* No allocations! */
_ACPI_REPORT_ERROR(module, line,
("ut_remove_allocation: Empty allocation list, nothing to free!\n"));
ACPI_ERROR((module, line,
"Empty allocation list, nothing to free!"));
return_ACPI_STATUS(AE_OK);
}
@ -863,9 +859,10 @@ void acpi_ut_dump_allocations(u32 component, char *module)
/* Print summary */
if (!num_outstanding) {
ACPI_REPORT_INFO(("No outstanding allocations\n"));
ACPI_INFO((AE_INFO, "No outstanding allocations"));
} else {
ACPI_REPORT_ERROR(("%d(%X) Outstanding allocations\n",
ACPI_ERROR((AE_INFO,
"%d(%X) Outstanding allocations",
num_outstanding, num_outstanding));
}

View File

@ -606,7 +606,8 @@ acpi_ut_copy_eobject_to_iobject(union acpi_object *external_object,
/*
* Packages as external input to control methods are not supported,
*/
ACPI_REPORT_ERROR(("Packages as parameters not implemented!\n"));
ACPI_ERROR((AE_INFO,
"Packages as parameters not implemented!"));
return_ACPI_STATUS(AE_NOT_IMPLEMENTED);
}
@ -869,7 +870,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,
count +
1) * sizeof(void *));
if (!dest_obj->package.elements) {
ACPI_REPORT_ERROR(("Package allocation failure\n"));
ACPI_ERROR((AE_INFO, "Package allocation failure"));
return_ACPI_STATUS(AE_NO_MEMORY);
}

View File

@ -363,7 +363,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
default:
ACPI_REPORT_ERROR(("Unknown action (%X)\n", action));
ACPI_ERROR((AE_INFO, "Unknown action (%X)", action));
break;
}
@ -373,7 +373,9 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
*/
if (count > ACPI_MAX_REFERENCE_COUNT) {
ACPI_REPORT_WARNING(("Large Reference Count (%X) in object %p\n\n", count, object));
ACPI_WARNING((AE_INFO,
"Large Reference Count (%X) in object %p",
count, object));
}
return;
@ -532,8 +534,8 @@ acpi_ut_update_object_reference(union acpi_operand_object * object, u16 action)
error_exit:
ACPI_REPORT_ERROR(("Could not update object reference count, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Could not update object reference count"));
return_ACPI_STATUS(status);
}

View File

@ -154,7 +154,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
acpi_ut_get_node_name(prefix_node),
path));
} else {
ACPI_REPORT_MTERROR("Method execution failed",
ACPI_ERROR_METHOD("Method execution failed",
prefix_node, path, status);
}
@ -165,7 +165,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
if (!info.return_object) {
if (expected_return_btypes) {
ACPI_REPORT_MTERROR("No object was returned from",
ACPI_ERROR_METHOD("No object was returned from",
prefix_node, path, AE_NOT_EXIST);
return_ACPI_STATUS(AE_NOT_EXIST);
@ -211,10 +211,14 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
/* Is the return object one of the expected types? */
if (!(expected_return_btypes & return_btype)) {
ACPI_REPORT_MTERROR("Return object type is incorrect",
ACPI_ERROR_METHOD("Return object type is incorrect",
prefix_node, path, AE_TYPE);
ACPI_REPORT_ERROR(("Type returned from %s was incorrect: %s, expected Btypes: %X\n", path, acpi_ut_get_object_type_name(info.return_object), expected_return_btypes));
ACPI_ERROR((AE_INFO,
"Type returned from %s was incorrect: %s, expected Btypes: %X",
path,
acpi_ut_get_object_type_name(info.return_object),
expected_return_btypes));
/* On error exit, we must delete the return object */

View File

@ -121,8 +121,8 @@ const char *acpi_format_exception(acpi_status status)
if (!exception) {
/* Exception code was not recognized */
ACPI_REPORT_ERROR(("Unknown exception code: 0x%8.8X\n",
status));
ACPI_ERROR((AE_INFO,
"Unknown exception code: 0x%8.8X", status));
exception = "UNKNOWN_STATUS_CODE";
}

View File

@ -72,9 +72,9 @@ static void
acpi_ut_fadt_register_error(char *register_name, u32 value, acpi_size offset)
{
ACPI_REPORT_WARNING(("Invalid FADT value %s=%X at offset %X FADT=%p\n",
register_name, value, (u32) offset,
acpi_gbl_FADT));
ACPI_WARNING((AE_INFO,
"Invalid FADT value %s=%X at offset %X FADT=%p",
register_name, value, (u32) offset, acpi_gbl_FADT));
}
/******************************************************************************
@ -221,7 +221,7 @@ void acpi_ut_subsystem_shutdown(void)
/* Just exit if subsystem is already shutdown */
if (acpi_gbl_shutdown) {
ACPI_REPORT_ERROR(("ACPI Subsystem is already terminated\n"));
ACPI_ERROR((AE_INFO, "ACPI Subsystem is already terminated"));
return_VOID;
}

View File

@ -82,7 +82,7 @@ acpi_ut_short_divide(acpi_integer dividend,
/* Always check for a zero divisor */
if (divisor == 0) {
ACPI_REPORT_ERROR(("Divide by zero\n"));
ACPI_ERROR((AE_INFO, "Divide by zero"));
return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO);
}
@ -144,7 +144,7 @@ acpi_ut_divide(acpi_integer in_dividend,
/* Always check for a zero divisor */
if (in_divisor == 0) {
ACPI_REPORT_ERROR(("Divide by zero\n"));
ACPI_ERROR((AE_INFO, "Divide by zero"));
return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO);
}
@ -266,7 +266,7 @@ acpi_ut_short_divide(acpi_integer in_dividend,
/* Always check for a zero divisor */
if (divisor == 0) {
ACPI_REPORT_ERROR(("Divide by zero\n"));
ACPI_ERROR((AE_INFO, "Divide by zero"));
return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO);
}
@ -292,7 +292,7 @@ acpi_ut_divide(acpi_integer in_dividend,
/* Always check for a zero divisor */
if (in_divisor == 0) {
ACPI_REPORT_ERROR(("Divide by zero\n"));
ACPI_ERROR((AE_INFO, "Divide by zero"));
return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO);
}

View File

@ -72,7 +72,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
/* Guard against multiple allocations of ID to the same location */
if (*owner_id) {
ACPI_REPORT_ERROR(("Owner ID [%2.2X] already exists\n",
ACPI_ERROR((AE_INFO, "Owner ID [%2.2X] already exists",
*owner_id));
return_ACPI_STATUS(AE_ALREADY_EXISTS);
}
@ -143,7 +143,8 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
* methods, or there may be a bug where the IDs are not released.
*/
status = AE_OWNER_ID_LIMIT;
ACPI_REPORT_ERROR(("Could not allocate new owner_id (255 max), AE_OWNER_ID_LIMIT\n"));
ACPI_ERROR((AE_INFO,
"Could not allocate new owner_id (255 max), AE_OWNER_ID_LIMIT"));
exit:
(void)acpi_ut_release_mutex(ACPI_MTX_CACHES);
@ -180,7 +181,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr)
/* Zero is not a valid owner_iD */
if (owner_id == 0) {
ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id));
ACPI_ERROR((AE_INFO, "Invalid owner_id: %2.2X", owner_id));
return_VOID;
}
@ -205,7 +206,8 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr)
if (acpi_gbl_owner_id_mask[index] & bit) {
acpi_gbl_owner_id_mask[index] ^= bit;
} else {
ACPI_REPORT_ERROR(("Release of non-allocated owner_id: %2.2X\n",
ACPI_ERROR((AE_INFO,
"Release of non-allocated owner_id: %2.2X",
owner_id + 1));
}
@ -837,7 +839,71 @@ u8 acpi_ut_generate_checksum(u8 * buffer, u32 length)
/*******************************************************************************
*
* FUNCTION: acpi_ut_report_error
* FUNCTION: acpi_ut_error, acpi_ut_warning, acpi_ut_info
*
* PARAMETERS: module_name - Caller's module name (for error output)
* line_number - Caller's line number (for error output)
* Format - Printf format string + additional args
*
* RETURN: None
*
* DESCRIPTION: Print message with module/line/version info
*
******************************************************************************/
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_error(char *module_name, u32 line_number, char *format, ...)
{
va_list args;
acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number);
va_start(args, format);
acpi_os_vprintf(format, args);
acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
}
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_exception(char *module_name,
u32 line_number, acpi_status status, char *format, ...)
{
va_list args;
acpi_os_printf("ACPI Exception (%s-%04d): %s, ", module_name,
line_number, acpi_format_exception(status));
va_start(args, format);
acpi_os_vprintf(format, args);
acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
}
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_warning(char *module_name, u32 line_number, char *format, ...)
{
va_list args;
acpi_os_printf("ACPI Warning (%s-%04d): ", module_name, line_number);
va_start(args, format);
acpi_os_vprintf(format, args);
acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
}
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_info(char *module_name, u32 line_number, char *format, ...)
{
va_list args;
acpi_os_printf("ACPI (%s-%04d): ", module_name, line_number);
va_start(args, format);
acpi_os_vprintf(format, args);
acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_report_error, Warning, Info
*
* PARAMETERS: module_name - Caller's module name (for error output)
* line_number - Caller's line number (for error output)
@ -846,6 +912,8 @@ u8 acpi_ut_generate_checksum(u8 * buffer, u32 length)
*
* DESCRIPTION: Print error message
*
* Note: Legacy only, should be removed when no longer used by drivers.
*
******************************************************************************/
void acpi_ut_report_error(char *module_name, u32 line_number)
@ -854,38 +922,12 @@ void acpi_ut_report_error(char *module_name, u32 line_number)
acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_report_warning
*
* PARAMETERS: module_name - Caller's module name (for error output)
* line_number - Caller's line number (for error output)
*
* RETURN: None
*
* DESCRIPTION: Print warning message
*
******************************************************************************/
void acpi_ut_report_warning(char *module_name, u32 line_number)
{
acpi_os_printf("ACPI Warning (%s-%04d): ", module_name, line_number);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_report_info
*
* PARAMETERS: module_name - Caller's module name (for error output)
* line_number - Caller's line number (for error output)
*
* RETURN: None
*
* DESCRIPTION: Print information message
*
******************************************************************************/
void acpi_ut_report_info(char *module_name, u32 line_number)
{

View File

@ -216,12 +216,20 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
for (i = mutex_id; i < MAX_MUTEX; i++) {
if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {
if (i == mutex_id) {
ACPI_REPORT_ERROR(("Mutex [%s] already acquired by this thread [%X]\n", acpi_ut_get_mutex_name(mutex_id), this_thread_id));
ACPI_ERROR((AE_INFO,
"Mutex [%s] already acquired by this thread [%X]",
acpi_ut_get_mutex_name
(mutex_id),
this_thread_id));
return (AE_ALREADY_ACQUIRED);
}
ACPI_REPORT_ERROR(("Invalid acquire order: Thread %X owns [%s], wants [%s]\n", this_thread_id, acpi_ut_get_mutex_name(i), acpi_ut_get_mutex_name(mutex_id)));
ACPI_ERROR((AE_INFO,
"Invalid acquire order: Thread %X owns [%s], wants [%s]",
this_thread_id,
acpi_ut_get_mutex_name(i),
acpi_ut_get_mutex_name(mutex_id)));
return (AE_ACQUIRE_DEADLOCK);
}
@ -244,7 +252,9 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
acpi_gbl_mutex_info[mutex_id].use_count++;
acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id;
} else {
ACPI_REPORT_ERROR(("Thread %X could not acquire Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Thread %X could not acquire Mutex [%X]",
this_thread_id, mutex_id));
}
return (status);
@ -282,7 +292,9 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
* Mutex must be acquired in order to release it!
*/
if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) {
ACPI_REPORT_ERROR(("Mutex [%X] is not acquired, cannot release\n", mutex_id));
ACPI_ERROR((AE_INFO,
"Mutex [%X] is not acquired, cannot release",
mutex_id));
return (AE_NOT_ACQUIRED);
}
@ -303,7 +315,10 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
continue;
}
ACPI_REPORT_ERROR(("Invalid release order: owns [%s], releasing [%s]\n", acpi_ut_get_mutex_name(i), acpi_ut_get_mutex_name(mutex_id)));
ACPI_ERROR((AE_INFO,
"Invalid release order: owns [%s], releasing [%s]",
acpi_ut_get_mutex_name(i),
acpi_ut_get_mutex_name(mutex_id)));
return (AE_RELEASE_DEADLOCK);
}
@ -319,7 +334,9 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Thread %X could not release Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"Thread %X could not release Mutex [%X]",
this_thread_id, mutex_id));
} else {
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
"Thread %X released Mutex [%s]\n",

View File

@ -177,7 +177,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size)
buffer = ACPI_MEM_CALLOCATE(buffer_size);
if (!buffer) {
ACPI_REPORT_ERROR(("Could not allocate size %X\n",
ACPI_ERROR((AE_INFO, "Could not allocate size %X",
(u32) buffer_size));
acpi_ut_remove_reference(buffer_desc);
return_PTR(NULL);
@ -229,7 +229,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)
*/
string = ACPI_MEM_CALLOCATE(string_size + 1);
if (!string) {
ACPI_REPORT_ERROR(("Could not allocate size %X\n",
ACPI_ERROR((AE_INFO, "Could not allocate size %X",
(u32) string_size));
acpi_ut_remove_reference(string_desc);
return_PTR(NULL);
@ -312,8 +312,8 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name,
object = acpi_os_acquire_object(acpi_gbl_operand_cache);
if (!object) {
_ACPI_REPORT_ERROR(module_name, line_number,
("Could not allocate an object descriptor\n"));
ACPI_ERROR((module_name, line_number,
"Could not allocate an object descriptor"));
return_PTR(NULL);
}
@ -347,8 +347,8 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object)
/* Object must be an union acpi_operand_object */
if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) {
ACPI_REPORT_ERROR(("%p is not an ACPI Operand object [%s]\n",
object,
ACPI_ERROR((AE_INFO,
"%p is not an ACPI Operand object [%s]", object,
acpi_ut_get_descriptor_name(object)));
return_VOID;
}
@ -451,7 +451,10 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
* Notably, Locals and Args are not supported, but this may be
* required eventually.
*/
ACPI_REPORT_ERROR(("Unsupported Reference opcode=%X in object %p\n", internal_object->reference.opcode, internal_object));
ACPI_ERROR((AE_INFO,
"Unsupported Reference opcode=%X in object %p",
internal_object->reference.opcode,
internal_object));
status = AE_TYPE;
break;
}
@ -459,7 +462,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
default:
ACPI_REPORT_ERROR(("Unsupported type=%X in object %p\n",
ACPI_ERROR((AE_INFO, "Unsupported type=%X in object %p",
ACPI_GET_OBJECT_TYPE(internal_object),
internal_object));
status = AE_TYPE;

View File

@ -486,6 +486,7 @@ u32 acpi_ut_get_descriptor_length(void *aml)
* RETURN: Status, pointer to the end tag
*
* DESCRIPTION: Find the end_tag resource descriptor in an AML resource template
* Note: allows a buffer length of zero.
*
******************************************************************************/
@ -504,6 +505,13 @@ acpi_ut_get_resource_end_tag(union acpi_operand_object * obj_desc,
aml = obj_desc->buffer.pointer;
end_aml = aml + obj_desc->buffer.length;
/* Allow a buffer length of zero */
if (!obj_desc->buffer.length) {
*end_tag = aml;
return_ACPI_STATUS(AE_OK);
}
/* Walk the resource template, one descriptor per iteration */
while (aml < end_aml) {
@ -518,6 +526,14 @@ acpi_ut_get_resource_end_tag(union acpi_operand_object * obj_desc,
if (acpi_ut_get_resource_type(aml) ==
ACPI_RESOURCE_NAME_END_TAG) {
/*
* There must be at least one more byte in the buffer for
* the 2nd byte of the end_tag
*/
if ((aml + 1) >= end_aml) {
return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG);
}
/* Return the pointer to the end_tag */
*end_tag = aml;

View File

@ -75,8 +75,7 @@ acpi_status acpi_initialize_subsystem(void)
status = acpi_os_initialize();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("OSL failed to initialize, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status, "During OSL initialization"));
return_ACPI_STATUS(status);
}
@ -88,8 +87,8 @@ acpi_status acpi_initialize_subsystem(void)
status = acpi_ut_mutex_initialize();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Global mutex creation failure, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"During Global Mutex creation"));
return_ACPI_STATUS(status);
}
@ -99,15 +98,14 @@ acpi_status acpi_initialize_subsystem(void)
*/
status = acpi_ns_root_initialize();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Namespace initialization failure, %s\n",
acpi_format_exception(status)));
ACPI_EXCEPTION((AE_INFO, status,
"During Namespace initialization"));
return_ACPI_STATUS(status);
}
/* If configured, initialize the AML debugger */
ACPI_DEBUGGER_EXEC(status = acpi_db_initialize());
return_ACPI_STATUS(status);
}
@ -154,7 +152,7 @@ acpi_status acpi_enable_subsystem(u32 flags)
status = acpi_enable();
if (ACPI_FAILURE(status)) {
ACPI_REPORT_WARNING(("acpi_enable failed\n"));
ACPI_WARNING((AE_INFO, "acpi_enable failed"));
return_ACPI_STATUS(status);
}
}

View File

@ -63,7 +63,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20060113
#define ACPI_CA_VERSION 0x20060127
/*
* OS name, used for the _OS object. The _OS object is essentially obsolete,
@ -83,7 +83,7 @@
#define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */
/*
* Should the subystem abort the loading of an ACPI table if the
* Should the subsystem abort the loading of an ACPI table if the
* table checksum is incorrect?
*/
#define ACPI_CHECKSUM_ABORT FALSE

View File

@ -422,7 +422,7 @@ struct acpi_field_info {
u16 value; \
u16 state; \
u16 reserved; \
void *next; \
void *next;
struct acpi_common_state {
ACPI_STATE_COMMON};
@ -575,8 +575,7 @@ union acpi_parse_value {
char aml_op_name[16]) /* Op name (debug only) */\
/* NON-DEBUG members below: */\
struct acpi_namespace_node *node; /* For use by interpreter */\
union acpi_parse_value value; /* Value or args associated with the opcode */\
union acpi_parse_value value; /* Value or args associated with the opcode */
#define ACPI_DASM_BUFFER 0x00
#define ACPI_DASM_RESOURCE 0x01

View File

@ -341,8 +341,12 @@
/*
* Rounding macros (Power of two boundaries only)
*/
#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & (~(((acpi_native_uint) boundary)-1)))
#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + (((acpi_native_uint) boundary)-1)) & (~(((acpi_native_uint) boundary)-1)))
#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \
(~(((acpi_native_uint) boundary)-1)))
#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \
(((acpi_native_uint) boundary)-1)) & \
(~(((acpi_native_uint) boundary)-1)))
#define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4)
#define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8)
@ -379,7 +383,8 @@
/* Generate a UUID */
#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
(a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
(b) & 0xFF, ((b) >> 8) & 0xFF, \
(c) & 0xFF, ((c) >> 8) & 0xFF, \
(d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)
@ -442,13 +447,12 @@
#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F))
#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
#if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
/*
* Module name is include in both debug and non-debug versions primarily for
* error messages. The __FILE__ macro is not very useful for this, because it
* often includes the entire pathname to the module
*/
#if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name;
#else
#define ACPI_MODULE_NAME(name)
@ -458,45 +462,31 @@
* Ascii error messages can be configured out
*/
#ifndef ACPI_NO_ERROR_MESSAGES
#define ACPI_PARAM_LIST(pl) pl
#define ACPI_LOCATION_INFO _acpi_module_name, __LINE__
#define AE_INFO _acpi_module_name, __LINE__
/*
* Error reporting. Callers module and line number are inserted automatically
* These macros are used for both the debug and non-debug versions of the code
* Error reporting. Callers module and line number are inserted by AE_INFO,
* the plist contains a set of parens to allow variable-length lists.
* These macros are used for both the debug and non-debug versions of the code.
*/
#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info (ACPI_LOCATION_INFO); \
acpi_os_printf ACPI_PARAM_LIST (fp);}
#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error (ACPI_LOCATION_INFO); \
acpi_os_printf ACPI_PARAM_LIST (fp);}
#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning (ACPI_LOCATION_INFO); \
acpi_os_printf ACPI_PARAM_LIST (fp);}
#define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error (ACPI_LOCATION_INFO, \
s, e);
#define ACPI_REPORT_MTERROR(s,n,p,e) acpi_ns_report_method_error (ACPI_LOCATION_INFO, \
s, n, p, e);
#define ACPI_INFO(plist) acpi_ut_info plist
#define ACPI_WARNING(plist) acpi_ut_warning plist
#define ACPI_EXCEPTION(plist) acpi_ut_exception plist
#define ACPI_ERROR(plist) acpi_ut_error plist
#define ACPI_ERROR_NAMESPACE(s,e) acpi_ns_report_error (AE_INFO, s, e);
#define ACPI_ERROR_METHOD(s,n,p,e) acpi_ns_report_method_error (AE_INFO, s, n, p, e);
/* Error reporting. These versions pass thru the module and lineno */
#define _ACPI_REPORT_INFO(a,b,fp) {acpi_ut_report_info (a,b); \
acpi_os_printf ACPI_PARAM_LIST (fp);}
#define _ACPI_REPORT_ERROR(a,b,fp) {acpi_ut_report_error (a,b); \
acpi_os_printf ACPI_PARAM_LIST (fp);}
#define _ACPI_REPORT_WARNING(a,b,fp) {acpi_ut_report_warning (a,b); \
acpi_os_printf ACPI_PARAM_LIST (fp);}
#else
/* No error messages */
#define ACPI_REPORT_INFO(fp)
#define ACPI_REPORT_ERROR(fp)
#define ACPI_REPORT_WARNING(fp)
#define ACPI_REPORT_NSERROR(s,e)
#define ACPI_REPORT_MTERROR(s,n,p,e)
#define _ACPI_REPORT_INFO(a,b,c,fp)
#define _ACPI_REPORT_ERROR(a,b,c,fp)
#define _ACPI_REPORT_WARNING(a,b,c,fp)
#define ACPI_INFO(plist)
#define ACPI_WARNING(plist)
#define ACPI_EXCEPTION(plist)
#define ACPI_ERROR(plist)
#define ACPI_ERROR_NAMESPACE(s,e)
#define ACPI_ERROR_METHOD(s,n,p,e)
#endif
/*
@ -632,18 +622,6 @@
#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d)
#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a)
#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
#define ACPI_BREAK_MSG(a) acpi_os_signal (ACPI_SIGNAL_BREAKPOINT,(a))
/*
* Generate INT3 on ACPI_ERROR (Debug only!)
*/
#define ACPI_ERROR_BREAK
#ifdef ACPI_ERROR_BREAK
#define ACPI_BREAK_ON_ERROR(lvl) if ((lvl)&ACPI_ERROR) \
acpi_os_signal(ACPI_SIGNAL_BREAKPOINT,"Fatal error encountered\n")
#else
#define ACPI_BREAK_ON_ERROR(lvl)
#endif
/*
* Master debug print macros
@ -651,8 +629,8 @@
* 1) Debug print for the current component is enabled
* 2) Debug error level or trace level for the print statement is enabled
*/
#define ACPI_DEBUG_PRINT(pl) acpi_ut_debug_print ACPI_PARAM_LIST(pl)
#define ACPI_DEBUG_PRINT_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl)
#define ACPI_DEBUG_PRINT(plist) acpi_ut_debug_print plist
#define ACPI_DEBUG_PRINT_RAW(plist) acpi_ut_debug_print_raw plist
#else
/*
@ -681,7 +659,6 @@
#define ACPI_DUMP_BUFFER(a,b)
#define ACPI_DEBUG_PRINT(pl)
#define ACPI_DEBUG_PRINT_RAW(pl)
#define ACPI_BREAK_MSG(a)
#define return_VOID return
#define return_ACPI_STATUS(s) return(s)

View File

@ -69,7 +69,7 @@
u8 type; /* acpi_object_type */\
u16 reference_count; /* For object deletion management */\
union acpi_operand_object *next_object; /* Objects linked to parent NS node */\
u8 flags; \
u8 flags;
/* Values for flag byte above */

View File

@ -108,9 +108,9 @@ acpi_status acpi_os_create_lock(acpi_handle * out_handle);
void acpi_os_delete_lock(acpi_handle handle);
acpi_native_uint acpi_os_acquire_lock(acpi_handle handle);
acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle);
void acpi_os_release_lock(acpi_handle handle, acpi_native_uint flags);
void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags);
/*
* Memory allocation and mapping

View File

@ -237,17 +237,22 @@ typedef char *acpi_physical_address;
#error unknown ACPI_MACHINE_WIDTH
#endif
/* Variable-width type, used instead of clib size_t */
typedef acpi_native_uint acpi_size;
/*******************************************************************************
*
* OS- or compiler-dependent types
*
* If the defaults below are not appropriate for the host system, they can
* be defined in the compiler-specific or OS-specific header, and this will
* take precedence.
*
******************************************************************************/
/*
* If acpi_uintptr_t was not defined in the OS- or compiler-dependent header,
* define it now (use C99 uintptr_t for pointer casting if available,
* "void *" otherwise)
*/
/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */
#ifndef acpi_uintptr_t
#define acpi_uintptr_t void *
#endif
@ -261,9 +266,31 @@ typedef char *acpi_physical_address;
#define acpi_cache_t struct acpi_memory_list
#endif
/* Variable-width type, used instead of clib size_t */
/*
* Allow the CPU flags word to be defined per-OS to simplify the use of the
* lock and unlock OSL interfaces.
*/
#ifndef acpi_cpu_flags
#define acpi_cpu_flags acpi_native_uint
#endif
typedef acpi_native_uint acpi_size;
/*
* ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because
* some compilers can catch printf format string problems
*/
#ifndef ACPI_PRINTF_LIKE
#define ACPI_PRINTF_LIKE(c)
#endif
/*
* Some compilers complain about unused variables. Sometimes we don't want to
* use all the variables (for example, _acpi_module_name). This allows us
* to to tell the compiler in a per-variable manner that a variable
* is unused
*/
#ifndef ACPI_UNUSED_VAR
#define ACPI_UNUSED_VAR
#endif
/*******************************************************************************
*

View File

@ -275,20 +275,22 @@ acpi_ut_ptr_exit(u32 line_number,
const char *function_name,
char *module_name, u32 component_id, u8 * ptr);
void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
void acpi_ut_report_error(char *module_name, u32 line_number);
void acpi_ut_report_info(char *module_name, u32 line_number);
void acpi_ut_report_warning(char *module_name, u32 line_number);
void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
/* Error and message reporting interfaces */
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print(u32 requested_debug_level,
u32 line_number,
const char *function_name,
char *module_name,
u32 component_id, char *format, ...) ACPI_PRINTF_LIKE_FUNC;
u32 component_id, char *format, ...) ACPI_PRINTF_LIKE(6);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print_raw(u32 requested_debug_level,
@ -296,7 +298,24 @@ acpi_ut_debug_print_raw(u32 requested_debug_level,
const char *function_name,
char *module_name,
u32 component_id,
char *format, ...) ACPI_PRINTF_LIKE_FUNC;
char *format, ...) ACPI_PRINTF_LIKE(6);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_error(char *module_name,
u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_exception(char *module_name,
u32 line_number,
acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_warning(char *module_name,
u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_info(char *module_name,
u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
/*
* utdelete - Object deletion and reference counts

View File

@ -149,6 +149,9 @@
#elif defined(NETWARE)
#include "acnetware.h"
#elif defined(__sun)
#include "acsolaris.h"
#else
/* All other environments */
@ -158,13 +161,6 @@
#define COMPILER_DEPENDENT_INT64 long long
#define COMPILER_DEPENDENT_UINT64 unsigned long long
/*
* This macro is used to tag functions as "printf-like" because
* some compilers can catch printf format string problems. MSVC
* doesn't, so this is proprocessed away.
*/
#define ACPI_PRINTF_LIKE_FUNC
#endif
/*

View File

@ -48,12 +48,14 @@
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
/* This macro is used to tag functions as "printf-like" because
/*
* This macro is used to tag functions as "printf-like" because
* some compilers (like GCC) can catch printf format string problems.
*/
#define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 6, 7)))
#define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1)))
/* Some compilers complain about unused variables. Sometimes we don't want to
/*
* Some compilers complain about unused variables. Sometimes we don't want to
* use all the variables (for example, _acpi_module_name). This allows us
* to to tell the compiler warning in a per-variable manner that a variable
* is unused.

View File

@ -102,4 +102,6 @@
#include "acgcc.h"
#define acpi_cpu_flags unsigned long
#endif /* __ACLINUX_H__ */