[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -41,31 +41,22 @@
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
|
||||
#include <acpi/acpi.h>
|
||||
#include <acpi/acnamesp.h>
|
||||
#include <acpi/acparser.h>
|
||||
|
||||
|
||||
#define _COMPONENT ACPI_NAMESPACE
|
||||
ACPI_MODULE_NAME ("nsdump")
|
||||
ACPI_MODULE_NAME("nsdump")
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
||||
void
|
||||
acpi_ns_dump_root_devices (
|
||||
void);
|
||||
void acpi_ns_dump_root_devices(void);
|
||||
|
||||
static acpi_status
|
||||
acpi_ns_dump_one_device (
|
||||
acpi_handle obj_handle,
|
||||
u32 level,
|
||||
void *context,
|
||||
void **return_value);
|
||||
acpi_ns_dump_one_device(acpi_handle obj_handle,
|
||||
u32 level, void *context, void **return_value);
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -80,43 +71,38 @@ acpi_ns_dump_one_device (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
acpi_ns_print_pathname (
|
||||
u32 num_segments,
|
||||
char *pathname)
|
||||
void acpi_ns_print_pathname(u32 num_segments, char *pathname)
|
||||
{
|
||||
acpi_native_uint i;
|
||||
acpi_native_uint i;
|
||||
|
||||
ACPI_FUNCTION_NAME("ns_print_pathname");
|
||||
|
||||
ACPI_FUNCTION_NAME ("ns_print_pathname");
|
||||
|
||||
|
||||
if (!(acpi_dbg_level & ACPI_LV_NAMES) || !(acpi_dbg_layer & ACPI_NAMESPACE)) {
|
||||
if (!(acpi_dbg_level & ACPI_LV_NAMES)
|
||||
|| !(acpi_dbg_layer & ACPI_NAMESPACE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Print the entire name */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "["));
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "["));
|
||||
|
||||
while (num_segments) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
ACPI_IS_PRINT (pathname[i]) ?
|
||||
acpi_os_printf ("%c", pathname[i]) :
|
||||
acpi_os_printf ("?");
|
||||
ACPI_IS_PRINT(pathname[i]) ?
|
||||
acpi_os_printf("%c", pathname[i]) :
|
||||
acpi_os_printf("?");
|
||||
}
|
||||
|
||||
pathname += ACPI_NAME_SIZE;
|
||||
num_segments--;
|
||||
if (num_segments) {
|
||||
acpi_os_printf (".");
|
||||
acpi_os_printf(".");
|
||||
}
|
||||
}
|
||||
|
||||
acpi_os_printf ("]\n");
|
||||
acpi_os_printf("]\n");
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ns_dump_pathname
|
||||
@@ -134,15 +120,10 @@ acpi_ns_print_pathname (
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
acpi_ns_dump_pathname (
|
||||
acpi_handle handle,
|
||||
char *msg,
|
||||
u32 level,
|
||||
u32 component)
|
||||
acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component)
|
||||
{
|
||||
|
||||
ACPI_FUNCTION_TRACE ("ns_dump_pathname");
|
||||
|
||||
ACPI_FUNCTION_TRACE("ns_dump_pathname");
|
||||
|
||||
/* Do this only if the requested debug level and component are enabled */
|
||||
|
||||
@@ -152,12 +133,11 @@ acpi_ns_dump_pathname (
|
||||
|
||||
/* Convert handle to a full pathname and print it (with supplied message) */
|
||||
|
||||
acpi_ns_print_node_pathname (handle, msg);
|
||||
acpi_os_printf ("\n");
|
||||
acpi_ns_print_node_pathname(handle, msg);
|
||||
acpi_os_printf("\n");
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ns_dump_one_object
|
||||
@@ -175,24 +155,19 @@ acpi_ns_dump_pathname (
|
||||
******************************************************************************/
|
||||
|
||||
acpi_status
|
||||
acpi_ns_dump_one_object (
|
||||
acpi_handle obj_handle,
|
||||
u32 level,
|
||||
void *context,
|
||||
void **return_value)
|
||||
acpi_ns_dump_one_object(acpi_handle obj_handle,
|
||||
u32 level, void *context, void **return_value)
|
||||
{
|
||||
struct acpi_walk_info *info = (struct acpi_walk_info *) context;
|
||||
struct acpi_namespace_node *this_node;
|
||||
union acpi_operand_object *obj_desc = NULL;
|
||||
acpi_object_type obj_type;
|
||||
acpi_object_type type;
|
||||
u32 bytes_to_dump;
|
||||
u32 dbg_level;
|
||||
u32 i;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME ("ns_dump_one_object");
|
||||
struct acpi_walk_info *info = (struct acpi_walk_info *)context;
|
||||
struct acpi_namespace_node *this_node;
|
||||
union acpi_operand_object *obj_desc = NULL;
|
||||
acpi_object_type obj_type;
|
||||
acpi_object_type type;
|
||||
u32 bytes_to_dump;
|
||||
u32 dbg_level;
|
||||
u32 i;
|
||||
|
||||
ACPI_FUNCTION_NAME("ns_dump_one_object");
|
||||
|
||||
/* Is output enabled? */
|
||||
|
||||
@@ -201,48 +176,47 @@ acpi_ns_dump_one_object (
|
||||
}
|
||||
|
||||
if (!obj_handle) {
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Null object handle\n"));
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Null object handle\n"));
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
this_node = acpi_ns_map_handle_to_node (obj_handle);
|
||||
this_node = acpi_ns_map_handle_to_node(obj_handle);
|
||||
type = this_node->type;
|
||||
|
||||
/* Check if the owner matches */
|
||||
|
||||
if ((info->owner_id != ACPI_OWNER_ID_MAX) &&
|
||||
(info->owner_id != this_node->owner_id)) {
|
||||
(info->owner_id != this_node->owner_id)) {
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
if (!(info->display_type & ACPI_DISPLAY_SHORT)) {
|
||||
/* Indent the object according to the level */
|
||||
|
||||
acpi_os_printf ("%2d%*s", (u32) level - 1, (int) level * 2, " ");
|
||||
acpi_os_printf("%2d%*s", (u32) level - 1, (int)level * 2, " ");
|
||||
|
||||
/* Check the node type and name */
|
||||
|
||||
if (type > ACPI_TYPE_LOCAL_MAX) {
|
||||
ACPI_REPORT_WARNING (("Invalid ACPI Type %08X\n", type));
|
||||
ACPI_REPORT_WARNING(("Invalid ACPI Type %08X\n", type));
|
||||
}
|
||||
|
||||
if (!acpi_ut_valid_acpi_name (this_node->name.integer)) {
|
||||
ACPI_REPORT_WARNING (("Invalid ACPI Name %08X\n",
|
||||
this_node->name.integer));
|
||||
if (!acpi_ut_valid_acpi_name(this_node->name.integer)) {
|
||||
ACPI_REPORT_WARNING(("Invalid ACPI Name %08X\n",
|
||||
this_node->name.integer));
|
||||
}
|
||||
|
||||
acpi_os_printf ("%4.4s", acpi_ut_get_node_name (this_node));
|
||||
acpi_os_printf("%4.4s", acpi_ut_get_node_name(this_node));
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we can print out the pertinent information
|
||||
*/
|
||||
acpi_os_printf (" %-12s %p ",
|
||||
acpi_ut_get_type_name (type), this_node);
|
||||
acpi_os_printf(" %-12s %p ", acpi_ut_get_type_name(type), this_node);
|
||||
|
||||
dbg_level = acpi_dbg_level;
|
||||
acpi_dbg_level = 0;
|
||||
obj_desc = acpi_ns_get_attached_object (this_node);
|
||||
obj_desc = acpi_ns_get_attached_object(this_node);
|
||||
acpi_dbg_level = dbg_level;
|
||||
|
||||
switch (info->display_type & ACPI_DISPLAY_MASK) {
|
||||
@@ -251,147 +225,166 @@ acpi_ns_dump_one_object (
|
||||
if (!obj_desc) {
|
||||
/* No attached object, we are done */
|
||||
|
||||
acpi_os_printf ("\n");
|
||||
acpi_os_printf("\n");
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
|
||||
acpi_os_printf ("ID %X Len %.4X Addr %p\n",
|
||||
obj_desc->processor.proc_id, obj_desc->processor.length,
|
||||
(char *) obj_desc->processor.address);
|
||||
acpi_os_printf("ID %X Len %.4X Addr %p\n",
|
||||
obj_desc->processor.proc_id,
|
||||
obj_desc->processor.length,
|
||||
(char *)obj_desc->processor.address);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_DEVICE:
|
||||
|
||||
acpi_os_printf ("Notify Object: %p\n", obj_desc);
|
||||
acpi_os_printf("Notify Object: %p\n", obj_desc);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_METHOD:
|
||||
|
||||
acpi_os_printf ("Args %X Len %.4X Aml %p\n",
|
||||
(u32) obj_desc->method.param_count,
|
||||
obj_desc->method.aml_length, obj_desc->method.aml_start);
|
||||
acpi_os_printf("Args %X Len %.4X Aml %p\n",
|
||||
(u32) obj_desc->method.param_count,
|
||||
obj_desc->method.aml_length,
|
||||
obj_desc->method.aml_start);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
||||
acpi_os_printf ("= %8.8X%8.8X\n",
|
||||
ACPI_FORMAT_UINT64 (obj_desc->integer.value));
|
||||
acpi_os_printf("= %8.8X%8.8X\n",
|
||||
ACPI_FORMAT_UINT64(obj_desc->integer.
|
||||
value));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
|
||||
if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
|
||||
acpi_os_printf ("Elements %.2X\n",
|
||||
obj_desc->package.count);
|
||||
}
|
||||
else {
|
||||
acpi_os_printf ("[Length not yet evaluated]\n");
|
||||
acpi_os_printf("Elements %.2X\n",
|
||||
obj_desc->package.count);
|
||||
} else {
|
||||
acpi_os_printf("[Length not yet evaluated]\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
|
||||
acpi_os_printf ("Len %.2X",
|
||||
obj_desc->buffer.length);
|
||||
acpi_os_printf("Len %.2X",
|
||||
obj_desc->buffer.length);
|
||||
|
||||
/* Dump some of the buffer */
|
||||
|
||||
if (obj_desc->buffer.length > 0) {
|
||||
acpi_os_printf (" =");
|
||||
for (i = 0; (i < obj_desc->buffer.length && i < 12); i++) {
|
||||
acpi_os_printf (" %.2hX", obj_desc->buffer.pointer[i]);
|
||||
acpi_os_printf(" =");
|
||||
for (i = 0;
|
||||
(i < obj_desc->buffer.length
|
||||
&& i < 12); i++) {
|
||||
acpi_os_printf(" %.2hX",
|
||||
obj_desc->buffer.
|
||||
pointer[i]);
|
||||
}
|
||||
}
|
||||
acpi_os_printf ("\n");
|
||||
}
|
||||
else {
|
||||
acpi_os_printf ("[Length not yet evaluated]\n");
|
||||
acpi_os_printf("\n");
|
||||
} else {
|
||||
acpi_os_printf("[Length not yet evaluated]\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
acpi_os_printf ("Len %.2X ", obj_desc->string.length);
|
||||
acpi_ut_print_string (obj_desc->string.pointer, 32);
|
||||
acpi_os_printf ("\n");
|
||||
acpi_os_printf("Len %.2X ", obj_desc->string.length);
|
||||
acpi_ut_print_string(obj_desc->string.pointer, 32);
|
||||
acpi_os_printf("\n");
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_REGION:
|
||||
|
||||
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) {
|
||||
acpi_os_printf (" Addr %8.8X%8.8X Len %.4X\n",
|
||||
ACPI_FORMAT_UINT64 (obj_desc->region.address),
|
||||
obj_desc->region.length);
|
||||
}
|
||||
else {
|
||||
acpi_os_printf (" [Address/Length not yet evaluated]\n");
|
||||
acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
|
||||
ACPI_FORMAT_UINT64(obj_desc->
|
||||
region.
|
||||
address),
|
||||
obj_desc->region.length);
|
||||
} else {
|
||||
acpi_os_printf
|
||||
(" [Address/Length not yet evaluated]\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_LOCAL_REFERENCE:
|
||||
|
||||
acpi_os_printf ("[%s]\n",
|
||||
acpi_ps_get_opcode_name (obj_desc->reference.opcode));
|
||||
acpi_os_printf("[%s]\n",
|
||||
acpi_ps_get_opcode_name(obj_desc->
|
||||
reference.
|
||||
opcode));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
|
||||
if (obj_desc->buffer_field.buffer_obj &&
|
||||
obj_desc->buffer_field.buffer_obj->buffer.node) {
|
||||
acpi_os_printf ("Buf [%4.4s]",
|
||||
acpi_ut_get_node_name (obj_desc->buffer_field.buffer_obj->buffer.node));
|
||||
obj_desc->buffer_field.buffer_obj->buffer.node) {
|
||||
acpi_os_printf("Buf [%4.4s]",
|
||||
acpi_ut_get_node_name(obj_desc->
|
||||
buffer_field.
|
||||
buffer_obj->
|
||||
buffer.
|
||||
node));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
|
||||
acpi_os_printf ("Rgn [%4.4s]",
|
||||
acpi_ut_get_node_name (obj_desc->common_field.region_obj->region.node));
|
||||
acpi_os_printf("Rgn [%4.4s]",
|
||||
acpi_ut_get_node_name(obj_desc->
|
||||
common_field.
|
||||
region_obj->region.
|
||||
node));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
|
||||
acpi_os_printf ("Rgn [%4.4s] Bnk [%4.4s]",
|
||||
acpi_ut_get_node_name (obj_desc->common_field.region_obj->region.node),
|
||||
acpi_ut_get_node_name (obj_desc->bank_field.bank_obj->common_field.node));
|
||||
acpi_os_printf("Rgn [%4.4s] Bnk [%4.4s]",
|
||||
acpi_ut_get_node_name(obj_desc->
|
||||
common_field.
|
||||
region_obj->region.
|
||||
node),
|
||||
acpi_ut_get_node_name(obj_desc->
|
||||
bank_field.
|
||||
bank_obj->
|
||||
common_field.
|
||||
node));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||
|
||||
acpi_os_printf ("Idx [%4.4s] Dat [%4.4s]",
|
||||
acpi_ut_get_node_name (obj_desc->index_field.index_obj->common_field.node),
|
||||
acpi_ut_get_node_name (obj_desc->index_field.data_obj->common_field.node));
|
||||
acpi_os_printf("Idx [%4.4s] Dat [%4.4s]",
|
||||
acpi_ut_get_node_name(obj_desc->
|
||||
index_field.
|
||||
index_obj->
|
||||
common_field.node),
|
||||
acpi_ut_get_node_name(obj_desc->
|
||||
index_field.
|
||||
data_obj->
|
||||
common_field.
|
||||
node));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_LOCAL_ALIAS:
|
||||
case ACPI_TYPE_LOCAL_METHOD_ALIAS:
|
||||
|
||||
acpi_os_printf ("Target %4.4s (%p)\n",
|
||||
acpi_ut_get_node_name (obj_desc), obj_desc);
|
||||
acpi_os_printf("Target %4.4s (%p)\n",
|
||||
acpi_ut_get_node_name(obj_desc),
|
||||
obj_desc);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
acpi_os_printf ("Object %p\n", obj_desc);
|
||||
acpi_os_printf("Object %p\n", obj_desc);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -403,11 +396,15 @@ acpi_ns_dump_one_object (
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||
|
||||
acpi_os_printf (" Off %.3X Len %.2X Acc %.2hd\n",
|
||||
(obj_desc->common_field.base_byte_offset * 8)
|
||||
+ obj_desc->common_field.start_field_bit_offset,
|
||||
obj_desc->common_field.bit_length,
|
||||
obj_desc->common_field.access_byte_width);
|
||||
acpi_os_printf(" Off %.3X Len %.2X Acc %.2hd\n",
|
||||
(obj_desc->common_field.
|
||||
base_byte_offset * 8)
|
||||
+
|
||||
obj_desc->common_field.
|
||||
start_field_bit_offset,
|
||||
obj_desc->common_field.bit_length,
|
||||
obj_desc->common_field.
|
||||
access_byte_width);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -415,56 +412,55 @@ acpi_ns_dump_one_object (
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_DISPLAY_OBJECTS:
|
||||
|
||||
acpi_os_printf ("O:%p", obj_desc);
|
||||
acpi_os_printf("O:%p", obj_desc);
|
||||
if (!obj_desc) {
|
||||
/* No attached object, we are done */
|
||||
|
||||
acpi_os_printf ("\n");
|
||||
acpi_os_printf("\n");
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
acpi_os_printf ("(R%d)", obj_desc->common.reference_count);
|
||||
acpi_os_printf("(R%d)", obj_desc->common.reference_count);
|
||||
|
||||
switch (type) {
|
||||
case ACPI_TYPE_METHOD:
|
||||
|
||||
/* Name is a Method and its AML offset/length are set */
|
||||
|
||||
acpi_os_printf (" M:%p-%X\n", obj_desc->method.aml_start,
|
||||
obj_desc->method.aml_length);
|
||||
acpi_os_printf(" M:%p-%X\n", obj_desc->method.aml_start,
|
||||
obj_desc->method.aml_length);
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
||||
acpi_os_printf (" I:%8.8X8.8%X\n",
|
||||
ACPI_FORMAT_UINT64 (obj_desc->integer.value));
|
||||
acpi_os_printf(" I:%8.8X8.8%X\n",
|
||||
ACPI_FORMAT_UINT64(obj_desc->integer.
|
||||
value));
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
acpi_os_printf (" S:%p-%X\n", obj_desc->string.pointer,
|
||||
obj_desc->string.length);
|
||||
acpi_os_printf(" S:%p-%X\n", obj_desc->string.pointer,
|
||||
obj_desc->string.length);
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
acpi_os_printf (" B:%p-%X\n", obj_desc->buffer.pointer,
|
||||
obj_desc->buffer.length);
|
||||
acpi_os_printf(" B:%p-%X\n", obj_desc->buffer.pointer,
|
||||
obj_desc->buffer.length);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
acpi_os_printf ("\n");
|
||||
acpi_os_printf("\n");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
acpi_os_printf ("\n");
|
||||
acpi_os_printf("\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -474,46 +470,47 @@ acpi_ns_dump_one_object (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/* If there is an attached object, display it */
|
||||
|
||||
dbg_level = acpi_dbg_level;
|
||||
dbg_level = acpi_dbg_level;
|
||||
acpi_dbg_level = 0;
|
||||
obj_desc = acpi_ns_get_attached_object (this_node);
|
||||
obj_desc = acpi_ns_get_attached_object(this_node);
|
||||
acpi_dbg_level = dbg_level;
|
||||
|
||||
/* Dump attached objects */
|
||||
|
||||
while (obj_desc) {
|
||||
obj_type = ACPI_TYPE_INVALID;
|
||||
acpi_os_printf ("Attached Object %p: ", obj_desc);
|
||||
acpi_os_printf("Attached Object %p: ", obj_desc);
|
||||
|
||||
/* Decode the type of attached object and dump the contents */
|
||||
|
||||
switch (ACPI_GET_DESCRIPTOR_TYPE (obj_desc)) {
|
||||
switch (ACPI_GET_DESCRIPTOR_TYPE(obj_desc)) {
|
||||
case ACPI_DESC_TYPE_NAMED:
|
||||
|
||||
acpi_os_printf ("(Ptr to Node)\n");
|
||||
bytes_to_dump = sizeof (struct acpi_namespace_node);
|
||||
ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
|
||||
acpi_os_printf("(Ptr to Node)\n");
|
||||
bytes_to_dump = sizeof(struct acpi_namespace_node);
|
||||
ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
|
||||
break;
|
||||
|
||||
case ACPI_DESC_TYPE_OPERAND:
|
||||
|
||||
obj_type = ACPI_GET_OBJECT_TYPE (obj_desc);
|
||||
obj_type = ACPI_GET_OBJECT_TYPE(obj_desc);
|
||||
|
||||
if (obj_type > ACPI_TYPE_LOCAL_MAX) {
|
||||
acpi_os_printf ("(Ptr to ACPI Object type %X [UNKNOWN])\n",
|
||||
obj_type);
|
||||
acpi_os_printf
|
||||
("(Ptr to ACPI Object type %X [UNKNOWN])\n",
|
||||
obj_type);
|
||||
bytes_to_dump = 32;
|
||||
}
|
||||
else {
|
||||
acpi_os_printf ("(Ptr to ACPI Object type %X [%s])\n",
|
||||
obj_type, acpi_ut_get_type_name (obj_type));
|
||||
bytes_to_dump = sizeof (union acpi_operand_object);
|
||||
} else {
|
||||
acpi_os_printf
|
||||
("(Ptr to ACPI Object type %X [%s])\n",
|
||||
obj_type, acpi_ut_get_type_name(obj_type));
|
||||
bytes_to_dump =
|
||||
sizeof(union acpi_operand_object);
|
||||
}
|
||||
|
||||
ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
|
||||
ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -523,7 +520,8 @@ acpi_ns_dump_one_object (
|
||||
|
||||
/* If value is NOT an internal object, we are done */
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) !=
|
||||
ACPI_DESC_TYPE_OPERAND) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -537,49 +535,50 @@ acpi_ns_dump_one_object (
|
||||
* NOTE: takes advantage of common fields between string/buffer
|
||||
*/
|
||||
bytes_to_dump = obj_desc->string.length;
|
||||
obj_desc = (void *) obj_desc->string.pointer;
|
||||
acpi_os_printf ( "(Buffer/String pointer %p length %X)\n",
|
||||
obj_desc, bytes_to_dump);
|
||||
ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
|
||||
obj_desc = (void *)obj_desc->string.pointer;
|
||||
acpi_os_printf("(Buffer/String pointer %p length %X)\n",
|
||||
obj_desc, bytes_to_dump);
|
||||
ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
|
||||
goto cleanup;
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
obj_desc = (union acpi_operand_object *) obj_desc->buffer_field.buffer_obj;
|
||||
obj_desc =
|
||||
(union acpi_operand_object *)obj_desc->buffer_field.
|
||||
buffer_obj;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
obj_desc = (void *) obj_desc->package.elements;
|
||||
obj_desc = (void *)obj_desc->package.elements;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_METHOD:
|
||||
obj_desc = (void *) obj_desc->method.aml_start;
|
||||
obj_desc = (void *)obj_desc->method.aml_start;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
obj_desc = (void *) obj_desc->field.region_obj;
|
||||
obj_desc = (void *)obj_desc->field.region_obj;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
obj_desc = (void *) obj_desc->bank_field.region_obj;
|
||||
obj_desc = (void *)obj_desc->bank_field.region_obj;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||
obj_desc = (void *) obj_desc->index_field.index_obj;
|
||||
obj_desc = (void *)obj_desc->index_field.index_obj;
|
||||
break;
|
||||
|
||||
default:
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
obj_type = ACPI_TYPE_INVALID; /* Terminate loop after next pass */
|
||||
obj_type = ACPI_TYPE_INVALID; /* Terminate loop after next pass */
|
||||
}
|
||||
|
||||
cleanup:
|
||||
acpi_os_printf ("\n");
|
||||
cleanup:
|
||||
acpi_os_printf("\n");
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -601,29 +600,25 @@ cleanup:
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
acpi_ns_dump_objects (
|
||||
acpi_object_type type,
|
||||
u8 display_type,
|
||||
u32 max_depth,
|
||||
acpi_owner_id owner_id,
|
||||
acpi_handle start_handle)
|
||||
acpi_ns_dump_objects(acpi_object_type type,
|
||||
u8 display_type,
|
||||
u32 max_depth,
|
||||
acpi_owner_id owner_id, acpi_handle start_handle)
|
||||
{
|
||||
struct acpi_walk_info info;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
struct acpi_walk_info info;
|
||||
|
||||
ACPI_FUNCTION_ENTRY();
|
||||
|
||||
info.debug_level = ACPI_LV_TABLES;
|
||||
info.owner_id = owner_id;
|
||||
info.display_type = display_type;
|
||||
|
||||
(void) acpi_ns_walk_namespace (type, start_handle, max_depth,
|
||||
ACPI_NS_WALK_NO_UNLOCK, acpi_ns_dump_one_object,
|
||||
(void *) &info, NULL);
|
||||
(void)acpi_ns_walk_namespace(type, start_handle, max_depth,
|
||||
ACPI_NS_WALK_NO_UNLOCK,
|
||||
acpi_ns_dump_one_object, (void *)&info,
|
||||
NULL);
|
||||
}
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -638,25 +633,19 @@ acpi_ns_dump_objects (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
acpi_ns_dump_entry (
|
||||
acpi_handle handle,
|
||||
u32 debug_level)
|
||||
void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level)
|
||||
{
|
||||
struct acpi_walk_info info;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
struct acpi_walk_info info;
|
||||
|
||||
ACPI_FUNCTION_ENTRY();
|
||||
|
||||
info.debug_level = debug_level;
|
||||
info.owner_id = ACPI_OWNER_ID_MAX;
|
||||
info.display_type = ACPI_DISPLAY_SUMMARY;
|
||||
|
||||
(void) acpi_ns_dump_one_object (handle, 1, &info, NULL);
|
||||
(void)acpi_ns_dump_one_object(handle, 1, &info, NULL);
|
||||
}
|
||||
|
||||
|
||||
#ifdef ACPI_ASL_COMPILER
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -673,23 +662,19 @@ acpi_ns_dump_entry (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
acpi_ns_dump_tables (
|
||||
acpi_handle search_base,
|
||||
u32 max_depth)
|
||||
void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth)
|
||||
{
|
||||
acpi_handle search_handle = search_base;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("ns_dump_tables");
|
||||
acpi_handle search_handle = search_base;
|
||||
|
||||
ACPI_FUNCTION_TRACE("ns_dump_tables");
|
||||
|
||||
if (!acpi_gbl_root_node) {
|
||||
/*
|
||||
* If the name space has not been initialized,
|
||||
* there is nothing to dump.
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "namespace not initialized!\n"));
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
|
||||
"namespace not initialized!\n"));
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
@@ -697,12 +682,12 @@ acpi_ns_dump_tables (
|
||||
/* Entire namespace */
|
||||
|
||||
search_handle = acpi_gbl_root_node;
|
||||
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_OWNER_ID_MAX, search_handle);
|
||||
acpi_ns_dump_objects(ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, max_depth,
|
||||
ACPI_OWNER_ID_MAX, search_handle);
|
||||
return_VOID;
|
||||
}
|
||||
#endif /* _ACPI_ASL_COMPILER */
|
||||
#endif /* defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) */
|
||||
#endif /* _ACPI_ASL_COMPILER */
|
||||
#endif /* defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) */
|
||||
|
Reference in New Issue
Block a user