diff options
Diffstat (limited to 'drivers/acpi/acpica/exdump.c')
| -rw-r--r-- | drivers/acpi/acpica/exdump.c | 59 |
1 files changed, 15 insertions, 44 deletions
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c index aa313574b0df..89d141fdae0b 100644 --- a/drivers/acpi/acpica/exdump.c +++ b/drivers/acpi/acpica/exdump.c | |||
| @@ -350,6 +350,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, | |||
| 350 | break; | 350 | break; |
| 351 | 351 | ||
| 352 | case ACPI_EXD_TYPE: | 352 | case ACPI_EXD_TYPE: |
| 353 | |||
| 353 | acpi_ex_out_string("Type", | 354 | acpi_ex_out_string("Type", |
| 354 | acpi_ut_get_object_type_name | 355 | acpi_ut_get_object_type_name |
| 355 | (obj_desc)); | 356 | (obj_desc)); |
| @@ -422,6 +423,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, | |||
| 422 | break; | 423 | break; |
| 423 | 424 | ||
| 424 | default: | 425 | default: |
| 426 | |||
| 425 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", | 427 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", |
| 426 | info->opcode); | 428 | info->opcode); |
| 427 | return; | 429 | return; |
| @@ -492,7 +494,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 492 | 494 | ||
| 493 | /* Decode object type */ | 495 | /* Decode object type */ |
| 494 | 496 | ||
| 495 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | 497 | switch (obj_desc->common.type) { |
| 496 | case ACPI_TYPE_LOCAL_REFERENCE: | 498 | case ACPI_TYPE_LOCAL_REFERENCE: |
| 497 | 499 | ||
| 498 | acpi_os_printf("Reference: [%s] ", | 500 | acpi_os_printf("Reference: [%s] ", |
| @@ -527,44 +529,16 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 527 | type)); | 529 | type)); |
| 528 | break; | 530 | break; |
| 529 | 531 | ||
| 530 | case ACPI_REFCLASS_ARG: | 532 | case ACPI_REFCLASS_NAME: |
| 531 | |||
| 532 | acpi_os_printf("%X", obj_desc->reference.value); | ||
| 533 | |||
| 534 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | ||
| 535 | |||
| 536 | /* Value is an Integer */ | ||
| 537 | |||
| 538 | acpi_os_printf(" value is [%8.8X%8.8x]", | ||
| 539 | ACPI_FORMAT_UINT64(obj_desc-> | ||
| 540 | integer. | ||
| 541 | value)); | ||
| 542 | } | ||
| 543 | 533 | ||
| 544 | acpi_os_printf("\n"); | 534 | acpi_os_printf("- [%4.4s]\n", |
| 535 | obj_desc->reference.node->name.ascii); | ||
| 545 | break; | 536 | break; |
| 546 | 537 | ||
| 538 | case ACPI_REFCLASS_ARG: | ||
| 547 | case ACPI_REFCLASS_LOCAL: | 539 | case ACPI_REFCLASS_LOCAL: |
| 548 | 540 | ||
| 549 | acpi_os_printf("%X", obj_desc->reference.value); | 541 | acpi_os_printf("%X\n", obj_desc->reference.value); |
| 550 | |||
| 551 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | ||
| 552 | |||
| 553 | /* Value is an Integer */ | ||
| 554 | |||
| 555 | acpi_os_printf(" value is [%8.8X%8.8x]", | ||
| 556 | ACPI_FORMAT_UINT64(obj_desc-> | ||
| 557 | integer. | ||
| 558 | value)); | ||
| 559 | } | ||
| 560 | |||
| 561 | acpi_os_printf("\n"); | ||
| 562 | break; | ||
| 563 | |||
| 564 | case ACPI_REFCLASS_NAME: | ||
| 565 | |||
| 566 | acpi_os_printf("- [%4.4s]\n", | ||
| 567 | obj_desc->reference.node->name.ascii); | ||
| 568 | break; | 542 | break; |
| 569 | 543 | ||
| 570 | default: /* Unknown reference class */ | 544 | default: /* Unknown reference class */ |
| @@ -661,8 +635,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 661 | case ACPI_TYPE_LOCAL_REGION_FIELD: | 635 | case ACPI_TYPE_LOCAL_REGION_FIELD: |
| 662 | 636 | ||
| 663 | acpi_os_printf | 637 | acpi_os_printf |
| 664 | ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", | 638 | ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at " |
| 665 | obj_desc->field.bit_length, | 639 | "byte=%X bit=%X of below:\n", obj_desc->field.bit_length, |
| 666 | obj_desc->field.access_byte_width, | 640 | obj_desc->field.access_byte_width, |
| 667 | obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK, | 641 | obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK, |
| 668 | obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK, | 642 | obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK, |
| @@ -686,9 +660,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 686 | 660 | ||
| 687 | if (!obj_desc->buffer_field.buffer_obj) { | 661 | if (!obj_desc->buffer_field.buffer_obj) { |
| 688 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL*\n")); | 662 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL*\n")); |
| 689 | } else | 663 | } else if ((obj_desc->buffer_field.buffer_obj)->common.type != |
| 690 | if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) | 664 | ACPI_TYPE_BUFFER) { |
| 691 | != ACPI_TYPE_BUFFER) { | ||
| 692 | acpi_os_printf("*not a Buffer*\n"); | 665 | acpi_os_printf("*not a Buffer*\n"); |
| 693 | } else { | 666 | } else { |
| 694 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, | 667 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, |
| @@ -737,8 +710,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 737 | default: | 710 | default: |
| 738 | /* Unknown Type */ | 711 | /* Unknown Type */ |
| 739 | 712 | ||
| 740 | acpi_os_printf("Unknown Type %X\n", | 713 | acpi_os_printf("Unknown Type %X\n", obj_desc->common.type); |
| 741 | ACPI_GET_OBJECT_TYPE(obj_desc)); | ||
| 742 | break; | 714 | break; |
| 743 | } | 715 | } |
| 744 | 716 | ||
| @@ -939,7 +911,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, | |||
| 939 | 911 | ||
| 940 | /* Packages may only contain a few object types */ | 912 | /* Packages may only contain a few object types */ |
| 941 | 913 | ||
| 942 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | 914 | switch (obj_desc->common.type) { |
| 943 | case ACPI_TYPE_INTEGER: | 915 | case ACPI_TYPE_INTEGER: |
| 944 | 916 | ||
| 945 | acpi_os_printf("[Integer] = %8.8X%8.8X\n", | 917 | acpi_os_printf("[Integer] = %8.8X%8.8X\n", |
| @@ -990,8 +962,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, | |||
| 990 | 962 | ||
| 991 | default: | 963 | default: |
| 992 | 964 | ||
| 993 | acpi_os_printf("[Unknown Type] %X\n", | 965 | acpi_os_printf("[Unknown Type] %X\n", obj_desc->common.type); |
| 994 | ACPI_GET_OBJECT_TYPE(obj_desc)); | ||
| 995 | break; | 966 | break; |
| 996 | } | 967 | } |
| 997 | } | 968 | } |
