aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/namespace/nsdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/namespace/nsdump.c')
-rw-r--r--drivers/acpi/namespace/nsdump.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c
index 6c2aef0e0dd4..05af95322a62 100644
--- a/drivers/acpi/namespace/nsdump.c
+++ b/drivers/acpi/namespace/nsdump.c
@@ -475,7 +475,7 @@ acpi_ns_dump_one_object (
475 475
476 while (obj_desc) { 476 while (obj_desc) {
477 obj_type = ACPI_TYPE_INVALID; 477 obj_type = ACPI_TYPE_INVALID;
478 acpi_os_printf (" Attached Object %p: ", obj_desc); 478 acpi_os_printf ("Attached Object %p: ", obj_desc);
479 479
480 /* Decode the type of attached object and dump the contents */ 480 /* Decode the type of attached object and dump the contents */
481 481
@@ -484,9 +484,9 @@ acpi_ns_dump_one_object (
484 484
485 acpi_os_printf ("(Ptr to Node)\n"); 485 acpi_os_printf ("(Ptr to Node)\n");
486 bytes_to_dump = sizeof (struct acpi_namespace_node); 486 bytes_to_dump = sizeof (struct acpi_namespace_node);
487 ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
487 break; 488 break;
488 489
489
490 case ACPI_DESC_TYPE_OPERAND: 490 case ACPI_DESC_TYPE_OPERAND:
491 491
492 obj_type = ACPI_GET_OBJECT_TYPE (obj_desc); 492 obj_type = ACPI_GET_OBJECT_TYPE (obj_desc);
@@ -497,24 +497,19 @@ acpi_ns_dump_one_object (
497 bytes_to_dump = 32; 497 bytes_to_dump = 32;
498 } 498 }
499 else { 499 else {
500 acpi_os_printf ("(Ptr to ACPI Object type %s, %X)\n", 500 acpi_os_printf ("(Ptr to ACPI Object type %X [%s])\n",
501 acpi_ut_get_type_name (obj_type), obj_type); 501 obj_type, acpi_ut_get_type_name (obj_type));
502 bytes_to_dump = sizeof (union acpi_operand_object); 502 bytes_to_dump = sizeof (union acpi_operand_object);
503 } 503 }
504 break;
505 504
505 ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
506 break;
506 507
507 default: 508 default:
508 509
509 acpi_os_printf (
510 "(String or Buffer ptr - not an object descriptor) [%s]\n",
511 acpi_ut_get_descriptor_name (obj_desc));
512 bytes_to_dump = 16;
513 break; 510 break;
514 } 511 }
515 512
516 ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
517
518 /* If value is NOT an internal object, we are done */ 513 /* If value is NOT an internal object, we are done */
519 514
520 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) { 515 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
@@ -525,13 +520,17 @@ acpi_ns_dump_one_object (
525 * Valid object, get the pointer to next level, if any 520 * Valid object, get the pointer to next level, if any
526 */ 521 */
527 switch (obj_type) { 522 switch (obj_type) {
523 case ACPI_TYPE_BUFFER:
528 case ACPI_TYPE_STRING: 524 case ACPI_TYPE_STRING:
525 /*
526 * NOTE: takes advantage of common fields between string/buffer
527 */
528 bytes_to_dump = obj_desc->string.length;
529 obj_desc = (void *) obj_desc->string.pointer; 529 obj_desc = (void *) obj_desc->string.pointer;
530 break; 530 acpi_os_printf ( "(Buffer/String pointer %p length %X)\n",
531 531 obj_desc, bytes_to_dump);
532 case ACPI_TYPE_BUFFER: 532 ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
533 obj_desc = (void *) obj_desc->buffer.pointer; 533 goto cleanup;
534 break;
535 534
536 case ACPI_TYPE_BUFFER_FIELD: 535 case ACPI_TYPE_BUFFER_FIELD:
537 obj_desc = (union acpi_operand_object *) obj_desc->buffer_field.buffer_obj; 536 obj_desc = (union acpi_operand_object *) obj_desc->buffer_field.buffer_obj;