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 ( ...@@ -106,7 +106,7 @@ acpi_ds_init_one_object (
status = acpi_ds_initialize_region (obj_handle); status = acpi_ds_initialize_region (obj_handle);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Region %p [%4.4s] - Init failure, %s\n", 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))); acpi_format_exception (status)));
} }
...@@ -141,7 +141,7 @@ acpi_ds_init_one_object ( ...@@ -141,7 +141,7 @@ acpi_ds_init_one_object (
status = acpi_ds_parse_method (obj_handle); status = acpi_ds_parse_method (obj_handle);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n", 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))); acpi_format_exception (status)));
/* This parse failed, but we will continue parsing more methods */ /* This parse failed, but we will continue parsing more methods */
......
...@@ -94,7 +94,7 @@ acpi_ds_parse_method ( ...@@ -94,7 +94,7 @@ acpi_ds_parse_method (
} }
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Parsing [%4.4s] **** named_obj=%p\n", 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 */ /* Extract the method object from the method Node */
...@@ -169,7 +169,7 @@ acpi_ds_parse_method ( ...@@ -169,7 +169,7 @@ acpi_ds_parse_method (
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"**** [%4.4s] Parsed **** named_obj=%p Op=%p\n", "**** [%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); acpi_ps_delete_parse_tree (op);
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
......
...@@ -624,8 +624,8 @@ acpi_ds_store_object_to_local ( ...@@ -624,8 +624,8 @@ acpi_ds_store_object_to_local (
* operand objects of type Reference. * operand objects of type Reference.
*/ */
if (ACPI_GET_DESCRIPTOR_TYPE (current_obj_desc) != ACPI_DESC_TYPE_OPERAND) { 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", ACPI_REPORT_ERROR (("Invalid descriptor type while storing to method arg: [%s]\n",
current_obj_desc->common.type)); acpi_ut_get_descriptor_name (current_obj_desc)));
return_ACPI_STATUS (AE_AML_INTERNAL); return_ACPI_STATUS (AE_AML_INTERNAL);
} }
......
...@@ -201,7 +201,7 @@ acpi_ds_get_buffer_field_arguments ( ...@@ -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_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", 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 */ /* Execute the AML code for the term_arg arguments */
...@@ -346,7 +346,7 @@ acpi_ds_get_region_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_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", 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 */ /* Execute the argument AML */
...@@ -438,8 +438,8 @@ acpi_ds_init_buffer_field ( ...@@ -438,8 +438,8 @@ acpi_ds_init_buffer_field (
* after resolution in acpi_ex_resolve_operands(). * after resolution in acpi_ex_resolve_operands().
*/ */
if (ACPI_GET_DESCRIPTOR_TYPE (result_desc) != ACPI_DESC_TYPE_NAMED) { 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_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) destination not a NS Node [%s]\n",
acpi_ps_get_opcode_name (aml_opcode))); acpi_ps_get_opcode_name (aml_opcode), acpi_ut_get_descriptor_name (result_desc)));
status = AE_AML_OPERAND_TYPE; status = AE_AML_OPERAND_TYPE;
goto cleanup; goto cleanup;
...@@ -520,9 +520,9 @@ acpi_ds_init_buffer_field ( ...@@ -520,9 +520,9 @@ acpi_ds_init_buffer_field (
(8 * (u32) buffer_desc->buffer.length)) { (8 * (u32) buffer_desc->buffer.length)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n", "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, 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)); 8 * (u32) buffer_desc->buffer.length));
status = AE_AML_BUFFER_LIMIT; status = AE_AML_BUFFER_LIMIT;
goto cleanup; goto cleanup;
...@@ -744,7 +744,7 @@ acpi_ds_eval_region_operands ( ...@@ -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", ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "rgn_obj %p Addr %8.8X%8.8X Len %X\n",
obj_desc, 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)); obj_desc->region.length));
/* Now the address and length are valid for this opregion */ /* Now the address and length are valid for this opregion */
......
...@@ -415,12 +415,26 @@ acpi_ds_exec_end_op ( ...@@ -415,12 +415,26 @@ acpi_ds_exec_end_op (
*/ */
status = acpi_gbl_op_type_dispatch [op_type] (walk_state); status = acpi_gbl_op_type_dispatch [op_type] (walk_state);
} }
else {
/*
* 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 { else {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"[%s]: Could not resolve operands, %s\n", "[%s]: Could not resolve operands, %s\n",
acpi_ps_get_opcode_name (walk_state->opcode), acpi_ps_get_opcode_name (walk_state->opcode),
acpi_format_exception (status))); acpi_format_exception (status)));
} }
}
/* Always delete the argument objects and clear the operand stack */ /* Always delete the argument objects and clear the operand stack */
......
...@@ -146,7 +146,7 @@ acpi_ds_scope_stack_push ( ...@@ -146,7 +146,7 @@ acpi_ds_scope_stack_push (
if (old_scope_info) { if (old_scope_info) {
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
"[%4.4s] (%s)", "[%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))); acpi_ut_get_type_name (old_scope_info->common.value)));
} }
else { else {
...@@ -156,7 +156,7 @@ acpi_ds_scope_stack_push ( ...@@ -156,7 +156,7 @@ acpi_ds_scope_stack_push (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
", New scope -> [%4.4s] (%s)\n", ", 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))); acpi_ut_get_type_name (scope_info->common.value)));
/* Push new scope object onto stack */ /* Push new scope object onto stack */
...@@ -207,14 +207,14 @@ acpi_ds_scope_stack_pop ( ...@@ -207,14 +207,14 @@ acpi_ds_scope_stack_pop (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"[%.2d] Popped scope [%4.4s] (%s), New scope -> ", "[%.2d] Popped scope [%4.4s] (%s), New scope -> ",
(u32) walk_state->scope_depth, (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))); acpi_ut_get_type_name (scope_info->common.value)));
new_scope_info = walk_state->scope_info; new_scope_info = walk_state->scope_info;
if (new_scope_info) { if (new_scope_info) {
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
"[%4.4s] (%s)\n", "[%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))); acpi_ut_get_type_name (new_scope_info->common.value)));
} }
else { else {
......
...@@ -139,12 +139,10 @@ acpi_ev_gpe_detect ( ...@@ -139,12 +139,10 @@ acpi_ev_gpe_detect (
{ {
u32 int_status = ACPI_INTERRUPT_NOT_HANDLED; u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
u8 enabled_status_byte; u8 enabled_status_byte;
u8 bit_mask;
struct acpi_gpe_register_info *gpe_register_info; struct acpi_gpe_register_info *gpe_register_info;
u32 in_value; u32 in_value;
acpi_status status; acpi_status status;
struct acpi_gpe_block_info *gpe_block; struct acpi_gpe_block_info *gpe_block;
u32 gpe_number;
u32 i; u32 i;
u32 j; u32 j;
...@@ -187,11 +185,9 @@ acpi_ev_gpe_detect ( ...@@ -187,11 +185,9 @@ acpi_ev_gpe_detect (
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
"GPE pair: Status %8.8X%8.8X = %02X, Enable %8.8X%8.8X = %02X\n", "GPE pair: Status %8.8X%8.8X = %02X, Enable %8.8X%8.8X = %02X\n",
ACPI_HIDWORD (gpe_register_info->status_address.address), ACPI_FORMAT_UINT64 (gpe_register_info->status_address.address),
ACPI_LODWORD (gpe_register_info->status_address.address),
gpe_register_info->status, gpe_register_info->status,
ACPI_HIDWORD (gpe_register_info->enable_address.address), ACPI_FORMAT_UINT64 (gpe_register_info->enable_address.address),
ACPI_LODWORD (gpe_register_info->enable_address.address),
gpe_register_info->enable)); gpe_register_info->enable));
/* First check if there is anything active at all in this register */ /* First check if there is anything active at all in this register */
...@@ -206,19 +202,17 @@ acpi_ev_gpe_detect ( ...@@ -206,19 +202,17 @@ acpi_ev_gpe_detect (
/* Now look at the individual GPEs in this byte register */ /* 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 */ /* 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 * Found an active GPE. Dispatch the event to a handler
* or method. * or method.
*/ */
gpe_number = (i * ACPI_GPE_REGISTER_WIDTH) + j;
int_status |= acpi_ev_gpe_dispatch ( int_status |= acpi_ev_gpe_dispatch (
&gpe_block->event_info[gpe_number], &gpe_block->event_info[(i * ACPI_GPE_REGISTER_WIDTH) + j],
gpe_number + gpe_block->register_info[gpe_number].base_gpe_number); j + gpe_register_info->base_gpe_number);
} }
} }
} }
...@@ -294,7 +288,7 @@ acpi_ev_asynch_execute_gpe_method ( ...@@ -294,7 +288,7 @@ acpi_ev_asynch_execute_gpe_method (
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("%s while evaluating method [%4.4s] for GPE[%2X]\n", ACPI_REPORT_ERROR (("%s while evaluating method [%4.4s] for GPE[%2X]\n",
acpi_format_exception (status), 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 ( ...@@ -367,6 +361,18 @@ acpi_ev_gpe_dispatch (
/* Invoke the installed handler (at interrupt level) */ /* Invoke the installed handler (at interrupt level) */
gpe_event_info->handler (gpe_event_info->context); 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) { else if (gpe_event_info->method_node) {
/* /*
...@@ -375,13 +381,16 @@ acpi_ev_gpe_dispatch ( ...@@ -375,13 +381,16 @@ acpi_ev_gpe_dispatch (
*/ */
status = acpi_hw_disable_gpe (gpe_event_info); status = acpi_hw_disable_gpe (gpe_event_info);
if (ACPI_FAILURE (status)) { 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)); gpe_number));
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); 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, if (ACPI_FAILURE (acpi_os_queue_for_execution (OSD_PRIORITY_GPE,
acpi_ev_asynch_execute_gpe_method, acpi_ev_asynch_execute_gpe_method,
gpe_event_info))) { gpe_event_info))) {
...@@ -399,22 +408,12 @@ acpi_ev_gpe_dispatch ( ...@@ -399,22 +408,12 @@ acpi_ev_gpe_dispatch (
/* /*
* Disable the GPE. The GPE will remain disabled until the ACPI * 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); status = acpi_hw_disable_gpe (gpe_event_info);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("acpi_ev_gpe_dispatch: Unable to disable GPE[%2X]\n", ACPI_REPORT_ERROR ((
gpe_number)); "acpi_ev_gpe_dispatch: Unable to disable GPE[%2X]\n",
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",
gpe_number)); gpe_number));
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
} }
......
...@@ -743,8 +743,7 @@ acpi_ev_create_gpe_block ( ...@@ -743,8 +743,7 @@ acpi_ev_create_gpe_block (
((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)), ((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)),
gpe_device->name.ascii, gpe_device->name.ascii,
gpe_block->register_count, gpe_block->register_count,
ACPI_HIDWORD (gpe_block->block_address.address), ACPI_FORMAT_UINT64 (gpe_block->block_address.address),
ACPI_LODWORD (gpe_block->block_address.address),
interrupt_level)); interrupt_level));
/* Find all GPE methods (_Lxx, _Exx) for this block */ /* Find all GPE methods (_Lxx, _Exx) for this block */
......
...@@ -195,7 +195,8 @@ acpi_ev_queue_notify_request ( ...@@ -195,7 +195,8 @@ acpi_ev_queue_notify_request (
/* There is no per-device notify handler for this device */ /* There is no per-device notify handler for this device */
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 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); return (status);
......
...@@ -321,7 +321,7 @@ acpi_ev_address_space_dispatch ( ...@@ -321,7 +321,7 @@ acpi_ev_address_space_dispatch (
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION, ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n", "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
&region_obj->region.address_space->address_space, handler, &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))); acpi_ut_get_region_name (region_obj->region.space_id)));
if (!(handler_desc->address_space.flags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) { if (!(handler_desc->address_space.flags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) {
......
...@@ -239,7 +239,7 @@ acpi_ev_pci_config_region_setup ( ...@@ -239,7 +239,7 @@ acpi_ev_pci_config_region_setup (
else { else {
ACPI_REPORT_ERROR (( ACPI_REPORT_ERROR ((
"Could not install pci_config handler for Root Bridge %4.4s, %s\n", "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; break;
......
...@@ -240,7 +240,8 @@ acpi_install_address_space_handler ( ...@@ -240,7 +240,8 @@ acpi_install_address_space_handler (
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION, ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Installing address handler for region %s(%X) on Device %4.4s %p(%p)\n", "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 * Install the handler
......
...@@ -89,22 +89,22 @@ acpi_ex_dump_operand ( ...@@ -89,22 +89,22 @@ acpi_ex_dump_operand (
if (!obj_desc) { if (!obj_desc) {
/* /*
* This usually indicates that something serious is wrong -- * This usually indicates that something serious is wrong
* since most (if not all)
* code that dumps the stack expects something to be there!
*/ */
acpi_os_printf ("Null stack entry ptr\n"); acpi_os_printf ("Null Object Descriptor\n");
return; return;
} }
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) { 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); ACPI_DUMP_ENTRY (obj_desc, ACPI_LV_EXEC);
return; return;
} }
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) { 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)); ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object));
return; return;
} }
...@@ -151,11 +151,10 @@ acpi_ex_dump_operand ( ...@@ -151,11 +151,10 @@ acpi_ex_dump_operand (
obj_desc->reference.offset); obj_desc->reference.offset);
if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) { 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_os_printf (" value is [%8.8X%8.8x]",
ACPI_HIDWORD(obj_desc->integer.value), ACPI_FORMAT_UINT64 (obj_desc->integer.value));
ACPI_LODWORD(obj_desc->integer.value));
} }
acpi_os_printf ("\n"); acpi_os_printf ("\n");
...@@ -169,11 +168,10 @@ acpi_ex_dump_operand ( ...@@ -169,11 +168,10 @@ acpi_ex_dump_operand (
if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) { 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_os_printf (" value is [%8.8X%8.8x]",
ACPI_HIDWORD(obj_desc->integer.value), ACPI_FORMAT_UINT64 (obj_desc->integer.value));
ACPI_LODWORD(obj_desc->integer.value));
} }
acpi_os_printf ("\n"); acpi_os_printf ("\n");
...@@ -189,7 +187,7 @@ acpi_ex_dump_operand ( ...@@ -189,7 +187,7 @@ acpi_ex_dump_operand (
default: default:
/* unknown opcode */ /* Unknown opcode */
acpi_os_printf ("Unknown Reference opcode=%X\n", acpi_os_printf ("Unknown Reference opcode=%X\n",
obj_desc->reference.opcode); obj_desc->reference.opcode);
...@@ -229,8 +227,7 @@ acpi_ex_dump_operand ( ...@@ -229,8 +227,7 @@ acpi_ex_dump_operand (
case ACPI_TYPE_INTEGER: case ACPI_TYPE_INTEGER:
acpi_os_printf ("Integer %8.8X%8.8X\n", acpi_os_printf ("Integer %8.8X%8.8X\n",
ACPI_HIDWORD (obj_desc->integer.value), ACPI_FORMAT_UINT64 (obj_desc->integer.value));
ACPI_LODWORD (obj_desc->integer.value));
break; break;
...@@ -271,8 +268,7 @@ acpi_ex_dump_operand ( ...@@ -271,8 +268,7 @@ acpi_ex_dump_operand (
} }
else { else {
acpi_os_printf (" base %8.8X%8.8X Length %X\n", acpi_os_printf (" base %8.8X%8.8X Length %X\n",
ACPI_HIDWORD (obj_desc->region.address), ACPI_FORMAT_UINT64 (obj_desc->region.address),
ACPI_LODWORD (obj_desc->region.address),
obj_desc->region.length); obj_desc->region.length);
} }
break; break;
...@@ -494,7 +490,7 @@ acpi_ex_out_address ( ...@@ -494,7 +490,7 @@ acpi_ex_out_address (
acpi_os_printf ("%20s : %p\n", title, value); acpi_os_printf ("%20s : %p\n", title, value);
#else #else
acpi_os_printf ("%20s : %8.8X%8.8X\n", title, acpi_os_printf ("%20s : %8.8X%8.8X\n", title,
ACPI_HIDWORD (value), ACPI_LODWORD (value)); ACPI_FORMAT_UINT64 (value));
#endif #endif
} }
...@@ -525,7 +521,7 @@ acpi_ex_dump_node ( ...@@ -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_string ("Type", acpi_ut_get_type_name (node->type));
acpi_ex_out_integer ("Flags", node->flags); acpi_ex_out_integer ("Flags", node->flags);
acpi_ex_out_integer ("Owner Id", node->owner_id); acpi_ex_out_integer ("Owner Id", node->owner_id);
...@@ -573,7 +569,8 @@ acpi_ex_dump_object_descriptor ( ...@@ -573,7 +569,8 @@ acpi_ex_dump_object_descriptor (
} }
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) { 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; return_VOID;
} }
...@@ -589,8 +586,7 @@ acpi_ex_dump_object_descriptor ( ...@@ -589,8 +586,7 @@ acpi_ex_dump_object_descriptor (
case ACPI_TYPE_INTEGER: case ACPI_TYPE_INTEGER:
acpi_os_printf ("%20s : %8.8X%8.8X\n", "Value", acpi_os_printf ("%20s : %8.8X%8.8X\n", "Value",
ACPI_HIDWORD (obj_desc->integer.value), ACPI_FORMAT_UINT64 (obj_desc->integer.value));
ACPI_LODWORD (obj_desc->integer.value));
break; break;
......
...@@ -138,8 +138,9 @@ acpi_ex_setup_region ( ...@@ -138,8 +138,9 @@ acpi_ex_setup_region (
*/ */
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n", "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n",
obj_desc->common_field.node->name.ascii, obj_desc->common_field.access_byte_width, acpi_ut_get_node_name (obj_desc->common_field.node),
rgn_desc->region.node->name.ascii, rgn_desc->region.length)); obj_desc->common_field.access_byte_width,
acpi_ut_get_node_name (rgn_desc->region.node), rgn_desc->region.length));
} }
/* /*
...@@ -148,9 +149,10 @@ acpi_ex_setup_region ( ...@@ -148,9 +149,10 @@ acpi_ex_setup_region (
*/ */
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n", "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n",
obj_desc->common_field.node->name.ascii, obj_desc->common_field.base_byte_offset, 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, field_datum_byte_offset, obj_desc->common_field.access_byte_width,
rgn_desc->region.node->name.ascii, rgn_desc->region.length)); acpi_ut_get_node_name (rgn_desc->region.node), rgn_desc->region.length));
#ifdef CONFIG_ACPI_RELAXED_AML #ifdef CONFIG_ACPI_RELAXED_AML
{ {
...@@ -261,7 +263,7 @@ acpi_ex_access_region ( ...@@ -261,7 +263,7 @@ acpi_ex_access_region (
obj_desc->common_field.access_byte_width, obj_desc->common_field.access_byte_width,
obj_desc->common_field.base_byte_offset, obj_desc->common_field.base_byte_offset,
field_datum_byte_offset, field_datum_byte_offset,
ACPI_HIDWORD (address), ACPI_LODWORD (address))); ACPI_FORMAT_UINT64 (address)));
/* Invoke the appropriate address_space/op_region handler */ /* Invoke the appropriate address_space/op_region handler */
...@@ -514,12 +516,12 @@ acpi_ex_field_datum_io ( ...@@ -514,12 +516,12 @@ acpi_ex_field_datum_io (
if (ACPI_SUCCESS (status)) { if (ACPI_SUCCESS (status)) {
if (read_write == ACPI_READ) { if (read_write == ACPI_READ) {
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value Read %8.8X%8.8X, Width %d\n", ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value Read %8.8X%8.8X, Width %d\n",
ACPI_HIDWORD (*value), ACPI_LODWORD (*value), ACPI_FORMAT_UINT64 (*value),
obj_desc->common_field.access_byte_width)); obj_desc->common_field.access_byte_width));
} }
else { else {
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value Written %8.8X%8.8X, Width %d\n", ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value Written %8.8X%8.8X, Width %d\n",
ACPI_HIDWORD (*value), ACPI_LODWORD (*value), ACPI_FORMAT_UINT64 (*value),
obj_desc->common_field.access_byte_width)); obj_desc->common_field.access_byte_width));
} }
} }
...@@ -612,11 +614,11 @@ acpi_ex_write_with_update_rule ( ...@@ -612,11 +614,11 @@ acpi_ex_write_with_update_rule (
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"Mask %8.8X%8.8X, datum_offset %X, Width %X, Value %8.8X%8.8X, merged_value %8.8X%8.8X\n", "Mask %8.8X%8.8X, datum_offset %X, Width %X, Value %8.8X%8.8X, merged_value %8.8X%8.8X\n",
ACPI_HIDWORD (mask), ACPI_LODWORD (mask), ACPI_FORMAT_UINT64 (mask),
field_datum_byte_offset, field_datum_byte_offset,
obj_desc->common_field.access_byte_width, obj_desc->common_field.access_byte_width,
ACPI_HIDWORD (field_value), ACPI_LODWORD (field_value), ACPI_FORMAT_UINT64 (field_value),
ACPI_HIDWORD (merged_value),ACPI_LODWORD (merged_value))); ACPI_FORMAT_UINT64 (merged_value)));
/* Write the merged value */ /* Write the merged value */
...@@ -784,12 +786,13 @@ acpi_ex_extract_from_field ( ...@@ -784,12 +786,13 @@ acpi_ex_extract_from_field (
{ {
acpi_status status; acpi_status status;
u32 field_datum_byte_offset; u32 field_datum_byte_offset;
u32 datum_offset; u32 buffer_datum_offset;
acpi_integer previous_raw_datum; acpi_integer previous_raw_datum = 0;
acpi_integer this_raw_datum = 0; acpi_integer this_raw_datum = 0;
acpi_integer merged_datum = 0; acpi_integer merged_datum = 0;
u32 byte_field_length; u32 byte_field_length;
u32 datum_count; u32 datum_count;
u32 i;
ACPI_FUNCTION_TRACE ("ex_extract_from_field"); ACPI_FUNCTION_TRACE ("ex_extract_from_field");
...@@ -812,36 +815,48 @@ acpi_ex_extract_from_field ( ...@@ -812,36 +815,48 @@ acpi_ex_extract_from_field (
datum_count = ACPI_ROUND_UP_TO (byte_field_length, datum_count = ACPI_ROUND_UP_TO (byte_field_length,
obj_desc->common_field.access_byte_width); obj_desc->common_field.access_byte_width);
/*
* If the field is not aligned on a datum boundary and does not
* fit within a single datum, we must read an extra datum.
*
* We could just split the aligned and non-aligned cases since the
* aligned case is so very simple, but this would require more code.
*/
if ((obj_desc->common_field.end_field_valid_bits != 0) &&
(!(obj_desc->common_field.flags & AOPOBJ_SINGLE_DATUM))) {
datum_count++;
}
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"byte_len %X, datum_len %X, byte_gran %X\n", "byte_len %X, datum_len %X, byte_gran %X\n",
byte_field_length, datum_count,obj_desc->common_field.access_byte_width)); byte_field_length, datum_count,obj_desc->common_field.access_byte_width));
/* /*
* Clear the caller's buffer (the whole buffer length as given) * Clear the caller's buffer (the whole buffer length as given)
* This is very important, especially in the cases where a byte is read, * This is very important, especially in the cases where the buffer
* but the buffer is really a u32 (4 bytes). * is longer than the size of the field.
*/ */
ACPI_MEMSET (buffer, 0, buffer_length); ACPI_MEMSET (buffer, 0, buffer_length);
/* Read the first raw datum to prime the loop */
field_datum_byte_offset = 0; field_datum_byte_offset = 0;
datum_offset= 0; buffer_datum_offset= 0;
/* Read the entire field */
for (i = 0; i < datum_count; i++) {
status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset, status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset,
&previous_raw_datum, ACPI_READ); &this_raw_datum, ACPI_READ);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
/* We might actually be done if the request fits in one datum */ /* We might actually be done if the request fits in one datum */
if ((datum_count == 1) && if ((datum_count == 1) &&
(obj_desc->common_field.flags & AOPOBJ_SINGLE_DATUM)) { (obj_desc->common_field.flags & AOPOBJ_SINGLE_DATUM)) {
/* 1) Shift the valid data bits down to start at bit 0 */ /* 1) Shift the valid data bits down to start at bit 0 */
merged_datum = (previous_raw_datum >> obj_desc->common_field.start_field_bit_offset); merged_datum = (this_raw_datum >> obj_desc->common_field.start_field_bit_offset);
/* 2) Mask off any upper unused bits (bits not part of the field) */ /* 2) Mask off any upper unused bits (bits not part of the field) */
...@@ -852,37 +867,22 @@ acpi_ex_extract_from_field ( ...@@ -852,37 +867,22 @@ acpi_ex_extract_from_field (
/* Store the datum to the caller buffer */ /* Store the datum to the caller buffer */
acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length, acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length,
obj_desc->common_field.access_byte_width, datum_offset); obj_desc->common_field.access_byte_width, buffer_datum_offset);
return_ACPI_STATUS (AE_OK); return_ACPI_STATUS (AE_OK);
} }
/* Special handling for the last datum to ignore extra bits */
/* We need to get more raw data to complete one or more field data */ if ((i >= (datum_count -1)) &&
(obj_desc->common_field.end_field_valid_bits)) {
while (datum_offset < datum_count) {
field_datum_byte_offset += obj_desc->common_field.access_byte_width;
/*
* If the field is aligned on a byte boundary, we don't want
* to perform a final read, since this would potentially read
* past the end of the region.
*
* We could just split the aligned and non-aligned cases since the
* aligned case is so very simple, but this would require more code.
*/
if ((obj_desc->common_field.start_field_bit_offset != 0) ||
((obj_desc->common_field.start_field_bit_offset == 0) &&
(datum_offset < (datum_count -1)))) {
/* /*
* Get the next raw datum, it contains some or all bits * This is the last iteration of the loop. We need to clear
* of the current field datum * any unused bits (bits that are not part of this field) before
* we store the final merged datum into the caller buffer.
*/ */
status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset, this_raw_datum &=
&this_raw_datum, ACPI_READ); ACPI_MASK_BITS_ABOVE (obj_desc->common_field.end_field_valid_bits);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
} }
/* /*
...@@ -891,9 +891,14 @@ acpi_ex_extract_from_field ( ...@@ -891,9 +891,14 @@ acpi_ex_extract_from_field (
if (obj_desc->common_field.start_field_bit_offset == 0) { if (obj_desc->common_field.start_field_bit_offset == 0) {
/* Field is not skewed and we can just copy the datum */ /* Field is not skewed and we can just copy the datum */
merged_datum = previous_raw_datum; acpi_ex_set_buffer_datum (this_raw_datum, buffer, buffer_length,
obj_desc->common_field.access_byte_width, buffer_datum_offset);
buffer_datum_offset++;
} }
else { else {
/* Not aligned -- on the first iteration, just save the datum */
if (i != 0) {
/* /*
* Put together the appropriate bits of the two raw data to make a * Put together the appropriate bits of the two raw data to make a
* single complete field datum * single complete field datum
...@@ -906,33 +911,28 @@ acpi_ex_extract_from_field ( ...@@ -906,33 +911,28 @@ acpi_ex_extract_from_field (
merged_datum |= (this_raw_datum << obj_desc->common_field.datum_valid_bits); merged_datum |= (this_raw_datum << obj_desc->common_field.datum_valid_bits);
if ((datum_offset >= (datum_count -1))) {
/*
* This is the last iteration of the loop. We need to clear
* any unused bits (bits that are not part of this field) that
* came from the last raw datum before we store the final
* merged datum into the caller buffer.
*/
if (obj_desc->common_field.end_buffer_valid_bits) {
merged_datum &=
ACPI_MASK_BITS_ABOVE (obj_desc->common_field.end_buffer_valid_bits);
}
}
}
/*
* Store the merged field datum in the caller's buffer, according to
* the granularity of the field (size of each datum).
*/
acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length, acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length,
obj_desc->common_field.access_byte_width, datum_offset); obj_desc->common_field.access_byte_width, buffer_datum_offset);
buffer_datum_offset++;
}
/* /*
* Save the raw datum that was just acquired since it may contain bits * Save the raw datum that was just acquired since it may contain bits
* of the *next* field datum. Update offsets * of the *next* field datum
*/ */
previous_raw_datum = this_raw_datum; previous_raw_datum = this_raw_datum;
datum_offset++; }
field_datum_byte_offset += obj_desc->common_field.access_byte_width;
}
/* For non-aligned case, there is one last datum to insert */
if (obj_desc->common_field.start_field_bit_offset != 0) {
merged_datum = (this_raw_datum >> obj_desc->common_field.start_field_bit_offset);
acpi_ex_set_buffer_datum (merged_datum, buffer, buffer_length,
obj_desc->common_field.access_byte_width, buffer_datum_offset);
} }
return_ACPI_STATUS (AE_OK); return_ACPI_STATUS (AE_OK);
......
...@@ -121,8 +121,8 @@ acpi_ex_get_object_reference ( ...@@ -121,8 +121,8 @@ acpi_ex_get_object_reference (
default: default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid descriptor type %X in %p\n", ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p has invalid descriptor [%s]\n",
ACPI_GET_DESCRIPTOR_TYPE (obj_desc), obj_desc)); obj_desc, acpi_ut_get_descriptor_name (obj_desc)));
return_ACPI_STATUS (AE_TYPE); return_ACPI_STATUS (AE_TYPE);
} }
......
...@@ -159,7 +159,7 @@ acpi_ex_acquire_mutex ( ...@@ -159,7 +159,7 @@ acpi_ex_acquire_mutex (
if (!walk_state->thread) { if (!walk_state->thread) {
ACPI_REPORT_ERROR (("Cannot acquire Mutex [%4.4s], null thread info\n", 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); return_ACPI_STATUS (AE_AML_INTERNAL);
} }
...@@ -169,7 +169,7 @@ acpi_ex_acquire_mutex ( ...@@ -169,7 +169,7 @@ acpi_ex_acquire_mutex (
*/ */
if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { 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_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); return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
} }
...@@ -242,7 +242,7 @@ acpi_ex_release_mutex ( ...@@ -242,7 +242,7 @@ acpi_ex_release_mutex (
if (!obj_desc->mutex.owner_thread) { if (!obj_desc->mutex.owner_thread) {
ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], not acquired\n", 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); return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED);
} }
...@@ -250,7 +250,7 @@ acpi_ex_release_mutex ( ...@@ -250,7 +250,7 @@ acpi_ex_release_mutex (
if (!walk_state->thread) { if (!walk_state->thread) {
ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], null thread info\n", 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); return_ACPI_STATUS (AE_AML_INTERNAL);
} }
...@@ -260,7 +260,7 @@ acpi_ex_release_mutex ( ...@@ -260,7 +260,7 @@ acpi_ex_release_mutex (
ACPI_REPORT_ERROR (( ACPI_REPORT_ERROR ((
"Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n", "Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n",
walk_state->thread->thread_id, 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)); obj_desc->mutex.owner_thread->thread_id));
return_ACPI_STATUS (AE_AML_NOT_OWNER); return_ACPI_STATUS (AE_AML_NOT_OWNER);
} }
...@@ -271,7 +271,7 @@ acpi_ex_release_mutex ( ...@@ -271,7 +271,7 @@ acpi_ex_release_mutex (
*/ */
if (obj_desc->mutex.sync_level > walk_state->thread->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_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); return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
} }
......
...@@ -351,8 +351,7 @@ acpi_ex_opcode_1A_1T_1R ( ...@@ -351,8 +351,7 @@ acpi_ex_opcode_1A_1T_1R (
if (digit > 0) { if (digit > 0) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Integer too large to convert to BCD: %8.8X%8.8X\n", 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_FORMAT_UINT64 (operand[0]->integer.value)));
ACPI_LODWORD(operand[0]->integer.value)));
status = AE_AML_NUMERIC_OVERFLOW; status = AE_AML_NUMERIC_OVERFLOW;
goto cleanup; goto cleanup;
} }
......
...@@ -101,15 +101,14 @@ acpi_ex_opcode_3A_0T_0R ( ...@@ -101,15 +101,14 @@ acpi_ex_opcode_3A_0T_0R (
switch (walk_state->opcode) { switch (walk_state->opcode) {
case AML_FATAL_OP: /* Fatal (fatal_type fatal_code fatal_arg) */ case AML_FATAL_OP: /* Fatal (fatal_type fatal_code fatal_arg) */
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"fatal_op: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", "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)); (u32) operand[2]->integer.value));
fatal = ACPI_MEM_ALLOCATE (sizeof (struct acpi_signal_fatal_info)); fatal = ACPI_MEM_ALLOCATE (sizeof (struct acpi_signal_fatal_info));
if (fatal) { if (fatal) {
fatal->type = (u32) operand[0]->integer.value; fatal->type = (u32) operand[0]->integer.value;
......
...@@ -351,7 +351,7 @@ acpi_ex_prep_common_field_object ( ...@@ -351,7 +351,7 @@ acpi_ex_prep_common_field_object (
*/ */
nearest_byte_address = nearest_byte_address =
ACPI_ROUND_BITS_DOWN_TO_BYTES (field_bit_position); 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); ACPI_ROUND_DOWN (nearest_byte_address, byte_alignment);
/* /*
...@@ -539,7 +539,7 @@ acpi_ex_prep_field_value ( ...@@ -539,7 +539,7 @@ acpi_ex_prep_field_value (
acpi_ns_get_type (info->field_node)); acpi_ns_get_type (info->field_node));
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Set named_obj %p [%4.4s], obj_desc %p\n", 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 */ /* Remove local reference to the object */
......
...@@ -161,7 +161,7 @@ acpi_ex_system_memory_space_handler ( ...@@ -161,7 +161,7 @@ acpi_ex_system_memory_space_handler (
(void **) &mem_info->mapped_logical_address); (void **) &mem_info->mapped_logical_address);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %8.8X%8.8X, size %X\n", 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; mem_info->mapped_length = 0;
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
...@@ -181,7 +181,7 @@ acpi_ex_system_memory_space_handler ( ...@@ -181,7 +181,7 @@ acpi_ex_system_memory_space_handler (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"system_memory %d (%d width) Address=%8.8X%8.8X\n", function, bit_width, "system_memory %d (%d width) Address=%8.8X%8.8X\n", function, bit_width,
ACPI_HIDWORD (address), ACPI_LODWORD (address))); ACPI_FORMAT_UINT64 (address)));
/* /*
* Perform the memory read or write * Perform the memory read or write
...@@ -291,7 +291,7 @@ acpi_ex_system_io_space_handler ( ...@@ -291,7 +291,7 @@ acpi_ex_system_io_space_handler (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"system_iO %d (%d width) Address=%8.8X%8.8X\n", function, bit_width, "system_iO %d (%d width) Address=%8.8X%8.8X\n", function, bit_width,
ACPI_HIDWORD (address), ACPI_LODWORD (address))); ACPI_FORMAT_UINT64 (address)));
/* Decode the function parameter */ /* Decode the function parameter */
......
...@@ -349,6 +349,8 @@ acpi_ex_resolve_multiple ( ...@@ -349,6 +349,8 @@ acpi_ex_resolve_multiple (
/* All "References" point to a NS node */ /* All "References" point to a NS node */
if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) { 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); return_ACPI_STATUS (AE_AML_INTERNAL);
} }
...@@ -399,6 +401,8 @@ acpi_ex_resolve_multiple ( ...@@ -399,6 +401,8 @@ acpi_ex_resolve_multiple (
/* All "References" point to a NS node */ /* All "References" point to a NS node */
if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) { 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); return_ACPI_STATUS (AE_AML_INTERNAL);
} }
......
...@@ -247,8 +247,8 @@ acpi_ex_resolve_operands ( ...@@ -247,8 +247,8 @@ acpi_ex_resolve_operands (
/* Invalid descriptor */ /* Invalid descriptor */
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Bad descriptor type %X in Obj %p\n", "Invalid descriptor %p [%s]\n",
ACPI_GET_DESCRIPTOR_TYPE (obj_desc), obj_desc)); obj_desc, acpi_ut_get_descriptor_name (obj_desc)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE); return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
} }
......
...@@ -190,8 +190,7 @@ acpi_ex_store ( ...@@ -190,8 +190,7 @@ acpi_ex_store (
case ACPI_TYPE_INTEGER: case ACPI_TYPE_INTEGER:
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%8.8X%8.8X\n", ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%8.8X%8.8X\n",
ACPI_HIDWORD (source_desc->integer.value), ACPI_FORMAT_UINT64 (source_desc->integer.value)));
ACPI_LODWORD (source_desc->integer.value)));
break; break;
......
...@@ -111,11 +111,16 @@ acpi_ex_system_wait_semaphore ( ...@@ -111,11 +111,16 @@ acpi_ex_system_wait_semaphore (
* *
* FUNCTION: acpi_ex_system_do_stall * 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 * RETURN: Status
* *
* DESCRIPTION: Suspend running thread for specified amount of time. * 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 ( ...@@ -129,12 +134,15 @@ acpi_ex_system_do_stall (
ACPI_FUNCTION_ENTRY (); ACPI_FUNCTION_ENTRY ();
if (how_long > 100) /* 100 microseconds */ { if (how_long > 255) /* 255 microseconds */ {
/* /*
* Longer than 100 usec, use sleep instead * Longer than 255 usec, this is an error
* (according to ACPI specification) *
* (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 { else {
acpi_os_stall (how_long); acpi_os_stall (how_long);
...@@ -148,7 +156,8 @@ acpi_ex_system_do_stall ( ...@@ -148,7 +156,8 @@ acpi_ex_system_do_stall (
* *
* FUNCTION: acpi_ex_system_do_suspend * 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 * RETURN: None
* *
......
...@@ -418,16 +418,14 @@ acpi_set_register ( ...@@ -418,16 +418,14 @@ acpi_set_register (
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "PM2 control: Read %X from %8.8X%8.8X\n", ACPI_DEBUG_PRINT ((ACPI_DB_IO, "PM2 control: Read %X from %8.8X%8.8X\n",
register_value, register_value,
ACPI_HIDWORD (acpi_gbl_FADT->xpm2_cnt_blk.address), ACPI_FORMAT_UINT64 (acpi_gbl_FADT->xpm2_cnt_blk.address)));
ACPI_LODWORD (acpi_gbl_FADT->xpm2_cnt_blk.address)));
ACPI_REGISTER_INSERT_VALUE (register_value, bit_reg_info->bit_position, ACPI_REGISTER_INSERT_VALUE (register_value, bit_reg_info->bit_position,
bit_reg_info->access_bit_mask, value); bit_reg_info->access_bit_mask, value);
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %4.4X to %8.8X%8.8X\n", ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %4.4X to %8.8X%8.8X\n",
register_value, register_value,
ACPI_HIDWORD (acpi_gbl_FADT->xpm2_cnt_blk.address), ACPI_FORMAT_UINT64 (acpi_gbl_FADT->xpm2_cnt_blk.address)));
ACPI_LODWORD (acpi_gbl_FADT->xpm2_cnt_blk.address)));
status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM2_CONTROL, (u8) (register_value)); ACPI_REGISTER_PM2_CONTROL, (u8) (register_value));
...@@ -763,8 +761,7 @@ acpi_hw_low_level_read ( ...@@ -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", ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read: %8.8X width %2d from %8.8X%8.8X (%s)\n",
*value, width, *value, width,
ACPI_HIDWORD (reg->address), ACPI_FORMAT_UINT64 (reg->address),
ACPI_LODWORD (reg->address),
acpi_ut_get_region_name (reg->address_space_id))); acpi_ut_get_region_name (reg->address_space_id)));
return (status); return (status);
...@@ -850,8 +847,7 @@ acpi_hw_low_level_write ( ...@@ -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", ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n",
value, width, value, width,
ACPI_HIDWORD (reg->address), ACPI_FORMAT_UINT64 (reg->address),
ACPI_LODWORD (reg->address),
acpi_ut_get_region_name (reg->address_space_id))); acpi_ut_get_region_name (reg->address_space_id)));
return (status); return (status);
......
...@@ -314,8 +314,8 @@ acpi_ns_lookup ( ...@@ -314,8 +314,8 @@ acpi_ns_lookup (
else { else {
prefix_node = scope_info->scope.node; prefix_node = scope_info->scope.node;
if (ACPI_GET_DESCRIPTOR_TYPE (prefix_node) != ACPI_DESC_TYPE_NAMED) { if (ACPI_GET_DESCRIPTOR_TYPE (prefix_node) != ACPI_DESC_TYPE_NAMED) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%p] Not a namespace node\n", ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p Not a namespace node [%s]\n",
prefix_node)); prefix_node, acpi_ut_get_descriptor_name (prefix_node)));
return_ACPI_STATUS (AE_AML_INTERNAL); return_ACPI_STATUS (AE_AML_INTERNAL);
} }
...@@ -379,7 +379,7 @@ acpi_ns_lookup ( ...@@ -379,7 +379,7 @@ acpi_ns_lookup (
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Searching relative to prefix scope [%4.4s] (%p)\n", "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 * Handle multiple Parent Prefixes (carat) by just getting
...@@ -413,7 +413,7 @@ acpi_ns_lookup ( ...@@ -413,7 +413,7 @@ acpi_ns_lookup (
if (search_parent_flag == ACPI_NS_NO_UPSEARCH) { if (search_parent_flag == ACPI_NS_NO_UPSEARCH) {
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Search scope is [%4.4s], path has %d carat(s)\n", "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 ( ...@@ -271,7 +271,7 @@ acpi_ns_install_node (
* alphabetic placement. * alphabetic placement.
*/ */
previous_child_node = NULL; 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) { if (child_node->flags & ANOBJ_END_OF_PEER_LIST) {
/* Last peer; Clear end-of-list flag */ /* Last peer; Clear end-of-list flag */
...@@ -335,8 +335,9 @@ acpi_ns_install_node ( ...@@ -335,8 +335,9 @@ acpi_ns_install_node (
node->type = (u8) type; node->type = (u8) type;
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s (%s) added to %4.4s (%s) %p at %p\n", 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), acpi_ut_get_node_name (node), 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 (parent_node), acpi_ut_get_type_name (parent_node->type),
parent_node, node));
/* /*
* Increment the reference count(s) of all parents up to * Increment the reference count(s) of all parents up to
......
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
#define _COMPONENT ACPI_NAMESPACE #define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME ("nsdump") ACPI_MODULE_NAME ("nsdump")
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
/******************************************************************************* /*******************************************************************************
* *
...@@ -205,7 +205,7 @@ acpi_ns_dump_one_object ( ...@@ -205,7 +205,7 @@ acpi_ns_dump_one_object (
* Now we can print out the pertinent information * Now we can print out the pertinent information
*/ */
acpi_os_printf ("%4.4s %-12s %p ", 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; dbg_level = acpi_dbg_level;
acpi_dbg_level = 0; acpi_dbg_level = 0;
...@@ -250,8 +250,7 @@ acpi_ns_dump_one_object ( ...@@ -250,8 +250,7 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_INTEGER: case ACPI_TYPE_INTEGER:
acpi_os_printf ("= %8.8X%8.8X\n", acpi_os_printf ("= %8.8X%8.8X\n",
ACPI_HIDWORD (obj_desc->integer.value), ACPI_FORMAT_UINT64 (obj_desc->integer.value));
ACPI_LODWORD (obj_desc->integer.value));
break; break;
...@@ -302,8 +301,7 @@ acpi_ns_dump_one_object ( ...@@ -302,8 +301,7 @@ acpi_ns_dump_one_object (
acpi_os_printf ("[%s]", acpi_ut_get_region_name (obj_desc->region.space_id)); acpi_os_printf ("[%s]", acpi_ut_get_region_name (obj_desc->region.space_id));
if (obj_desc->region.flags & AOPOBJ_DATA_VALID) { if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
acpi_os_printf (" Addr %8.8X%8.8X Len %.4X\n", acpi_os_printf (" Addr %8.8X%8.8X Len %.4X\n",
ACPI_HIDWORD (obj_desc->region.address), ACPI_FORMAT_UINT64 (obj_desc->region.address),
ACPI_LODWORD (obj_desc->region.address),
obj_desc->region.length); obj_desc->region.length);
} }
else { else {
...@@ -324,7 +322,7 @@ acpi_ns_dump_one_object ( ...@@ -324,7 +322,7 @@ acpi_ns_dump_one_object (
if (obj_desc->buffer_field.buffer_obj && if (obj_desc->buffer_field.buffer_obj &&
obj_desc->buffer_field.buffer_obj->buffer.node) { obj_desc->buffer_field.buffer_obj->buffer.node) {
acpi_os_printf ("Buf [%4.4s]", 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; break;
...@@ -332,29 +330,29 @@ acpi_ns_dump_one_object ( ...@@ -332,29 +330,29 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_LOCAL_REGION_FIELD: case ACPI_TYPE_LOCAL_REGION_FIELD:
acpi_os_printf ("Rgn [%4.4s]", 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; break;
case ACPI_TYPE_LOCAL_BANK_FIELD: case ACPI_TYPE_LOCAL_BANK_FIELD:
acpi_os_printf ("Rgn [%4.4s] Bnk [%4.4s]", acpi_os_printf ("Rgn [%4.4s] Bnk [%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),
obj_desc->bank_field.bank_obj->common_field.node->name.ascii); acpi_ut_get_node_name (obj_desc->bank_field.bank_obj->common_field.node));
break; break;
case ACPI_TYPE_LOCAL_INDEX_FIELD: case ACPI_TYPE_LOCAL_INDEX_FIELD:
acpi_os_printf ("Idx [%4.4s] Dat [%4.4s]", acpi_os_printf ("Idx [%4.4s] Dat [%4.4s]",
obj_desc->index_field.index_obj->common_field.node->name.ascii, acpi_ut_get_node_name (obj_desc->index_field.index_obj->common_field.node),
obj_desc->index_field.data_obj->common_field.node->name.ascii); acpi_ut_get_node_name (obj_desc->index_field.data_obj->common_field.node));
break; break;
case ACPI_TYPE_LOCAL_ALIAS: 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; break;
default: default:
...@@ -371,7 +369,7 @@ acpi_ns_dump_one_object ( ...@@ -371,7 +369,7 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_LOCAL_BANK_FIELD: case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_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.base_byte_offset * 8)
+ obj_desc->common_field.start_field_bit_offset, + obj_desc->common_field.start_field_bit_offset,
obj_desc->common_field.bit_length, obj_desc->common_field.bit_length,
...@@ -408,8 +406,8 @@ acpi_ns_dump_one_object ( ...@@ -408,8 +406,8 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_INTEGER: case ACPI_TYPE_INTEGER:
acpi_os_printf (" N:%X%X\n", ACPI_HIDWORD(obj_desc->integer.value), acpi_os_printf (" I:%8.8X8.8%X\n",
ACPI_LODWORD(obj_desc->integer.value)); ACPI_FORMAT_UINT64 (obj_desc->integer.value));
break; break;
case ACPI_TYPE_STRING: case ACPI_TYPE_STRING:
...@@ -485,7 +483,8 @@ acpi_ns_dump_one_object ( ...@@ -485,7 +483,8 @@ acpi_ns_dump_one_object (
default: 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; bytes_to_dump = 16;
break; break;
} }
...@@ -581,7 +580,6 @@ acpi_ns_dump_objects ( ...@@ -581,7 +580,6 @@ acpi_ns_dump_objects (
info.owner_id = owner_id; info.owner_id = owner_id;
info.display_type = display_type; info.display_type = display_type;
(void) acpi_ns_walk_namespace (type, start_handle, max_depth, (void) acpi_ns_walk_namespace (type, start_handle, max_depth,
ACPI_NS_WALK_NO_UNLOCK, acpi_ns_dump_one_object, ACPI_NS_WALK_NO_UNLOCK, acpi_ns_dump_one_object,
(void *) &info, NULL); (void *) &info, NULL);
...@@ -628,7 +626,6 @@ acpi_ns_dump_tables ( ...@@ -628,7 +626,6 @@ acpi_ns_dump_tables (
ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "\\\n")); ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "\\\n"));
} }
acpi_ns_dump_objects (ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, max_depth, acpi_ns_dump_objects (ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, max_depth,
ACPI_UINT32_MAX, search_handle); ACPI_UINT32_MAX, search_handle);
return_VOID; return_VOID;
......
...@@ -93,7 +93,7 @@ acpi_ns_dump_one_device ( ...@@ -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", ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, " HID: %s, ADR: %8.8X%8.8X, Status: %X\n",
info->hardware_id.value, info->hardware_id.value,
ACPI_HIDWORD (info->address), ACPI_LODWORD (info->address), ACPI_FORMAT_UINT64 (info->address),
info->current_status)); info->current_status));
ACPI_MEM_FREE (info); ACPI_MEM_FREE (info);
} }
......
...@@ -144,10 +144,17 @@ acpi_ns_initialize_devices ( ...@@ -144,10 +144,17 @@ acpi_ns_initialize_devices (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Executing all Device _STA and_INI methods:")); 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, status = acpi_ns_walk_namespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, FALSE, acpi_ns_init_one_device, &info, NULL); ACPI_UINT32_MAX, TRUE, acpi_ns_init_one_device, &info, NULL);
(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "walk_namespace failed! %s\n", ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "walk_namespace failed! %s\n",
...@@ -290,7 +297,8 @@ acpi_ns_init_one_object ( ...@@ -290,7 +297,8 @@ acpi_ns_init_one_object (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n")); ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n"));
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Could not execute arguments for [%4.4s] (%s), %s\n", "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 */ /* Print a dot for each object unless we are going to print the entire pathname */
...@@ -338,46 +346,49 @@ acpi_ns_init_one_device ( ...@@ -338,46 +346,49 @@ acpi_ns_init_one_device (
ACPI_FUNCTION_TRACE ("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); node = acpi_ns_map_handle_to_node (obj_handle);
if (!node) { if (!node) {
(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (AE_BAD_PARAMETER); return_ACPI_STATUS (AE_BAD_PARAMETER);
} }
status = acpi_ut_release_mutex (ACPI_MTX_NAMESPACE); /*
if (ACPI_FAILURE (status)) { * We will run _STA/_INI on Devices and Processors only
return_ACPI_STATUS (status); */
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. * 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")); ACPI_DEBUG_EXEC (acpi_ut_display_init_pathname (ACPI_TYPE_METHOD, node, "_STA"));
status = acpi_ut_execute_STA (node, &flags); status = acpi_ut_execute_STA (node, &flags);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
if (node->type == ACPI_TYPE_DEVICE) {
/* Ignore error and move on to next device */ /* Ignore error and move on to next device */
return_ACPI_STATUS (AE_OK); return_ACPI_STATUS (AE_OK);
} }
/* _STA is not required for Processor objects */
}
else {
info->num_STA++; info->num_STA++;
if (!(flags & 0x01)) { if (!(flags & 0x01)) {
/* don't look at children of a not present device */ /* Don't look at children of a not present device */
return_ACPI_STATUS(AE_CTRL_DEPTH); return_ACPI_STATUS(AE_CTRL_DEPTH);
} }
}
/* /*
* The device is present. Run _INI. * The device is present. Run _INI.
......
...@@ -104,7 +104,8 @@ acpi_ns_attach_object ( ...@@ -104,7 +104,8 @@ acpi_ns_attach_object (
if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) { if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) {
/* Not a name handle */ /* 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); return_ACPI_STATUS (AE_BAD_PARAMETER);
} }
...@@ -151,7 +152,7 @@ acpi_ns_attach_object ( ...@@ -151,7 +152,7 @@ acpi_ns_attach_object (
} }
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Installing %p into Node %p [%4.4s]\n", 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 */ /* Detach an existing attached object if present */
...@@ -234,7 +235,7 @@ acpi_ns_detach_object ( ...@@ -234,7 +235,7 @@ acpi_ns_detach_object (
node->type = ACPI_TYPE_ANY; node->type = ACPI_TYPE_ANY;
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Node %p [%4.4s] Object %p\n", 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) */ /* Remove one reference on the object (and all subobjects) */
......
...@@ -119,7 +119,7 @@ acpi_ns_search_node ( ...@@ -119,7 +119,7 @@ acpi_ns_search_node (
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n", "Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n",
(char *) &target_name, acpi_ut_get_type_name (next_node->type), (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_node = next_node;
return_ACPI_STATUS (AE_OK); return_ACPI_STATUS (AE_OK);
...@@ -145,7 +145,7 @@ acpi_ns_search_node ( ...@@ -145,7 +145,7 @@ acpi_ns_search_node (
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Name [%4.4s] (%s) not found in search in scope [%4.4s] %p first child %p\n", "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), (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); return_ACPI_STATUS (AE_NOT_FOUND);
} }
......
...@@ -977,8 +977,8 @@ acpi_ns_find_parent_name ( ...@@ -977,8 +977,8 @@ acpi_ns_find_parent_name (
parent_node = acpi_ns_get_parent_node (child_node); parent_node = acpi_ns_get_parent_node (child_node);
if (parent_node) { if (parent_node) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Parent of %p [%4.4s] is %p [%4.4s]\n", ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Parent of %p [%4.4s] is %p [%4.4s]\n",
child_node, child_node->name.ascii, child_node, acpi_ut_get_node_name (child_node),
parent_node, parent_node->name.ascii)); parent_node, acpi_ut_get_node_name (parent_node)));
if (parent_node->name.integer) { if (parent_node->name.integer) {
return_VALUE ((acpi_name) parent_node->name.integer); return_VALUE ((acpi_name) parent_node->name.integer);
...@@ -986,7 +986,7 @@ acpi_ns_find_parent_name ( ...@@ -986,7 +986,7 @@ acpi_ns_find_parent_name (
} }
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "unable to find parent of %p (%4.4s)\n", 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); return_VALUE (ACPI_UNKNOWN_NAME);
......
...@@ -199,7 +199,7 @@ acpi_get_name ( ...@@ -199,7 +199,7 @@ acpi_get_name (
/* Just copy the ACPI name from the Node and zero terminate it */ /* 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); ACPI_NAME_SIZE);
((char *) buffer->pointer) [ACPI_NAME_SIZE] = 0; ((char *) buffer->pointer) [ACPI_NAME_SIZE] = 0;
status = AE_OK; status = AE_OK;
......
...@@ -490,7 +490,7 @@ union acpi_parse_object * ...@@ -490,7 +490,7 @@ union acpi_parse_object *
acpi_ps_get_next_field ( acpi_ps_get_next_field (
struct acpi_parse_state *parser_state) 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); parser_state->aml_start);
union acpi_parse_object *field; union acpi_parse_object *field;
u16 opcode; u16 opcode;
...@@ -677,7 +677,7 @@ acpi_ps_get_next_arg ( ...@@ -677,7 +677,7 @@ acpi_ps_get_next_arg (
/* Fill in bytelist data */ /* 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); parser_state->aml);
arg->named.data = parser_state->aml; arg->named.data = parser_state->aml;
......
...@@ -498,7 +498,7 @@ acpi_ps_parse_loop ( ...@@ -498,7 +498,7 @@ acpi_ps_parse_loop (
if (!op) { if (!op) {
/* Get the next opcode from the AML stream */ /* 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); parser_state->aml_start);
walk_state->opcode = acpi_ps_peek_opcode (parser_state); walk_state->opcode = acpi_ps_peek_opcode (parser_state);
...@@ -710,7 +710,7 @@ acpi_ps_parse_loop ( ...@@ -710,7 +710,7 @@ acpi_ps_parse_loop (
while (GET_CURRENT_ARG_TYPE (walk_state->arg_types) && while (GET_CURRENT_ARG_TYPE (walk_state->arg_types) &&
!walk_state->arg_count) { !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); parser_state->aml_start);
status = acpi_ps_get_next_arg (walk_state, parser_state, status = acpi_ps_get_next_arg (walk_state, parser_state,
GET_CURRENT_ARG_TYPE (walk_state->arg_types), &arg); GET_CURRENT_ARG_TYPE (walk_state->arg_types), &arg);
......
...@@ -696,7 +696,7 @@ acpi_rs_get_list_length ( ...@@ -696,7 +696,7 @@ acpi_rs_get_list_length (
default: default:
/* /*
* If we get here, everything is out of sync, * 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); return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
} }
...@@ -704,7 +704,7 @@ acpi_rs_get_list_length ( ...@@ -704,7 +704,7 @@ acpi_rs_get_list_length (
/* /*
* Update the return value and counter * 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; bytes_parsed += bytes_consumed;
/* /*
......
...@@ -331,7 +331,7 @@ acpi_rs_create_pci_routing_table ( ...@@ -331,7 +331,7 @@ acpi_rs_create_pci_routing_table (
/* Now align the current length */ /* 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 * 4) Fourth subobject: Dereference the PRT.source_index
......
...@@ -899,24 +899,19 @@ acpi_rs_dump_address64 ( ...@@ -899,24 +899,19 @@ acpi_rs_dump_address64 (
"" : "not "); "" : "not ");
acpi_os_printf (" Granularity: %8.8X%8.8X\n", acpi_os_printf (" Granularity: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->granularity), ACPI_FORMAT_UINT64 (address64_data->granularity));
ACPI_LODWORD (address64_data->granularity));
acpi_os_printf (" Address range min: %8.8X%8.8X\n", acpi_os_printf (" Address range min: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->min_address_range), ACPI_FORMAT_UINT64 (address64_data->min_address_range));
ACPI_HIDWORD (address64_data->min_address_range));
acpi_os_printf (" Address range max: %8.8X%8.8X\n", acpi_os_printf (" Address range max: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->max_address_range), ACPI_FORMAT_UINT64 (address64_data->max_address_range));
ACPI_HIDWORD (address64_data->max_address_range));
acpi_os_printf (" Address translation offset: %8.8X%8.8X\n", acpi_os_printf (" Address translation offset: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->address_translation_offset), ACPI_FORMAT_UINT64 (address64_data->address_translation_offset));
ACPI_HIDWORD (address64_data->address_translation_offset));
acpi_os_printf (" Address Length: %8.8X%8.8X\n", acpi_os_printf (" Address Length: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->address_length), ACPI_FORMAT_UINT64 (address64_data->address_length));
ACPI_HIDWORD (address64_data->address_length));
if(0xFF != address64_data->resource_source.index) { if(0xFF != address64_data->resource_source.index) {
acpi_os_printf (" Resource Source Index: %X\n", acpi_os_printf (" Resource Source Index: %X\n",
...@@ -1126,8 +1121,7 @@ acpi_rs_dump_irq_list ( ...@@ -1126,8 +1121,7 @@ acpi_rs_dump_irq_list (
acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++); acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
acpi_os_printf (" Address: %8.8X%8.8X\n", acpi_os_printf (" Address: %8.8X%8.8X\n",
ACPI_HIDWORD (prt_element->address), ACPI_FORMAT_UINT64 (prt_element->address));
ACPI_LODWORD (prt_element->address));
acpi_os_printf (" Pin: %X\n", prt_element->pin); acpi_os_printf (" Pin: %X\n", prt_element->pin);
......
...@@ -312,8 +312,8 @@ acpi_rs_byte_stream_to_list ( ...@@ -312,8 +312,8 @@ acpi_rs_byte_stream_to_list (
* Set the Buffer to the next structure * Set the Buffer to the next structure
*/ */
resource = ACPI_CAST_PTR (struct acpi_resource, buffer); resource = ACPI_CAST_PTR (struct acpi_resource, buffer);
resource->length = ACPI_ALIGN_RESOURCE_SIZE(resource->length); resource->length = (u32) ACPI_ALIGN_RESOURCE_SIZE (resource->length);
buffer += ACPI_ALIGN_RESOURCE_SIZE(structure_size); buffer += ACPI_ALIGN_RESOURCE_SIZE (structure_size);
} /* end while */ } /* end while */
......
...@@ -148,8 +148,7 @@ acpi_tb_get_table_header ( ...@@ -148,8 +148,7 @@ acpi_tb_get_table_header (
(void *) &header); (void *) &header);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n", ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n",
ACPI_HIDWORD (address->pointer.physical), ACPI_FORMAT_UINT64 (address->pointer.physical),
ACPI_LODWORD (address->pointer.physical),
sizeof (struct acpi_table_header))); sizeof (struct acpi_table_header)));
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
...@@ -365,8 +364,7 @@ acpi_tb_get_this_table ( ...@@ -365,8 +364,7 @@ acpi_tb_get_this_table (
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n", ACPI_REPORT_ERROR (("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n",
header->signature, header->signature,
ACPI_HIDWORD (address->pointer.physical), ACPI_FORMAT_UINT64 (address->pointer.physical), header->length));
ACPI_LODWORD (address->pointer.physical), header->length));
return (status); return (status);
} }
...@@ -408,8 +406,7 @@ acpi_tb_get_this_table ( ...@@ -408,8 +406,7 @@ acpi_tb_get_this_table (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Found table [%4.4s] at %8.8X%8.8X, mapped/copied to %p\n", "Found table [%4.4s] at %8.8X%8.8X, mapped/copied to %p\n",
full_table->signature, full_table->signature,
ACPI_HIDWORD (address->pointer.physical), ACPI_FORMAT_UINT64 (address->pointer.physical), full_table));
ACPI_LODWORD (address->pointer.physical), full_table));
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
......
...@@ -240,8 +240,7 @@ acpi_tb_get_required_tables ( ...@@ -240,8 +240,7 @@ acpi_tb_get_required_tables (
if ((status != AE_OK) && (status != AE_TABLE_NOT_SUPPORTED)) { if ((status != AE_OK) && (status != AE_TABLE_NOT_SUPPORTED)) {
ACPI_REPORT_WARNING (("%s, while getting table at %8.8X%8.8X\n", ACPI_REPORT_WARNING (("%s, while getting table at %8.8X%8.8X\n",
acpi_format_exception (status), acpi_format_exception (status),
ACPI_HIDWORD (address.pointer.value), ACPI_FORMAT_UINT64 (address.pointer.value)));
ACPI_LODWORD (address.pointer.value)));
} }
} }
......
...@@ -278,8 +278,7 @@ acpi_tb_get_table_rsdt ( ...@@ -278,8 +278,7 @@ acpi_tb_get_table_rsdt (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"RSDP located at %p, points to RSDT physical=%8.8X%8.8X \n", "RSDP located at %p, points to RSDT physical=%8.8X%8.8X \n",
acpi_gbl_RSDP, acpi_gbl_RSDP,
ACPI_HIDWORD (address.pointer.value), ACPI_FORMAT_UINT64 (address.pointer.value)));
ACPI_LODWORD (address.pointer.value)));
/* Check the RSDT or XSDT signature */ /* Check the RSDT or XSDT signature */
......
...@@ -251,7 +251,7 @@ acpi_unload_table ( ...@@ -251,7 +251,7 @@ acpi_unload_table (
/* Find all tables of the requested type */ /* Find all tables of the requested type */
table_desc = acpi_gbl_table_lists[table_type].next; 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 * Delete all namespace entries owned by this table. Note that these
* entries can appear anywhere in the namespace by virtue of the AML * entries can appear anywhere in the namespace by virtue of the AML
......
...@@ -211,8 +211,7 @@ acpi_get_firmware_table ( ...@@ -211,8 +211,7 @@ acpi_get_firmware_table (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"RSDP located at %p, RSDT physical=%8.8X%8.8X \n", "RSDP located at %p, RSDT physical=%8.8X%8.8X \n",
acpi_gbl_RSDP, acpi_gbl_RSDP,
ACPI_HIDWORD (address.pointer.value), ACPI_FORMAT_UINT64 (address.pointer.value)));
ACPI_LODWORD (address.pointer.value)));
/* Insert processor_mode flags */ /* Insert processor_mode flags */
......
...@@ -902,71 +902,30 @@ acpi_ut_dump_allocations ( ...@@ -902,71 +902,30 @@ acpi_ut_dump_allocations (
descriptor = ACPI_CAST_PTR (union acpi_descriptor, &element->user_space); descriptor = ACPI_CAST_PTR (union acpi_descriptor, &element->user_space);
if (descriptor->descriptor_id != ACPI_DESC_TYPE_CACHED) { 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, 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)) { switch (ACPI_GET_DESCRIPTOR_TYPE (descriptor)) {
case ACPI_DESC_TYPE_OPERAND: 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), acpi_ut_get_type_name (descriptor->object.common.type),
descriptor->object.common.reference_count); descriptor->object.common.reference_count);
break; break;
case ACPI_DESC_TYPE_PARSER: case ACPI_DESC_TYPE_PARSER:
acpi_os_printf ("parse_obj aml_opcode %04hX", acpi_os_printf ("aml_opcode %04hX",
descriptor->op.asl.aml_opcode); descriptor->op.asl.aml_opcode);
break; break;
case ACPI_DESC_TYPE_NAMED: case ACPI_DESC_TYPE_NAMED:
acpi_os_printf ("Node %4.4s", acpi_os_printf ("%4.4s",
descriptor->node.name.ascii); acpi_ut_get_node_name (&descriptor->node));
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");
break; break;
default: default:
/* All types should appear above */
break; break;
} }
......
...@@ -447,7 +447,7 @@ acpi_ut_value_exit ( ...@@ -447,7 +447,7 @@ acpi_ut_value_exit (
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info, acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
"%s %8.8X%8.8X\n", acpi_gbl_fn_exit_str, "%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--; acpi_gbl_nesting_level--;
} }
......
...@@ -91,7 +91,7 @@ acpi_ut_evaluate_object ( ...@@ -91,7 +91,7 @@ acpi_ut_evaluate_object (
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
if (status == AE_NOT_FOUND) { if (status == AE_NOT_FOUND) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s.%s] was not found\n", 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 { else {
ACPI_REPORT_METHOD_ERROR ("Method execution failed", ACPI_REPORT_METHOD_ERROR ("Method execution failed",
...@@ -544,7 +544,7 @@ acpi_ut_execute_STA ( ...@@ -544,7 +544,7 @@ acpi_ut_execute_STA (
if (AE_NOT_FOUND == status) { if (AE_NOT_FOUND == status) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"_STA on %4.4s was not found, assuming device is present\n", "_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; *flags = 0x0F;
status = AE_OK; status = AE_OK;
......
...@@ -358,7 +358,7 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVE ...@@ -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_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_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_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 ( ...@@ -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) #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
/* /*
* Strings and procedures used for debug only * Strings and procedures used for debug only
......
...@@ -223,29 +223,10 @@ acpi_ut_valid_internal_object ( ...@@ -223,29 +223,10 @@ acpi_ut_valid_internal_object (
return (TRUE); 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: default:
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p is not not an ACPI operand obj [%s]\n",
"**** Obj %p has unknown descriptor type %X\n", object, object, acpi_ut_get_descriptor_name (object)));
ACPI_GET_DESCRIPTOR_TYPE (object)));
break; break;
} }
...@@ -322,7 +303,8 @@ acpi_ut_delete_object_desc ( ...@@ -322,7 +303,8 @@ acpi_ut_delete_object_desc (
if (ACPI_GET_DESCRIPTOR_TYPE (object) != ACPI_DESC_TYPE_OPERAND) { if (ACPI_GET_DESCRIPTOR_TYPE (object) != ACPI_DESC_TYPE_OPERAND) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 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; return_VOID;
} }
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
/* Version string */ /* Version string */
#define ACPI_CA_VERSION 0x20031002 #define ACPI_CA_VERSION 0x20031029
/* Maximum objects in the various object caches */ /* Maximum objects in the various object caches */
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
/* /*
* Data manipulation macros * Data manipulation macros
*/ */
#define ACPI_LOWORD(l) ((u16)(u32)(l)) #define ACPI_LOWORD(l) ((u16)(u32)(l))
#define ACPI_HIWORD(l) ((u16)((((u32)(l)) >> 16) & 0xFFFF)) #define ACPI_HIWORD(l) ((u16)((((u32)(l)) >> 16) & 0xFFFF))
#define ACPI_LOBYTE(l) ((u8)(u16)(l)) #define ACPI_LOBYTE(l) ((u8)(u16)(l))
...@@ -94,7 +93,15 @@ ...@@ -94,7 +93,15 @@
#endif #endif
#endif #endif
/* /*
* 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 * 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 * get into potential aligment issues -- see the STORE macros below
*/ */
...@@ -129,7 +136,6 @@ ...@@ -129,7 +136,6 @@
* If the hardware supports the transfer of unaligned data, just do the store. * If the hardware supports the transfer of unaligned data, just do the store.
* Otherwise, we have to move one byte at a time. * Otherwise, we have to move one byte at a time.
*/ */
#ifdef ACPI_BIG_ENDIAN #ifdef ACPI_BIG_ENDIAN
/* /*
* Macros for big-endian machines * Macros for big-endian machines
...@@ -299,7 +305,6 @@ ...@@ -299,7 +305,6 @@
/* /*
* Fast power-of-two math macros for non-optimized compilers * Fast power-of-two math macros for non-optimized compilers
*/ */
#define _ACPI_DIV(value,power_of2) ((u32) ((value) >> (power_of2))) #define _ACPI_DIV(value,power_of2) ((u32) ((value) >> (power_of2)))
#define _ACPI_MUL(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))) #define _ACPI_MOD(value,divisor) ((u32) ((value) & ((divisor) -1)))
...@@ -443,7 +448,6 @@ ...@@ -443,7 +448,6 @@
/* /*
* Reporting macros that are never compiled out * Reporting macros that are never compiled out
*/ */
#define ACPI_PARAM_LIST(pl) pl #define ACPI_PARAM_LIST(pl) pl
/* /*
...@@ -451,7 +455,6 @@ ...@@ -451,7 +455,6 @@
* _THIS_MODULE gets compiled out when ACPI_DEBUG_OUTPUT isn't defined, only * _THIS_MODULE gets compiled out when ACPI_DEBUG_OUTPUT isn't defined, only
* use it in debug mode. * use it in debug mode.
*/ */
#ifdef ACPI_DEBUG_OUTPUT #ifdef ACPI_DEBUG_OUTPUT
#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_THIS_MODULE,__LINE__,_COMPONENT); \ #define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_THIS_MODULE,__LINE__,_COMPONENT); \
...@@ -490,7 +493,6 @@ ...@@ -490,7 +493,6 @@
/* /*
* Debug macros that are conditionally compiled * Debug macros that are conditionally compiled
*/ */
#ifdef ACPI_DEBUG_OUTPUT #ifdef ACPI_DEBUG_OUTPUT
#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_THIS_MODULE = name; #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_THIS_MODULE = name;
...@@ -500,7 +502,6 @@ ...@@ -500,7 +502,6 @@
* The first parameter should be the procedure name as a quoted string. This is declared * 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. * 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; \ #define ACPI_FUNCTION_NAME(a) struct acpi_debug_print_info _dbg; \
_dbg.component_id = _COMPONENT; \ _dbg.component_id = _COMPONENT; \
_dbg.proc_name = a; \ _dbg.proc_name = a; \
...@@ -562,7 +563,6 @@ ...@@ -562,7 +563,6 @@
/* /*
* Generate INT3 on ACPI_ERROR (Debug only!) * Generate INT3 on ACPI_ERROR (Debug only!)
*/ */
#define ACPI_ERROR_BREAK #define ACPI_ERROR_BREAK
#ifdef ACPI_ERROR_BREAK #ifdef ACPI_ERROR_BREAK
#define ACPI_BREAK_ON_ERROR(lvl) if ((lvl)&ACPI_ERROR) \ #define ACPI_BREAK_ON_ERROR(lvl) if ((lvl)&ACPI_ERROR) \
...@@ -577,7 +577,6 @@ ...@@ -577,7 +577,6 @@
* 1) Debug print for the current component is enabled * 1) Debug print for the current component is enabled
* 2) Debug error level or trace level for the print statement 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(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_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl)
...@@ -587,7 +586,6 @@ ...@@ -587,7 +586,6 @@
* This is the non-debug case -- make everything go away, * This is the non-debug case -- make everything go away,
* leaving no executable debug code! * leaving no executable debug code!
*/ */
#define ACPI_MODULE_NAME(name) #define ACPI_MODULE_NAME(name)
#define _THIS_MODULE "" #define _THIS_MODULE ""
...@@ -662,7 +660,6 @@ ...@@ -662,7 +660,6 @@
/* /*
* Memory allocation tracking (DEBUG ONLY) * Memory allocation tracking (DEBUG ONLY)
*/ */
#ifndef ACPI_DBG_TRACK_ALLOCATIONS #ifndef ACPI_DBG_TRACK_ALLOCATIONS
/* Memory allocation */ /* Memory allocation */
......
...@@ -464,21 +464,22 @@ union acpi_operand_object ...@@ -464,21 +464,22 @@ union acpi_operand_object
/* Object descriptor types */ /* Object descriptor types */
#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */ #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
#define ACPI_DESC_TYPE_STATE 0x20 #define ACPI_DESC_TYPE_STATE 0x02
#define ACPI_DESC_TYPE_STATE_UPDATE 0x21 #define ACPI_DESC_TYPE_STATE_UPDATE 0x03
#define ACPI_DESC_TYPE_STATE_PACKAGE 0x22 #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04
#define ACPI_DESC_TYPE_STATE_CONTROL 0x23 #define ACPI_DESC_TYPE_STATE_CONTROL 0x05
#define ACPI_DESC_TYPE_STATE_RPSCOPE 0x24 #define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06
#define ACPI_DESC_TYPE_STATE_PSCOPE 0x25 #define ACPI_DESC_TYPE_STATE_PSCOPE 0x07
#define ACPI_DESC_TYPE_STATE_WSCOPE 0x26 #define ACPI_DESC_TYPE_STATE_WSCOPE 0x08
#define ACPI_DESC_TYPE_STATE_RESULT 0x27 #define ACPI_DESC_TYPE_STATE_RESULT 0x09
#define ACPI_DESC_TYPE_STATE_NOTIFY 0x28 #define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A
#define ACPI_DESC_TYPE_STATE_THREAD 0x29 #define ACPI_DESC_TYPE_STATE_THREAD 0x0B
#define ACPI_DESC_TYPE_WALK 0x44 #define ACPI_DESC_TYPE_WALK 0x0C
#define ACPI_DESC_TYPE_PARSER 0x66 #define ACPI_DESC_TYPE_PARSER 0x0D
#define ACPI_DESC_TYPE_OPERAND 0x88 #define ACPI_DESC_TYPE_OPERAND 0x0E
#define ACPI_DESC_TYPE_NAMED 0xAA #define ACPI_DESC_TYPE_NAMED 0x0F
#define ACPI_DESC_TYPE_MAX 0x0F
union acpi_descriptor union acpi_descriptor
......
...@@ -124,6 +124,14 @@ char * ...@@ -124,6 +124,14 @@ char *
acpi_ut_get_type_name ( acpi_ut_get_type_name (
acpi_object_type type); acpi_object_type type);
char *
acpi_ut_get_node_name (
void *object);
char *
acpi_ut_get_descriptor_name (
void *object);
char * char *
acpi_ut_get_object_type_name ( acpi_ut_get_object_type_name (
union acpi_operand_object *obj_desc); 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