Commit ea9c6d74 authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] update Linux to ACPICA 20031029 (Bob Moore)

Fixed a problem where a level-triggered GPE with an associated _Lxx
control method was incorrectly cleared twice.

Fixed a problem with the Field support code where an access can occur
beyond the end-of-region if the field is non-aligned but extends to the
very end of the parent region (resulted in an AE_AML_REGION_LIMIT
exception.)

Fixed a problem with ACPI Fixed Events where an RT Clock handler would
not get invoked on an RTC event.  The RTC event bitmasks for the PM1
registers were not being initialized properly.

Implemented support for executing _STA and _INI methods for Processor
objects.  Although this is currently not part of the ACPI specification,
there is existing ASL code that depends on the init-time execution of
these methods.

Implemented and deployed a GetDescriptorName function to decode the
various types of internal descriptors.  Guards against null descriptors
during debug output also.

Implemented and deployed a GetNodeName function to extract the
4-character namespace node name.  This function simplifies the debug and
error output, as well as guarding against null pointers during output.

Implemented and deployed the ACPI_FORMAT_UINT64 helper macro to simplify
the debug and error output of 64-bit integers.  This macro replaces the
HIDWORD and LODWORD macros for dumping these integers.

Updated the implementation of the Stall() operator to only call
AcpiOsStall(), and also return an error if the operand is larger than
255.  This preserves the required behavior of not relinquishing the
processor, as would happen if AcpiOsSleep() was called for "long
stalls".

Constructs of the form "Store(LocalX,LocalX)" where LocalX is not
initialized are now treated as NOOPs.

Cleaned up a handful of warnings during 64-bit generation.

