diff options
Diffstat (limited to 'drivers/acpi/executer/exdump.c')
| -rw-r--r-- | drivers/acpi/executer/exdump.c | 87 |
1 files changed, 40 insertions, 47 deletions
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 2be2e2bf95b..d087a7d28aa 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
| @@ -45,7 +45,6 @@ | |||
| 45 | #include <acpi/acinterp.h> | 45 | #include <acpi/acinterp.h> |
| 46 | #include <acpi/amlcode.h> | 46 | #include <acpi/amlcode.h> |
| 47 | #include <acpi/acnamesp.h> | 47 | #include <acpi/acnamesp.h> |
| 48 | #include <acpi/acparser.h> | ||
| 49 | 48 | ||
| 50 | #define _COMPONENT ACPI_EXECUTER | 49 | #define _COMPONENT ACPI_EXECUTER |
| 51 | ACPI_MODULE_NAME("exdump") | 50 | ACPI_MODULE_NAME("exdump") |
| @@ -214,10 +213,11 @@ static struct acpi_exdump_info acpi_ex_dump_index_field[5] = { | |||
| 214 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"} | 213 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"} |
| 215 | }; | 214 | }; |
| 216 | 215 | ||
| 217 | static struct acpi_exdump_info acpi_ex_dump_reference[7] = { | 216 | static struct acpi_exdump_info acpi_ex_dump_reference[8] = { |
| 218 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL}, | 217 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL}, |
| 218 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.class), "Class"}, | ||
| 219 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, | 219 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, |
| 220 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.offset), "Offset"}, | 220 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.value), "Value"}, |
| 221 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, | 221 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, |
| 222 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, | 222 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, |
| 223 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, | 223 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, |
| @@ -413,10 +413,10 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, | |||
| 413 | 413 | ||
| 414 | case ACPI_EXD_REFERENCE: | 414 | case ACPI_EXD_REFERENCE: |
| 415 | 415 | ||
| 416 | acpi_ex_out_string("Opcode", | 416 | acpi_ex_out_string("Class Name", |
| 417 | (acpi_ps_get_opcode_info | 417 | (char *) |
| 418 | (obj_desc->reference.opcode))-> | 418 | acpi_ut_get_reference_name |
| 419 | name); | 419 | (obj_desc)); |
| 420 | acpi_ex_dump_reference_obj(obj_desc); | 420 | acpi_ex_dump_reference_obj(obj_desc); |
| 421 | break; | 421 | break; |
| 422 | 422 | ||
| @@ -494,40 +494,41 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 494 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | 494 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { |
| 495 | case ACPI_TYPE_LOCAL_REFERENCE: | 495 | case ACPI_TYPE_LOCAL_REFERENCE: |
| 496 | 496 | ||
| 497 | switch (obj_desc->reference.opcode) { | 497 | acpi_os_printf("Reference: [%s] ", |
| 498 | case AML_DEBUG_OP: | 498 | acpi_ut_get_reference_name(obj_desc)); |
| 499 | |||
| 500 | switch (obj_desc->reference.class) { | ||
| 501 | case ACPI_REFCLASS_DEBUG: | ||
| 499 | 502 | ||
| 500 | acpi_os_printf("Reference: Debug\n"); | 503 | acpi_os_printf("\n"); |
| 501 | break; | 504 | break; |
| 502 | 505 | ||
| 503 | case AML_INDEX_OP: | 506 | case ACPI_REFCLASS_INDEX: |
| 504 | 507 | ||
| 505 | acpi_os_printf("Reference: Index %p\n", | 508 | acpi_os_printf("%p\n", obj_desc->reference.object); |
| 506 | obj_desc->reference.object); | ||
| 507 | break; | 509 | break; |
| 508 | 510 | ||
| 509 | case AML_LOAD_OP: | 511 | case ACPI_REFCLASS_TABLE: |
| 510 | 512 | ||
| 511 | acpi_os_printf("Reference: [DdbHandle] TableIndex %p\n", | 513 | acpi_os_printf("Table Index %X\n", |
| 512 | obj_desc->reference.object); | 514 | obj_desc->reference.value); |
| 513 | break; | 515 | break; |
| 514 | 516 | ||
| 515 | case AML_REF_OF_OP: | 517 | case ACPI_REFCLASS_REFOF: |
| 516 | 518 | ||
| 517 | acpi_os_printf("Reference: (RefOf) %p [%s]\n", | 519 | acpi_os_printf("%p [%s]\n", obj_desc->reference.object, |
| 518 | obj_desc->reference.object, | ||
| 519 | acpi_ut_get_type_name(((union | 520 | acpi_ut_get_type_name(((union |
| 520 | acpi_operand_object | 521 | acpi_operand_object |
| 521 | *)obj_desc-> | 522 | *) |
| 523 | obj_desc-> | ||
| 522 | reference. | 524 | reference. |
| 523 | object)->common. | 525 | object)->common. |
| 524 | type)); | 526 | type)); |
| 525 | break; | 527 | break; |
| 526 | 528 | ||
| 527 | case AML_ARG_OP: | 529 | case ACPI_REFCLASS_ARG: |
| 528 | 530 | ||
| 529 | acpi_os_printf("Reference: Arg%d", | 531 | acpi_os_printf("%X", obj_desc->reference.value); |
| 530 | obj_desc->reference.offset); | ||
| 531 | 532 | ||
| 532 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 533 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
| 533 | 534 | ||
| @@ -542,10 +543,9 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 542 | acpi_os_printf("\n"); | 543 | acpi_os_printf("\n"); |
| 543 | break; | 544 | break; |
| 544 | 545 | ||
| 545 | case AML_LOCAL_OP: | 546 | case ACPI_REFCLASS_LOCAL: |
| 546 | 547 | ||
| 547 | acpi_os_printf("Reference: Local%d", | 548 | acpi_os_printf("%X", obj_desc->reference.value); |
| 548 | obj_desc->reference.offset); | ||
| 549 | 549 | ||
| 550 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 550 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
| 551 | 551 | ||
| @@ -560,21 +560,16 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 560 | acpi_os_printf("\n"); | 560 | acpi_os_printf("\n"); |
| 561 | break; | 561 | break; |
| 562 | 562 | ||
| 563 | case AML_INT_NAMEPATH_OP: | 563 | case ACPI_REFCLASS_NAME: |
| 564 | 564 | ||
| 565 | acpi_os_printf("Reference: Namepath %X [%4.4s]\n", | 565 | acpi_os_printf("- [%4.4s]\n", |
| 566 | obj_desc->reference.node->name.integer, | ||
| 567 | obj_desc->reference.node->name.ascii); | 566 | obj_desc->reference.node->name.ascii); |
| 568 | break; | 567 | break; |
| 569 | 568 | ||
| 570 | default: | 569 | default: /* Unknown reference class */ |
| 571 | |||
| 572 | /* Unknown opcode */ | ||
| 573 | 570 | ||
| 574 | acpi_os_printf("Unknown Reference opcode=%X\n", | 571 | acpi_os_printf("%2.2X\n", obj_desc->reference.class); |
| 575 | obj_desc->reference.opcode); | ||
| 576 | break; | 572 | break; |
| 577 | |||
| 578 | } | 573 | } |
| 579 | break; | 574 | break; |
| 580 | 575 | ||
| @@ -865,8 +860,8 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) | |||
| 865 | 860 | ||
| 866 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; | 861 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; |
| 867 | 862 | ||
| 868 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { | 863 | if (obj_desc->reference.class == ACPI_REFCLASS_NAME) { |
| 869 | acpi_os_printf(" Named Object %p ", obj_desc->reference.node); | 864 | acpi_os_printf(" %p ", obj_desc->reference.node); |
| 870 | 865 | ||
| 871 | status = | 866 | status = |
| 872 | acpi_ns_handle_to_pathname(obj_desc->reference.node, | 867 | acpi_ns_handle_to_pathname(obj_desc->reference.node, |
| @@ -882,14 +877,12 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) | |||
| 882 | ACPI_DESC_TYPE_OPERAND) { | 877 | ACPI_DESC_TYPE_OPERAND) { |
| 883 | acpi_os_printf(" Target: %p", | 878 | acpi_os_printf(" Target: %p", |
| 884 | obj_desc->reference.object); | 879 | obj_desc->reference.object); |
| 885 | if (obj_desc->reference.opcode == AML_LOAD_OP) { | 880 | if (obj_desc->reference.class == ACPI_REFCLASS_TABLE) { |
| 886 | /* | 881 | acpi_os_printf(" Table Index: %X\n", |
| 887 | * For DDBHandle reference, | 882 | obj_desc->reference.value); |
| 888 | * obj_desc->Reference.Object is the table index | ||
| 889 | */ | ||
| 890 | acpi_os_printf(" [DDBHandle]\n"); | ||
| 891 | } else { | 883 | } else { |
| 892 | acpi_os_printf(" [%s]\n", | 884 | acpi_os_printf(" Target: %p [%s]\n", |
| 885 | obj_desc->reference.object, | ||
| 893 | acpi_ut_get_type_name(((union | 886 | acpi_ut_get_type_name(((union |
| 894 | acpi_operand_object | 887 | acpi_operand_object |
| 895 | *) | 888 | *) |
| @@ -988,9 +981,9 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, | |||
| 988 | 981 | ||
| 989 | case ACPI_TYPE_LOCAL_REFERENCE: | 982 | case ACPI_TYPE_LOCAL_REFERENCE: |
| 990 | 983 | ||
| 991 | acpi_os_printf("[Object Reference] %s", | 984 | acpi_os_printf("[Object Reference] Type [%s] %2.2X", |
| 992 | (acpi_ps_get_opcode_info | 985 | acpi_ut_get_reference_name(obj_desc), |
| 993 | (obj_desc->reference.opcode))->name); | 986 | obj_desc->reference.class); |
| 994 | acpi_ex_dump_reference_obj(obj_desc); | 987 | acpi_ex_dump_reference_obj(obj_desc); |
| 995 | break; | 988 | break; |
| 996 | 989 | ||
