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