Fixed a reported error where and incorrect GPE number was passed to the
GPE dispatch handler.  This value is only used for error output,
however.  Used this opportunity to clean up and streamline the GPE
dispatch code.
parent 0513b8ac
......@@ -106,7 +106,7 @@ acpi_ds_init_one_object (
status = acpi_ds_initialize_region (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Region %p [%4.4s] - Init failure, %s\n",
obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
obj_handle, acpi_ut_get_node_name (obj_handle),
acpi_format_exception (status)));
}
......@@ -141,7 +141,7 @@ acpi_ds_init_one_object (
status = acpi_ds_parse_method (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n",
obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
obj_handle, acpi_ut_get_node_name (obj_handle),
acpi_format_exception (status)));
/* This parse failed, but we will continue parsing more methods */
......
......@@ -94,7 +94,7 @@ acpi_ds_parse_method (
}
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Parsing [%4.4s] **** named_obj=%p\n",
((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
acpi_ut_get_node_name (obj_handle), obj_handle));
/* Extract the method object from the method Node */
......@@ -169,7 +169,7 @@ acpi_ds_parse_method (
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"**** [%4.4s] Parsed **** named_obj=%p Op=%p\n",
((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
acpi_ut_get_node_name (obj_handle), obj_handle, op));
acpi_ps_delete_parse_tree (op);
return_ACPI_STATUS (status);
......
......@@ -624,8 +624,8 @@ acpi_ds_store_object_to_local (
* operand objects of type Reference.
*/
if (ACPI_GET_DESCRIPTOR_TYPE (current_obj_desc) != ACPI_DESC_TYPE_OPERAND) {
ACPI_REPORT_ERROR (("Invalid descriptor type while storing to method arg: %X\n",
current_obj_desc->common.type));
ACPI_REPORT_ERROR (("Invalid descriptor type while storing to method arg: [%s]\n",
acpi_ut_get_descriptor_name (current_obj_desc)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
......@@ -636,8 +636,8 @@ acpi_ds_store_object_to_local (
if ((current_obj_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) &&
(current_obj_desc->reference.opcode == AML_REF_OF_OP)) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Arg (%p) is an obj_ref(Node), storing in node %p\n",
obj_desc, current_obj_desc));
"Arg (%p) is an obj_ref(Node), storing in node %p\n",
obj_desc, current_obj_desc));
/*
* Store this object to the Node
......
......@@ -201,7 +201,7 @@ acpi_ds_get_buffer_field_arguments (
ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_BUFFER_FIELD, node, NULL));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] buffer_field Arg Init\n",
node->name.ascii));
acpi_ut_get_node_name (node)));
/* Execute the AML code for the term_arg arguments */
......@@ -346,7 +346,7 @@ acpi_ds_get_region_arguments (
ACPI_DEBUG_EXEC (acpi_ut_display_init_pathname (ACPI_TYPE_REGION, node, NULL));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] op_region Arg Init at AML %p\n",
node->name.ascii, extra_desc->extra.aml_start));
acpi_ut_get_node_name (node), extra_desc->extra.aml_start));
/* Execute the argument AML */
......@@ -438,8 +438,8 @@ acpi_ds_init_buffer_field (
* after resolution in acpi_ex_resolve_operands().
*/
if (ACPI_GET_DESCRIPTOR_TYPE (result_desc) != ACPI_DESC_TYPE_NAMED) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) destination must be a NS Node\n",
acpi_ps_get_opcode_name (aml_opcode)));
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) destination not a NS Node [%s]\n",
acpi_ps_get_opcode_name (aml_opcode), acpi_ut_get_descriptor_name (result_desc)));
status = AE_AML_OPERAND_TYPE;
goto cleanup;
......@@ -520,9 +520,9 @@ acpi_ds_init_buffer_field (
(8 * (u32) buffer_desc->buffer.length)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n",
((struct acpi_namespace_node *) result_desc)->name.ascii,
acpi_ut_get_node_name (result_desc),
bit_offset + bit_count,
buffer_desc->buffer.node->name.ascii,
acpi_ut_get_node_name (buffer_desc->buffer.node),
8 * (u32) buffer_desc->buffer.length));
status = AE_AML_BUFFER_LIMIT;
goto cleanup;
......@@ -744,7 +744,7 @@ acpi_ds_eval_region_operands (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "rgn_obj %p Addr %8.8X%8.8X Len %X\n",
obj_desc,
ACPI_HIDWORD (obj_desc->region.address), ACPI_LODWORD (obj_desc->region.address),
ACPI_FORMAT_UINT64 (obj_desc->region.address),
obj_desc->region.length));
/* Now the address and length are valid for this opregion */
......
......@@ -416,10 +416,24 @@ acpi_ds_exec_end_op (
status = acpi_gbl_op_type_dispatch [op_type] (walk_state);
}
else {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"[%s]: Could not resolve operands, %s\n",
acpi_ps_get_opcode_name (walk_state->opcode),
acpi_format_exception (status)));
/*
* Treat constructs of the form "Store(local_x,local_x)" as noops when the
* Local is uninitialized.
*/
if ((status == AE_AML_UNINITIALIZED_LOCAL) &&
(walk_state->opcode == AML_STORE_OP) &&
(walk_state->operands[0]->common.type == ACPI_TYPE_LOCAL_REFERENCE) &&
(walk_state->operands[1]->common.type == ACPI_TYPE_LOCAL_REFERENCE) &&
(walk_state->operands[0]->reference.opcode ==
walk_state->operands[1]->reference.opcode)) {
status = AE_OK;
}
else {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"[%s]: Could not resolve operands, %s\n",
acpi_ps_get_opcode_name (walk_state->opcode),
acpi_format_exception (status)));
}
}
/* Always delete the argument objects and clear the operand stack */
......
......@@ -146,7 +146,7 @@ acpi_ds_scope_stack_push (
if (old_scope_info) {
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
"[%4.4s] (%s)",
old_scope_info->scope.node->name.ascii,
acpi_ut_get_node_name (old_scope_info->scope.node),
acpi_ut_get_type_name (old_scope_info->common.value)));
}
else {
......@@ -156,7 +156,7 @@ acpi_ds_scope_stack_push (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
", New scope -> [%4.4s] (%s)\n",
scope_info->scope.node->name.ascii,
acpi_ut_get_node_name (scope_info->scope.node),
acpi_ut_get_type_name (scope_info->common.value)));
/* Push new scope object onto stack */
......@@ -207,14 +207,14 @@ acpi_ds_scope_stack_pop (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"[%.2d] Popped scope [%4.4s] (%s), New scope -> ",
(u32) walk_state->scope_depth,
scope_info->scope.node->name.ascii,
acpi_ut_get_node_name (scope_info->scope.node),
acpi_ut_get_type_name (scope_info->common.value)));
new_scope_info = walk_state->scope_info;
if (new_scope_info) {
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
"[%4.4s] (%s)\n",
new_scope_info->scope.node->name.ascii,
acpi_ut_get_node_name (new_scope_info->scope.node),
acpi_ut_get_type_name (new_scope_info->common.value)));
}
else {
......
......@@ -139,12 +139,10 @@ acpi_ev_gpe_detect (
{
u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
u8 enabled_status_byte;
u8 bit_mask;
struct acpi_gpe_register_info *gpe_register_info;
u32 in_value;
acpi_status status;
struct acpi_gpe_block_info *gpe_block;
u32 gpe_number;
u32 i;
u32 j;
......@@ -187,11 +185,9 @@ acpi_ev_gpe_detect (
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
"GPE pair: Status %8.8X%8.8X = %02X, Enable %8.8X%8.8X = %02X\n",
ACPI_HIDWORD (gpe_register_info->status_address.address),
ACPI_LODWORD (gpe_register_info->status_address.address),
ACPI_FORMAT_UINT64 (gpe_register_info->status_address.address),
gpe_register_info->status,
ACPI_HIDWORD (gpe_register_info->enable_address.address),
ACPI_LODWORD (gpe_register_info->enable_address.address),
ACPI_FORMAT_UINT64 (gpe_register_info->enable_address.address),
gpe_register_info->enable));
/* First check if there is anything active at all in this register */
......@@ -206,19 +202,17 @@ acpi_ev_gpe_detect (
/* Now look at the individual GPEs in this byte register */
for (j = 0, bit_mask = 1; j < ACPI_GPE_REGISTER_WIDTH; j++, bit_mask <<= 1) {
for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) {
/* Examine one GPE bit */
if (enabled_status_byte & bit_mask) {
if (enabled_status_byte & acpi_gbl_decode_to8bit[j]) {
/*
* Found an active GPE. Dispatch the event to a handler
* or method.
*/
gpe_number = (i * ACPI_GPE_REGISTER_WIDTH) + j;
int_status |= acpi_ev_gpe_dispatch (
&gpe_block->event_info[gpe_number],
gpe_number + gpe_block->register_info[gpe_number].base_gpe_number);
&gpe_block->event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j],
j + gpe_register_info->base_gpe_number);
}
}
}
......@@ -294,7 +288,7 @@ acpi_ev_asynch_execute_gpe_method (
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("%s while evaluating method [%4.4s] for GPE[%2X]\n",
acpi_format_exception (status),
local_gpe_event_info.method_node->name.ascii, gpe_number));
acpi_ut_get_node_name (local_gpe_event_info.method_node), gpe_number));
}
}
......@@ -367,6 +361,18 @@ acpi_ev_gpe_dispatch (
/* Invoke the installed handler (at interrupt level) */
gpe_event_info->handler (gpe_event_info->context);
/* It is now safe to clear level-triggered events. */
if (gpe_event_info->flags & ACPI_EVENT_LEVEL_TRIGGERED) {
status = acpi_hw_clear_gpe (gpe_event_info);
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR ((
"acpi_ev_gpe_dispatch: Unable to clear GPE[%2X]\n",
gpe_number));
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
}
}
}
else if (gpe_event_info->method_node) {
/*
......@@ -375,13 +381,16 @@ acpi_ev_gpe_dispatch (
*/
status = acpi_hw_disable_gpe (gpe_event_info);
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to disable GPE[%2X]\n",
ACPI_REPORT_ERROR ((
"acpi_ev_gpe_dispatch: Unable to disable GPE[%2X]\n",
gpe_number));
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
}
/* Execute the method associated with the GPE. */
/*
* Execute the method associated with the GPE
* NOTE: Level-triggered GPEs are cleared after the method completes.
*/
if (ACPI_FAILURE (acpi_os_queue_for_execution (OSD_PRIORITY_GPE,
acpi_ev_asynch_execute_gpe_method,
gpe_event_info))) {
......@@ -399,22 +408,12 @@ acpi_ev_gpe_dispatch (
/*
* Disable the GPE. The GPE will remain disabled until the ACPI
* Core Subsystem is restarted, or the handler is reinstalled.
* Core Subsystem is restarted, or a handler is installed.
*/
status = acpi_hw_disable_gpe (gpe_event_info);
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to disable GPE[%2X]\n",
gpe_number));
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
}
}
/* It is now safe to clear level-triggered events. */
if (gpe_event_info->flags & ACPI_EVENT_LEVEL_TRIGGERED) {
status = acpi_hw_clear_gpe (gpe_event_info);
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to clear GPE[%2X]\n",
ACPI_REPORT_ERROR ((
"acpi_ev_gpe_dispatch: Unable to disable GPE[%2X]\n",
gpe_number));
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
}
......
......@@ -743,8 +743,7 @@ acpi_ev_create_gpe_block (
((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)),
gpe_device->name.ascii,
gpe_block->register_count,
ACPI_HIDWORD (gpe_block->block_address.address),
ACPI_LODWORD (gpe_block->block_address.address),
ACPI_FORMAT_UINT64 (gpe_block->block_address.address),
interrupt_level));
/* Find all GPE methods (_Lxx, _Exx) for this block */
......
......@@ -195,7 +195,8 @@ acpi_ev_queue_notify_request (
/* There is no per-device notify handler for this device */
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"No notify handler for [%4.4s] node %p\n", node->name.ascii, node));
"No notify handler for [%4.4s] node %p\n",
acpi_ut_get_node_name (node), node));
}
return (status);
......
......@@ -321,7 +321,7 @@ acpi_ev_address_space_dispatch (
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
&region_obj->region.address_space->address_space, handler,
ACPI_HIDWORD (address), ACPI_LODWORD (address),
ACPI_FORMAT_UINT64 (address),
acpi_ut_get_region_name (region_obj->region.space_id)));
if (!(handler_desc->address_space.flags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) {
......
......@@ -239,7 +239,7 @@ acpi_ev_pci_config_region_setup (
else {
ACPI_REPORT_ERROR ((
"Could not install pci_config handler for Root Bridge %4.4s, %s\n",
pci_root_node->name.ascii, acpi_format_exception (status)));
acpi_ut_get_node_name (pci_root_node), acpi_format_exception (status)));
}
}
break;
......
......@@ -240,7 +240,8 @@ acpi_install_address_space_handler (
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Installing address handler for region %s(%X) on Device %4.4s %p(%p)\n",
acpi_ut_get_region_name (space_id), space_id, node->name.ascii, node, obj_desc));
acpi_ut_get_region_name (space_id), space_id,
acpi_ut_get_node_name (node), node, obj_desc));
/*
* Install the handler
......
......@@ -89,27 +89,27 @@ acpi_ex_dump_operand (
if (!obj_desc) {
/*
* This usually indicates that something serious is wrong --
* since most (if not all)
* code that dumps the stack expects something to be there!
* This usually indicates that something serious is wrong
*/
acpi_os_printf ("Null stack entry ptr\n");
acpi_os_printf ("Null Object Descriptor\n");
return;
}
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p NS Node: ", obj_desc));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is a NS Node: ", obj_desc));
ACPI_DUMP_ENTRY (obj_desc, ACPI_LV_EXEC);
return;
}
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is not a local object\n", obj_desc));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"%p is not a node or operand object: [%s]\n",
obj_desc, acpi_ut_get_descriptor_name (obj_desc)));
ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object));
return;
}
/* obj_desc is a valid object */
/* obj_desc is a valid object */
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", obj_desc));
......@@ -151,11 +151,10 @@ acpi_ex_dump_operand (
obj_desc->reference.offset);
if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
/* Value is a Number */
/* Value is an Integer */
acpi_os_printf (" value is [%8.8X%8.8x]",
ACPI_HIDWORD(obj_desc->integer.value),
ACPI_LODWORD(obj_desc->integer.value));
ACPI_FORMAT_UINT64 (obj_desc->integer.value));
}
acpi_os_printf ("\n");
......@@ -169,11 +168,10 @@ acpi_ex_dump_operand (
if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
/* Value is a Number */
/* Value is an Integer */
acpi_os_printf (" value is [%8.8X%8.8x]",
ACPI_HIDWORD(obj_desc->integer.value),
ACPI_LODWORD(obj_desc->integer.value));
ACPI_FORMAT_UINT64 (obj_desc->integer.value));
}
acpi_os_printf ("\n");
......@@ -189,7 +187,7 @@ acpi_ex_dump_operand (
default:
/* unknown opcode */
/* Unknown opcode */
acpi_os_printf ("Unknown Reference opcode=%X\n",
obj_desc->reference.opcode);
......@@ -229,8 +227,7 @@ acpi_ex_dump_operand (
case ACPI_TYPE_INTEGER:
acpi_os_printf ("Integer %8.8X%8.8X\n",
ACPI_HIDWORD (obj_desc->integer.value),
ACPI_LODWORD (obj_desc->integer.value));
ACPI_FORMAT_UINT64 (obj_desc->integer.value));
break;
......@@ -271,8 +268,7 @@ acpi_ex_dump_operand (
}
else {
acpi_os_printf (" base %8.8X%8.8X Length %X\n",
ACPI_HIDWORD (obj_desc->region.address),
ACPI_LODWORD (obj_desc->region.address),
ACPI_FORMAT_UINT64 (obj_desc->region.address),
obj_desc->region.length);
}
break;
......@@ -494,7 +490,7 @@ acpi_ex_out_address (
acpi_os_printf ("%20s : %p\n", title, value);
#else
acpi_os_printf ("%20s : %8.8X%8.8X\n", title,
ACPI_HIDWORD (value), ACPI_LODWORD (value));
ACPI_FORMAT_UINT64 (value));
#endif
}
......@@ -525,7 +521,7 @@ acpi_ex_dump_node (
}
}
acpi_os_printf ("%20s : %4.4s\n", "Name", node->name.ascii);
acpi_os_printf ("%20s : %4.4s\n", "Name", acpi_ut_get_node_name (node));
acpi_ex_out_string ("Type", acpi_ut_get_type_name (node->type));
acpi_ex_out_integer ("Flags", node->flags);
acpi_ex_out_integer ("Owner Id", node->owner_id);
......@@ -573,7 +569,8 @@ acpi_ex_dump_object_descriptor (
}
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
acpi_os_printf ("ex_dump_object_descriptor: %p is not a valid ACPI object\n", obj_desc);
acpi_os_printf ("ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n",
obj_desc, acpi_ut_get_descriptor_name (obj_desc));
return_VOID;
}
......@@ -589,8 +586,7 @@ acpi_ex_dump_object_descriptor (
case ACPI_TYPE_INTEGER:
acpi_os_printf ("%20s : %8.8X%8.8X\n", "Value",
ACPI_HIDWORD (obj_desc->integer.value),
ACPI_LODWORD (obj_desc->integer.value));
ACPI_FORMAT_UINT64 (obj_desc->integer.value));
break;
......
This diff is collapsed.
......@@ -121,8 +121,8 @@ acpi_ex_get_object_reference (
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid descriptor type %X in %p\n",
ACPI_GET_DESCRIPTOR_TYPE (obj_desc), obj_desc));
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p has invalid descriptor [%s]\n",
obj_desc, acpi_ut_get_descriptor_name (obj_desc)));
return_ACPI_STATUS (AE_TYPE);
}
......@@ -139,7 +139,7 @@ acpi_ex_get_object_reference (
*return_desc = reference_obj;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object %p Type [%s], returning Reference %p\n",
obj_desc, acpi_ut_get_object_type_name (obj_desc), *return_desc));
obj_desc, acpi_ut_get_object_type_name (obj_desc), *return_desc));
return_ACPI_STATUS (AE_OK);
}
......
......@@ -159,7 +159,7 @@ acpi_ex_acquire_mutex (
if (!walk_state->thread) {
ACPI_REPORT_ERROR (("Cannot acquire Mutex [%4.4s], null thread info\n",
obj_desc->mutex.node->name.ascii));
acpi_ut_get_node_name (obj_desc->mutex.node)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
......@@ -169,7 +169,7 @@ acpi_ex_acquire_mutex (
*/
if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) {
ACPI_REPORT_ERROR (("Cannot acquire Mutex [%4.4s], incorrect sync_level\n",
obj_desc->mutex.node->name.ascii));
acpi_ut_get_node_name (obj_desc->mutex.node)));
return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
}
......@@ -242,7 +242,7 @@ acpi_ex_release_mutex (
if (!obj_desc->mutex.owner_thread) {
ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], not acquired\n",
obj_desc->mutex.node->name.ascii));
acpi_ut_get_node_name (obj_desc->mutex.node)));
return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED);
}
......@@ -250,7 +250,7 @@ acpi_ex_release_mutex (
if (!walk_state->thread) {
ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], null thread info\n",
obj_desc->mutex.node->name.ascii));
acpi_ut_get_node_name (obj_desc->mutex.node)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
......@@ -260,7 +260,7 @@ acpi_ex_release_mutex (
ACPI_REPORT_ERROR ((
"Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n",
walk_state->thread->thread_id,
obj_desc->mutex.node->name.ascii,
acpi_ut_get_node_name (obj_desc->mutex.node),
obj_desc->mutex.owner_thread->thread_id));
return_ACPI_STATUS (AE_AML_NOT_OWNER);
}
......@@ -271,7 +271,7 @@ acpi_ex_release_mutex (
*/
if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) {
ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], incorrect sync_level\n",
obj_desc->mutex.node->name.ascii));
acpi_ut_get_node_name (obj_desc->mutex.node)));
return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
}
......
......@@ -351,8 +351,7 @@ acpi_ex_opcode_1A_1T_1R (
if (digit > 0) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Integer too large to convert to BCD: %8.8X%8.8X\n",
ACPI_HIDWORD(operand[0]->integer.value),
ACPI_LODWORD(operand[0]->integer.value)));
ACPI_FORMAT_UINT64 (operand[0]->integer.value)));
status = AE_AML_NUMERIC_OVERFLOW;
goto cleanup;
}
......
......@@ -101,15 +101,14 @@ acpi_ex_opcode_3A_0T_0R (
switch (walk_state->opcode) {
case AML_FATAL_OP: /* Fatal (fatal_type fatal_code fatal_arg) */
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"fatal_op: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
(u32) operand[0]->integer.value, (u32) operand[1]->integer.value,
(u32) operand[0]->integer.value,
(u32) operand[1]->integer.value,
(u32) operand[2]->integer.value));
fatal = ACPI_MEM_ALLOCATE (sizeof (struct acpi_signal_fatal_info));
if (fatal) {
fatal->type = (u32) operand[0]->integer.value;
......
......@@ -351,7 +351,7 @@ acpi_ex_prep_common_field_object (
*/
nearest_byte_address =
ACPI_ROUND_BITS_DOWN_TO_BYTES (field_bit_position);
obj_desc->common_field.base_byte_offset =
obj_desc->common_field.base_byte_offset = (u32)
ACPI_ROUND_DOWN (nearest_byte_address, byte_alignment);
/*
......@@ -539,7 +539,7 @@ acpi_ex_prep_field_value (
acpi_ns_get_type (info->field_node));
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Set named_obj %p [%4.4s], obj_desc %p\n",
info->field_node, info->field_node->name.ascii, obj_desc));
info->field_node, acpi_ut_get_node_name (info->field_node), obj_desc));
/* Remove local reference to the object */
......
......@@ -161,7 +161,7 @@ acpi_ex_system_memory_space_handler (
(void **) &mem_info->mapped_logical_address);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %8.8X%8.8X, size %X\n",
ACPI_HIDWORD (address), ACPI_LODWORD (address), (u32) window_size));
ACPI_FORMAT_UINT64 (address), (u32) window_size));
mem_info->mapped_length = 0;
return_ACPI_STATUS (status);
}
......@@ -180,8 +180,8 @@ acpi_ex_system_memory_space_handler (
((acpi_integer) address - (acpi_integer) mem_info->mapped_physical_address);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"system_memory %d (%d width) Address=%8.8X%8.8X\n", function, bit_width,
ACPI_HIDWORD (address), ACPI_LODWORD (address)));
"system_memory %d (%d width) Address=%8.8X%8.8X\n", function, bit_width,
ACPI_FORMAT_UINT64 (address)));
/*
* Perform the memory read or write
......@@ -290,8 +290,8 @@ acpi_ex_system_io_space_handler (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"system_iO %d (%d width) Address=%8.8X%8.8X\n", function, bit_width,
ACPI_HIDWORD (address), ACPI_LODWORD (address)));
"system_iO %d (%d width) Address=%8.8X%8.8X\n", function, bit_width,
ACPI_FORMAT_UINT64 (address)));
/* Decode the function parameter */
......
......@@ -349,6 +349,8 @@ acpi_ex_resolve_multiple (
/* All "References" point to a NS node */
if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) {
ACPI_REPORT_ERROR (("acpi_ex_resolve_multiple: Not a NS node %p [%s]\n",
node, acpi_ut_get_descriptor_name (node)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
......@@ -399,7 +401,9 @@ acpi_ex_resolve_multiple (
/* All "References" point to a NS node */
if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) {
return_ACPI_STATUS (AE_AML_INTERNAL);
ACPI_REPORT_ERROR (("acpi_ex_resolve_multiple: Not a NS node %p [%s]\n",
node, acpi_ut_get_descriptor_name (node)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
/* Get the attached object */
......
......@@ -247,8 +247,8 @@ acpi_ex_resolve_operands (
/* Invalid descriptor */
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Bad descriptor type %X in Obj %p\n",
ACPI_GET_DESCRIPTOR_TYPE (obj_desc), obj_desc));
"Invalid descriptor %p [%s]\n",
obj_desc, acpi_ut_get_descriptor_name (obj_desc)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
......
......@@ -190,8 +190,7 @@ acpi_ex_store (
case ACPI_TYPE_INTEGER:
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%8.8X%8.8X\n",
ACPI_HIDWORD (source_desc->integer.value),
ACPI_LODWORD (source_desc->integer.value)));
ACPI_FORMAT_UINT64 (source_desc->integer.value)));
break;
......
......@@ -111,11 +111,16 @@ acpi_ex_system_wait_semaphore (
*
* FUNCTION: acpi_ex_system_do_stall
*
* PARAMETERS: how_long - The amount of time to stall
* PARAMETERS: how_long - The amount of time to stall,
* in microseconds
*
* RETURN: Status
*
* DESCRIPTION: Suspend running thread for specified amount of time.
* Note: ACPI specification requires that Stall() does not
* relinquish the processor, and delays longer than 100 usec
* should use Sleep() instead. We allow stalls up to 255 usec
* for compatibility with other interpreters and existing BIOSs.
*
******************************************************************************/
......@@ -129,12 +134,15 @@ acpi_ex_system_do_stall (
ACPI_FUNCTION_ENTRY ();
if (how_long > 100) /* 100 microseconds */ {
if (how_long > 255) /* 255 microseconds */ {
/*
* Longer than 100 usec, use sleep instead
* (according to ACPI specification)
* Longer than 255 usec, this is an error
*
* (ACPI specifies 100 usec as max, but this gives some slack in
* order to support existing BIOSs)
*/
status = acpi_ex_system_do_suspend ((how_long / 1000) + 1);
ACPI_REPORT_ERROR (("Stall: Time parameter is too large (%d)\n", how_long));
status = AE_AML_OPERAND_VALUE;
}
else {
acpi_os_stall (how_long);
......@@ -148,7 +156,8 @@ acpi_ex_system_do_stall (
*
* FUNCTION: acpi_ex_system_do_suspend
*
* PARAMETERS: how_long - The amount of time to suspend
* PARAMETERS: how_long - The amount of time to suspend,
* in milliseconds
*
* RETURN: None
*
......
......@@ -418,16 +418,14 @@ acpi_set_register (
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "PM2 control: Read %X from %8.8X%8.8X\n",
register_value,
ACPI_HIDWORD (acpi_gbl_FADT->xpm2_cnt_blk.address),
ACPI_LODWORD (acpi_gbl_FADT->xpm2_cnt_blk.address)));
ACPI_FORMAT_UINT64 (acpi_gbl_FADT->xpm2_cnt_blk.address)));
ACPI_REGISTER_INSERT_VALUE (register_value, bit_reg_info->bit_position,
bit_reg_info->access_bit_mask, value);
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %4.4X to %8.8X%8.8X\n",
register_value,
ACPI_HIDWORD (acpi_gbl_FADT->xpm2_cnt_blk.address),
ACPI_LODWORD (acpi_gbl_FADT->xpm2_cnt_blk.address)));
ACPI_FORMAT_UINT64 (acpi_gbl_FADT->xpm2_cnt_blk.address)));
status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM2_CONTROL, (u8) (register_value));
......@@ -763,8 +761,7 @@ acpi_hw_low_level_read (
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read: %8.8X width %2d from %8.8X%8.8X (%s)\n",
*value, width,
ACPI_HIDWORD (reg->address),
ACPI_LODWORD (reg->address),
ACPI_FORMAT_UINT64 (reg->address),
acpi_ut_get_region_name (reg->address_space_id)));
return (status);
......@@ -850,8 +847,7 @@ acpi_hw_low_level_write (
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n",
value, width,
ACPI_HIDWORD (reg->address),
ACPI_LODWORD (reg->address),
ACPI_FORMAT_UINT64 (reg->address),
acpi_ut_get_region_name (reg->address_space_id)));
return (status);
......
......@@ -314,8 +314,8 @@ acpi_ns_lookup (
else {
prefix_node = scope_info->scope.node;
if (ACPI_GET_DESCRIPTOR_TYPE (prefix_node) != ACPI_DESC_TYPE_NAMED) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%p] Not a namespace node\n",
prefix_node));
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p Not a namespace node [%s]\n",
prefix_node, acpi_ut_get_descriptor_name (prefix_node)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
......@@ -379,7 +379,7 @@ acpi_ns_lookup (
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Searching relative to prefix scope [%4.4s] (%p)\n",
prefix_node->name.ascii, prefix_node));
acpi_ut_get_node_name (prefix_node), prefix_node));
/*
* Handle multiple Parent Prefixes (carat) by just getting
......@@ -413,7 +413,7 @@ acpi_ns_lookup (
if (search_parent_flag == ACPI_NS_NO_UPSEARCH) {
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Search scope is [%4.4s], path has %d carat(s)\n",
this_node->name.ascii, num_carats));
acpi_ut_get_node_name (this_node), num_carats));
}
}
......
......@@ -271,7 +271,7 @@ acpi_ns_install_node (
* alphabetic placement.
*/
previous_child_node = NULL;
while (acpi_ns_compare_names (child_node->name.ascii, node->name.ascii) < 0) {
while (acpi_ns_compare_names (acpi_ut_get_node_name (child_node), acpi_ut_get_node_name (node)) < 0) {
if (child_node->flags & ANOBJ_END_OF_PEER_LIST) {
/* Last peer; Clear end-of-list flag */
......@@ -335,8 +335,9 @@ acpi_ns_install_node (
node->type = (u8) type;
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s (%s) added to %4.4s (%s) %p at %p\n",
node->name.ascii, acpi_ut_get_type_name (node->type),
parent_node->name.ascii, acpi_ut_get_type_name (parent_node->type), parent_node, node));
acpi_ut_get_node_name (node), acpi_ut_get_type_name (node->type),
acpi_ut_get_node_name (parent_node), acpi_ut_get_type_name (parent_node->type),
parent_node, node));
/*
* Increment the reference count(s) of all parents up to
......
......@@ -50,8 +50,8 @@
#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME ("nsdump")
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
/*******************************************************************************
*
......@@ -76,7 +76,7 @@ acpi_ns_print_pathname (
return;
}
/* Print the entire name */
/* Print the entire name */
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "["));
......@@ -205,7 +205,7 @@ acpi_ns_dump_one_object (
* Now we can print out the pertinent information
*/
acpi_os_printf ("%4.4s %-12s %p ",
this_node->name.ascii, acpi_ut_get_type_name (type), this_node);
acpi_ut_get_node_name (this_node), acpi_ut_get_type_name (type), this_node);
dbg_level = acpi_dbg_level;
acpi_dbg_level = 0;
......@@ -250,8 +250,7 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_INTEGER:
acpi_os_printf ("= %8.8X%8.8X\n",
ACPI_HIDWORD (obj_desc->integer.value),
ACPI_LODWORD (obj_desc->integer.value));
ACPI_FORMAT_UINT64 (obj_desc->integer.value));
break;
......@@ -302,8 +301,7 @@ acpi_ns_dump_one_object (
acpi_os_printf ("[%s]", acpi_ut_get_region_name (obj_desc->region.space_id));
if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
acpi_os_printf (" Addr %8.8X%8.8X Len %.4X\n",
ACPI_HIDWORD (obj_desc->region.address),
ACPI_LODWORD (obj_desc->region.address),
ACPI_FORMAT_UINT64 (obj_desc->region.address),
obj_desc->region.length);
}
else {
......@@ -324,7 +322,7 @@ acpi_ns_dump_one_object (
if (obj_desc->buffer_field.buffer_obj &&
obj_desc->buffer_field.buffer_obj->buffer.node) {
acpi_os_printf ("Buf [%4.4s]",
obj_desc->buffer_field.buffer_obj->buffer.node->name.ascii);
acpi_ut_get_node_name (obj_desc->buffer_field.buffer_obj->buffer.node));
}
break;
......@@ -332,29 +330,29 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_LOCAL_REGION_FIELD:
acpi_os_printf ("Rgn [%4.4s]",
obj_desc->common_field.region_obj->region.node->name.ascii);
acpi_ut_get_node_name (obj_desc->common_field.region_obj->region.node));
break;
case ACPI_TYPE_LOCAL_BANK_FIELD:
acpi_os_printf ("Rgn [%4.4s] Bnk [%4.4s]",
obj_desc->common_field.region_obj->region.node->name.ascii,
obj_desc->bank_field.bank_obj->common_field.node->name.ascii);
acpi_ut_get_node_name (obj_desc->common_field.region_obj->region.node),
acpi_ut_get_node_name (obj_desc->bank_field.bank_obj->common_field.node));
break;
case ACPI_TYPE_LOCAL_INDEX_FIELD:
acpi_os_printf ("Idx [%4.4s] Dat [%4.4s]",
obj_desc->index_field.index_obj->common_field.node->name.ascii,
obj_desc->index_field.data_obj->common_field.node->name.ascii);
acpi_ut_get_node_name (obj_desc->index_field.index_obj->common_field.node),
acpi_ut_get_node_name (obj_desc->index_field.data_obj->common_field.node));
break;
case ACPI_TYPE_LOCAL_ALIAS:
acpi_os_printf ("Target %4.4s (%p)\n", ((struct acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
acpi_os_printf ("Target %4.4s (%p)\n", acpi_ut_get_node_name (obj_desc), obj_desc);
break;
default:
......@@ -371,7 +369,7 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD:
acpi_os_printf ("Off %.2X Len %.2X Acc %.2hd\n",
acpi_os_printf (" Off %.3X Len %.2X Acc %.2hd\n",
(obj_desc->common_field.base_byte_offset * 8)
+ obj_desc->common_field.start_field_bit_offset,
obj_desc->common_field.bit_length,
......@@ -408,8 +406,8 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_INTEGER:
acpi_os_printf (" N:%X%X\n", ACPI_HIDWORD(obj_desc->integer.value),
ACPI_LODWORD(obj_desc->integer.value));
acpi_os_printf (" I:%8.8X8.8%X\n",
ACPI_FORMAT_UINT64 (obj_desc->integer.value));
break;
case ACPI_TYPE_STRING:
......@@ -485,7 +483,8 @@ acpi_ns_dump_one_object (
default:
acpi_os_printf ("(String or Buffer ptr - not an object descriptor)\n");
acpi_os_printf ("(String or Buffer ptr - not an object descriptor) [%s]\n",
acpi_ut_get_descriptor_name (obj_desc));
bytes_to_dump = 16;
break;
}
......@@ -581,7 +580,6 @@ acpi_ns_dump_objects (
info.owner_id = owner_id;
info.display_type = display_type;
(void) acpi_ns_walk_namespace (type, start_handle, max_depth,
ACPI_NS_WALK_NO_UNLOCK, acpi_ns_dump_one_object,
(void *) &info, NULL);
......@@ -628,7 +626,6 @@ acpi_ns_dump_tables (
ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "\\\n"));
}
acpi_ns_dump_objects (ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, max_depth,
ACPI_UINT32_MAX, search_handle);
return_VOID;
......
......@@ -93,7 +93,7 @@ acpi_ns_dump_one_device (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, " HID: %s, ADR: %8.8X%8.8X, Status: %X\n",
info->hardware_id.value,
ACPI_HIDWORD (info->address), ACPI_LODWORD (info->address),
ACPI_FORMAT_UINT64 (info->address),
info->current_status));
ACPI_MEM_FREE (info);
}
......
......@@ -144,10 +144,17 @@ acpi_ns_initialize_devices (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Executing all Device _STA and_INI methods:"));
/* Walk namespace for all objects of type Device */
status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
/* Walk namespace for all objects of type Device or Processor */
status = acpi_ns_walk_namespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, FALSE, acpi_ns_init_one_device, &info, NULL);
status = acpi_ns_walk_namespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, TRUE, acpi_ns_init_one_device, &info, NULL);
(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "walk_namespace failed! %s\n",
......@@ -290,7 +297,8 @@ acpi_ns_init_one_object (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n"));
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Could not execute arguments for [%4.4s] (%s), %s\n",
node->name.ascii, acpi_ut_get_type_name (type), acpi_format_exception (status)));
acpi_ut_get_node_name (node), acpi_ut_get_type_name (type),
acpi_format_exception (status)));
}
/* Print a dot for each object unless we are going to print the entire pathname */
......@@ -338,45 +346,48 @@ acpi_ns_init_one_device (
ACPI_FUNCTION_TRACE ("ns_init_one_device");
if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && (!(acpi_dbg_level & ACPI_LV_INFO))) {
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
}
info->device_count++;
status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
node = acpi_ns_map_handle_to_node (obj_handle);
if (!node) {
(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
status = acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
/*
* We will run _STA/_INI on Devices and Processors only
*/
if ((node->type != ACPI_TYPE_DEVICE) &&
(node->type != ACPI_TYPE_PROCESSOR)) {
return_ACPI_STATUS (AE_OK);
}
if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && (!(acpi_dbg_level & ACPI_LV_INFO))) {
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
}
info->device_count++;
/*
* Run _STA to determine if we can run _INI on the device.
*/
ACPI_DEBUG_EXEC (acpi_ut_display_init_pathname (ACPI_TYPE_METHOD, node, "_STA"));
status = acpi_ut_execute_STA (node, &flags);
if (ACPI_FAILURE (status)) {
/* Ignore error and move on to next device */
if (node->type == ACPI_TYPE_DEVICE) {
/* Ignore error and move on to next device */
return_ACPI_STATUS (AE_OK);
}
return_ACPI_STATUS (AE_OK);
}
info->num_STA++;
/* _STA is not required for Processor objects */
}
else {
info->num_STA++;
if (!(flags & 0x01)) {
/* don't look at children of a not present device */
if (!(flags & 0x01)) {
/* Don't look at children of a not present device */
return_ACPI_STATUS(AE_CTRL_DEPTH);
return_ACPI_STATUS(AE_CTRL_DEPTH);
}
}
/*
......
......@@ -104,7 +104,8 @@ acpi_ns_attach_object (
if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) {
/* Not a name handle */
ACPI_REPORT_ERROR (("ns_attach_object: Invalid handle\n"));
ACPI_REPORT_ERROR (("ns_attach_object: Invalid handle %p [%s]\n",
node, acpi_ut_get_descriptor_name (node)));
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
......@@ -151,7 +152,7 @@ acpi_ns_attach_object (
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Installing %p into Node %p [%4.4s]\n",
obj_desc, node, node->name.ascii));
obj_desc, node, acpi_ut_get_node_name (node)));
/* Detach an existing attached object if present */
......@@ -234,7 +235,7 @@ acpi_ns_detach_object (
node->type = ACPI_TYPE_ANY;
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Node %p [%4.4s] Object %p\n",
node, node->name.ascii, obj_desc));
node, acpi_ut_get_node_name (node), obj_desc));
/* Remove one reference on the object (and all subobjects) */
......
......@@ -119,7 +119,7 @@ acpi_ns_search_node (
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n",
(char *) &target_name, acpi_ut_get_type_name (next_node->type),
next_node, node->name.ascii, node));
next_node, acpi_ut_get_node_name (node), node));
*return_node = next_node;
return_ACPI_STATUS (AE_OK);
......@@ -145,7 +145,7 @@ acpi_ns_search_node (
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Name [%4.4s] (%s) not found in search in scope [%4.4s] %p first child %p\n",
(char *) &target_name, acpi_ut_get_type_name (type),
node->name.ascii, node, node->child));
acpi_ut_get_node_name (node), node, node->child));
return_ACPI_STATUS (AE_NOT_FOUND);
}
......
......@@ -977,8 +977,8 @@ acpi_ns_find_parent_name (
parent_node = acpi_ns_get_parent_node (child_node);
if (parent_node) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Parent of %p [%4.4s] is %p [%4.4s]\n",
child_node, child_node->name.ascii,
parent_node, parent_node->name.ascii));
child_node, acpi_ut_get_node_name (child_node),
parent_node, acpi_ut_get_node_name (parent_node)));
if (parent_node->name.integer) {
return_VALUE ((acpi_name) parent_node->name.integer);
......@@ -986,7 +986,7 @@ acpi_ns_find_parent_name (
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "unable to find parent of %p (%4.4s)\n",
child_node, child_node->name.ascii));
child_node, acpi_ut_get_node_name (child_node)));
}
return_VALUE (ACPI_UNKNOWN_NAME);
......
......@@ -199,7 +199,7 @@ acpi_get_name (
/* Just copy the ACPI name from the Node and zero terminate it */
ACPI_STRNCPY (buffer->pointer, node->name.ascii,
ACPI_STRNCPY (buffer->pointer, acpi_ut_get_node_name (node),
ACPI_NAME_SIZE);
((char *) buffer->pointer) [ACPI_NAME_SIZE] = 0;
status = AE_OK;
......
......@@ -490,7 +490,7 @@ union acpi_parse_object *
acpi_ps_get_next_field (
struct acpi_parse_state *parser_state)
{
u32 aml_offset = ACPI_PTR_DIFF (parser_state->aml,
u32 aml_offset = (u32) ACPI_PTR_DIFF (parser_state->aml,
parser_state->aml_start);
union acpi_parse_object *field;
u16 opcode;
......@@ -677,7 +677,7 @@ acpi_ps_get_next_arg (
/* Fill in bytelist data */
arg->common.value.size = ACPI_PTR_DIFF (parser_state->pkg_end,
arg->common.value.size = (u32) ACPI_PTR_DIFF (parser_state->pkg_end,
parser_state->aml);
arg->named.data = parser_state->aml;
......
......@@ -498,7 +498,7 @@ acpi_ps_parse_loop (
if (!op) {
/* Get the next opcode from the AML stream */
walk_state->aml_offset = ACPI_PTR_DIFF (parser_state->aml,
walk_state->aml_offset = (u32) ACPI_PTR_DIFF (parser_state->aml,
parser_state->aml_start);
walk_state->opcode = acpi_ps_peek_opcode (parser_state);
......@@ -710,7 +710,7 @@ acpi_ps_parse_loop (
while (GET_CURRENT_ARG_TYPE (walk_state->arg_types) &&
!walk_state->arg_count) {
walk_state->aml_offset = ACPI_PTR_DIFF (parser_state->aml,
walk_state->aml_offset = (u32) ACPI_PTR_DIFF (parser_state->aml,
parser_state->aml_start);
status = acpi_ps_get_next_arg (walk_state, parser_state,
GET_CURRENT_ARG_TYPE (walk_state->arg_types), &arg);
......
......@@ -696,7 +696,7 @@ acpi_rs_get_list_length (
default:
/*
* If we get here, everything is out of sync,
* so exit with an error
* exit with an error
*/
return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
}
......@@ -704,7 +704,7 @@ acpi_rs_get_list_length (
/*
* Update the return value and counter
*/
buffer_size += ACPI_ALIGN_RESOURCE_SIZE(structure_size);
buffer_size += (u32) ACPI_ALIGN_RESOURCE_SIZE (structure_size);
bytes_parsed += bytes_consumed;
/*
......
......@@ -331,7 +331,7 @@ acpi_rs_create_pci_routing_table (
/* Now align the current length */
user_prt->length = ACPI_ROUND_UP_to_64_bITS (user_prt->length);
user_prt->length = (u32) ACPI_ROUND_UP_to_64_bITS (user_prt->length);
/*
* 4) Fourth subobject: Dereference the PRT.source_index
......
......@@ -899,24 +899,19 @@ acpi_rs_dump_address64 (
"" : "not ");
acpi_os_printf (" Granularity: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->granularity),
ACPI_LODWORD (address64_data->granularity));
ACPI_FORMAT_UINT64 (address64_data->granularity));
acpi_os_printf (" Address range min: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->min_address_range),
ACPI_HIDWORD (address64_data->min_address_range));
ACPI_FORMAT_UINT64 (address64_data->min_address_range));
acpi_os_printf (" Address range max: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->max_address_range),
ACPI_HIDWORD (address64_data->max_address_range));
ACPI_FORMAT_UINT64 (address64_data->max_address_range));
acpi_os_printf (" Address translation offset: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->address_translation_offset),
ACPI_HIDWORD (address64_data->address_translation_offset));
ACPI_FORMAT_UINT64 (address64_data->address_translation_offset));
acpi_os_printf (" Address Length: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->address_length),
ACPI_HIDWORD (address64_data->address_length));
ACPI_FORMAT_UINT64 (address64_data->address_length));
if(0xFF != address64_data->resource_source.index) {
acpi_os_printf (" Resource Source Index: %X\n",
......@@ -1126,8 +1121,7 @@ acpi_rs_dump_irq_list (
acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
acpi_os_printf (" Address: %8.8X%8.8X\n",
ACPI_HIDWORD (prt_element->address),
ACPI_LODWORD (prt_element->address));
ACPI_FORMAT_UINT64 (prt_element->address));
acpi_os_printf (" Pin: %X\n", prt_element->pin);
......
......@@ -312,8 +312,8 @@ acpi_rs_byte_stream_to_list (
* Set the Buffer to the next structure
*/
resource = ACPI_CAST_PTR (struct acpi_resource, buffer);
resource->length = ACPI_ALIGN_RESOURCE_SIZE(resource->length);
buffer += ACPI_ALIGN_RESOURCE_SIZE(structure_size);
resource->length = (u32) ACPI_ALIGN_RESOURCE_SIZE (resource->length);
buffer += ACPI_ALIGN_RESOURCE_SIZE (structure_size);
} /* end while */
......
......@@ -148,8 +148,7 @@ acpi_tb_get_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_HIDWORD (address->pointer.physical),
ACPI_LODWORD (address->pointer.physical),
ACPI_FORMAT_UINT64 (address->pointer.physical),
sizeof (struct acpi_table_header)));
return_ACPI_STATUS (status);
}
......@@ -365,8 +364,7 @@ acpi_tb_get_this_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_HIDWORD (address->pointer.physical),
ACPI_LODWORD (address->pointer.physical), header->length));
ACPI_FORMAT_UINT64 (address->pointer.physical), header->length));
return (status);
}
......@@ -408,8 +406,7 @@ acpi_tb_get_this_table (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Found table [%4.4s] at %8.8X%8.8X, mapped/copied to %p\n",
full_table->signature,
ACPI_HIDWORD (address->pointer.physical),
ACPI_LODWORD (address->pointer.physical), full_table));
ACPI_FORMAT_UINT64 (address->pointer.physical), full_table));
return_ACPI_STATUS (status);
}
......
......@@ -240,8 +240,7 @@ acpi_tb_get_required_tables (
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_HIDWORD (address.pointer.value),
ACPI_LODWORD (address.pointer.value)));
ACPI_FORMAT_UINT64 (address.pointer.value)));
}
}
......
......@@ -278,8 +278,7 @@ acpi_tb_get_table_rsdt (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"RSDP located at %p, points to RSDT physical=%8.8X%8.8X \n",
acpi_gbl_RSDP,
ACPI_HIDWORD (address.pointer.value),
ACPI_LODWORD (address.pointer.value)));
ACPI_FORMAT_UINT64 (address.pointer.value)));
/* Check the RSDT or XSDT signature */
......
......@@ -251,7 +251,7 @@ acpi_unload_table (
/* Find all tables of the requested type */
table_desc = acpi_gbl_table_lists[table_type].next;
while (table_desc); {
while (table_desc) {
/*
* Delete all namespace entries owned by this table. Note that these
* entries can appear anywhere in the namespace by virtue of the AML
......
......@@ -211,8 +211,7 @@ acpi_get_firmware_table (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"RSDP located at %p, RSDT physical=%8.8X%8.8X \n",
acpi_gbl_RSDP,
ACPI_HIDWORD (address.pointer.value),
ACPI_LODWORD (address.pointer.value)));
ACPI_FORMAT_UINT64 (address.pointer.value)));
/* Insert processor_mode flags */
......
......@@ -902,71 +902,30 @@ acpi_ut_dump_allocations (
descriptor = ACPI_CAST_PTR (union acpi_descriptor, &element->user_space);
if (descriptor->descriptor_id != ACPI_DESC_TYPE_CACHED) {
acpi_os_printf ("%p Len %04X %9.9s-%d ",
acpi_os_printf ("%p Len %04X %9.9s-%d [%s] ",
descriptor, element->size, element->module,
element->line);
element->line, acpi_ut_get_descriptor_name (descriptor));
/* Most of the elements will be internal objects. */
/* Most of the elements will be Operand objects. */
switch (ACPI_GET_DESCRIPTOR_TYPE (descriptor)) {
case ACPI_DESC_TYPE_OPERAND:
acpi_os_printf ("obj_type %12.12s R%hd",
acpi_os_printf ("%12.12s R%hd",
acpi_ut_get_type_name (descriptor->object.common.type),
descriptor->object.common.reference_count);
break;
case ACPI_DESC_TYPE_PARSER:
acpi_os_printf ("parse_obj aml_opcode %04hX",
acpi_os_printf ("aml_opcode %04hX",
descriptor->op.asl.aml_opcode);
break;
case ACPI_DESC_TYPE_NAMED:
acpi_os_printf ("Node %4.4s",
descriptor->node.name.ascii);
break;
case ACPI_DESC_TYPE_STATE:
acpi_os_printf ("Untyped state_obj");
break;
case ACPI_DESC_TYPE_STATE_UPDATE:
acpi_os_printf ("UPDATE state_obj");
break;
case ACPI_DESC_TYPE_STATE_PACKAGE:
acpi_os_printf ("PACKAGE state_obj");
break;
case ACPI_DESC_TYPE_STATE_CONTROL:
acpi_os_printf ("CONTROL state_obj");
break;
case ACPI_DESC_TYPE_STATE_RPSCOPE:
acpi_os_printf ("ROOT-PARSE-SCOPE state_obj");
break;
case ACPI_DESC_TYPE_STATE_PSCOPE:
acpi_os_printf ("PARSE-SCOPE state_obj");
break;
case ACPI_DESC_TYPE_STATE_WSCOPE:
acpi_os_printf ("WALK-SCOPE state_obj");
break;
case ACPI_DESC_TYPE_STATE_RESULT:
acpi_os_printf ("RESULT state_obj");
break;
case ACPI_DESC_TYPE_STATE_NOTIFY:
acpi_os_printf ("NOTIFY state_obj");
break;
case ACPI_DESC_TYPE_STATE_THREAD:
acpi_os_printf ("THREAD state_obj");
acpi_os_printf ("%4.4s",
acpi_ut_get_node_name (&descriptor->node));
break;
default:
/* All types should appear above */
break;
}
......
......@@ -447,7 +447,7 @@ acpi_ut_value_exit (
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
"%s %8.8X%8.8X\n", acpi_gbl_fn_exit_str,
ACPI_HIDWORD (value), ACPI_LODWORD (value));
ACPI_FORMAT_UINT64 (value));
acpi_gbl_nesting_level--;
}
......
......@@ -91,7 +91,7 @@ acpi_ut_evaluate_object (
if (ACPI_FAILURE (status)) {
if (status == AE_NOT_FOUND) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s.%s] was not found\n",
prefix_node->name.ascii, path));
acpi_ut_get_node_name (prefix_node), path));
}
else {
ACPI_REPORT_METHOD_ERROR ("Method execution failed",
......@@ -544,7 +544,7 @@ acpi_ut_execute_STA (
if (AE_NOT_FOUND == status) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"_STA on %4.4s was not found, assuming device is present\n",
device_node->name.ascii));
acpi_ut_get_node_name (device_node)));
*flags = 0x0F;
status = AE_OK;
......
......@@ -358,7 +358,7 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVE
/* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_LOCK_STATUS, ACPI_BITREG_GLOBAL_LOCK_ENABLE, ACPI_BITMASK_GLOBAL_LOCK_STATUS, ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
/* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS, ACPI_BITREG_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_STATUS, ACPI_BITMASK_POWER_BUTTON_ENABLE},
/* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
/* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, 0, 0},
/* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_ENABLE},
};
/*****************************************************************************
......@@ -534,6 +534,99 @@ acpi_ut_get_object_type_name (
}
/*****************************************************************************
*
* FUNCTION: acpi_ut_get_node_name
*
* PARAMETERS: Object - A namespace node
*
* RETURN: Pointer to a string
*
* DESCRIPTION: Validate the node and return the node's ACPI name.
*
****************************************************************************/
char *
acpi_ut_get_node_name (
void *object)
{
struct acpi_namespace_node *node;
if (!object)
{
return ("NULL NODE");
}
node = (struct acpi_namespace_node *) object;
if (node->descriptor != ACPI_DESC_TYPE_NAMED)
{
return ("INVALID NODE");
}
if (!acpi_ut_valid_acpi_name (* (u32 *) node->name.ascii))
{
return ("INVALID NODE NAME");
}
return (node->name.ascii);
}
/*****************************************************************************
*
* FUNCTION: acpi_ut_get_descriptor_name
*
* PARAMETERS: Object - An ACPI object
*
* RETURN: Pointer to a string
*
* DESCRIPTION: Validate object and return the descriptor type
*
****************************************************************************/
static const char *acpi_gbl_desc_type_names[] = /* printable names of descriptor types */
{
/* 00 */ "Invalid",
/* 01 */ "Cached",
/* 02 */ "State-Generic",
/* 03 */ "State-Update",
/* 04 */ "State-Package",
/* 05 */ "State-Control",
/* 06 */ "State-root_parse_scope",
/* 07 */ "State-parse_scope",
/* 08 */ "State-walk_scope",
/* 09 */ "State-Result",
/* 10 */ "State-Notify",
/* 11 */ "State-Thread",
/* 12 */ "Walk",
/* 13 */ "Parser",
/* 14 */ "Operand",
/* 15 */ "Node"
};
char *
acpi_ut_get_descriptor_name (
void *object)
{
if (!object)
{
return ("NULL OBJECT");
}
if (ACPI_GET_DESCRIPTOR_TYPE (object) > ACPI_DESC_TYPE_MAX)
{
return ((char *) acpi_gbl_bad_type);
}
return ((char *) acpi_gbl_desc_type_names[ACPI_GET_DESCRIPTOR_TYPE (object)]);
}
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
/*
* Strings and procedures used for debug only
......
......@@ -223,29 +223,10 @@ acpi_ut_valid_internal_object (
return (TRUE);
case ACPI_DESC_TYPE_NAMED:
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"**** Obj %p is a named obj, not ACPI obj\n", object));
break;
case ACPI_DESC_TYPE_PARSER:
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"**** Obj %p is a parser obj, not ACPI obj\n", object));
break;
case ACPI_DESC_TYPE_CACHED:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"**** Obj %p has already been released to internal cache\n", object));
break;
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"**** Obj %p has unknown descriptor type %X\n", object,
ACPI_GET_DESCRIPTOR_TYPE (object)));
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"%p is not not an ACPI operand obj [%s]\n",
object, acpi_ut_get_descriptor_name (object)));
break;
}
......@@ -322,7 +303,8 @@ acpi_ut_delete_object_desc (
if (ACPI_GET_DESCRIPTOR_TYPE (object) != ACPI_DESC_TYPE_OPERAND) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Obj %p is not an ACPI object\n", object));
"%p is not an ACPI Operand object [%s]\n", object,
acpi_ut_get_descriptor_name (object)));
return_VOID;
}
......
......@@ -64,7 +64,7 @@
/* Version string */
#define ACPI_CA_VERSION 0x20031002
#define ACPI_CA_VERSION 0x20031029
/* Maximum objects in the various object caches */
......
......@@ -48,7 +48,6 @@
/*
* Data manipulation macros
*/
#define ACPI_LOWORD(l) ((u16)(u32)(l))
#define ACPI_HIWORD(l) ((u16)((((u32)(l)) >> 16) & 0xFFFF))
#define ACPI_LOBYTE(l) ((u8)(u16)(l))
......@@ -94,10 +93,18 @@
#endif
#endif
/*
* Extract a byte of data using a pointer. Any more than a byte and we
* get into potential aligment issues -- see the STORE macros below
*/
/*
* printf() format helpers
*/
/* Split 64-bit integer into two 32-bit values. use with %8,8_x%8.8X */
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i)
/*
* Extract a byte of data using a pointer. Any more than a byte and we
* get into potential aligment issues -- see the STORE macros below
*/
#define ACPI_GET8(addr) (*(u8*)(addr))
/* Pointer arithmetic */
......@@ -129,7 +136,6 @@
* If the hardware supports the transfer of unaligned data, just do the store.
* Otherwise, we have to move one byte at a time.
*/
#ifdef ACPI_BIG_ENDIAN
/*
* Macros for big-endian machines
......@@ -299,7 +305,6 @@
/*
* Fast power-of-two math macros for non-optimized compilers
*/
#define _ACPI_DIV(value,power_of2) ((u32) ((value) >> (power_of2)))
#define _ACPI_MUL(value,power_of2) ((u32) ((value) << (power_of2)))
#define _ACPI_MOD(value,divisor) ((u32) ((value) & ((divisor) -1)))
......@@ -443,7 +448,6 @@
/*
* Reporting macros that are never compiled out
*/
#define ACPI_PARAM_LIST(pl) pl
/*
......@@ -451,7 +455,6 @@
* _THIS_MODULE gets compiled out when ACPI_DEBUG_OUTPUT isn't defined, only
* use it in debug mode.
*/
#ifdef ACPI_DEBUG_OUTPUT
#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_THIS_MODULE,__LINE__,_COMPONENT); \
......@@ -490,7 +493,6 @@
/*
* Debug macros that are conditionally compiled
*/
#ifdef ACPI_DEBUG_OUTPUT
#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_THIS_MODULE = name;
......@@ -500,7 +502,6 @@
* The first parameter should be the procedure name as a quoted string. This is declared
* as a local string ("_proc_name) so that it can be also used by the function exit macros below.
*/
#define ACPI_FUNCTION_NAME(a) struct acpi_debug_print_info _dbg; \
_dbg.component_id = _COMPONENT; \
_dbg.proc_name = a; \
......@@ -562,7 +563,6 @@
/*
* 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) \
......@@ -577,7 +577,6 @@
* 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)
......@@ -587,7 +586,6 @@
* This is the non-debug case -- make everything go away,
* leaving no executable debug code!
*/
#define ACPI_MODULE_NAME(name)
#define _THIS_MODULE ""
......@@ -662,7 +660,6 @@
/*
* Memory allocation tracking (DEBUG ONLY)
*/
#ifndef ACPI_DBG_TRACK_ALLOCATIONS
/* Memory allocation */
......
......@@ -464,21 +464,22 @@ union acpi_operand_object
/* Object descriptor types */
#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
#define ACPI_DESC_TYPE_STATE 0x20
#define ACPI_DESC_TYPE_STATE_UPDATE 0x21
#define ACPI_DESC_TYPE_STATE_PACKAGE 0x22
#define ACPI_DESC_TYPE_STATE_CONTROL 0x23
#define ACPI_DESC_TYPE_STATE_RPSCOPE 0x24
#define ACPI_DESC_TYPE_STATE_PSCOPE 0x25
#define ACPI_DESC_TYPE_STATE_WSCOPE 0x26
#define ACPI_DESC_TYPE_STATE_RESULT 0x27
#define ACPI_DESC_TYPE_STATE_NOTIFY 0x28
#define ACPI_DESC_TYPE_STATE_THREAD 0x29
#define ACPI_DESC_TYPE_WALK 0x44
#define ACPI_DESC_TYPE_PARSER 0x66
#define ACPI_DESC_TYPE_OPERAND 0x88
#define ACPI_DESC_TYPE_NAMED 0xAA
#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
#define ACPI_DESC_TYPE_STATE 0x02
#define ACPI_DESC_TYPE_STATE_UPDATE 0x03
#define ACPI_DESC_TYPE_STATE_PACKAGE 0x04
#define ACPI_DESC_TYPE_STATE_CONTROL 0x05
#define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06
#define ACPI_DESC_TYPE_STATE_PSCOPE 0x07
#define ACPI_DESC_TYPE_STATE_WSCOPE 0x08
#define ACPI_DESC_TYPE_STATE_RESULT 0x09
#define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A
#define ACPI_DESC_TYPE_STATE_THREAD 0x0B
#define ACPI_DESC_TYPE_WALK 0x0C
#define ACPI_DESC_TYPE_PARSER 0x0D
#define ACPI_DESC_TYPE_OPERAND 0x0E
#define ACPI_DESC_TYPE_NAMED 0x0F
#define ACPI_DESC_TYPE_MAX 0x0F
union acpi_descriptor
......
......@@ -124,6 +124,14 @@ char *
acpi_ut_get_type_name (
acpi_object_type type);
char *
acpi_ut_get_node_name (
void *object);
char *
acpi_ut_get_descriptor_name (
void *object);
char *
acpi_ut_get_object_type_name (
union acpi_operand_object *obj_desc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment