diff options
author | Len Brown <len.brown@intel.com> | 2006-06-15 15:19:48 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-15 15:19:48 -0400 |
commit | b3899c6613160b18f79e4356184de55311302fe4 (patch) | |
tree | 4aa7945bac59cbe5bb5d863be2d4ded285d3e936 /drivers/acpi/executer/exdump.c | |
parent | 553698f944ed715dfe023b4cef07601f0ce735f0 (diff) | |
parent | 4c90ece249992c7a2e3fc921e5cdb8eb92193067 (diff) |
Pull acpica into release branch
Diffstat (limited to 'drivers/acpi/executer/exdump.c')
-rw-r--r-- | drivers/acpi/executer/exdump.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index a7cca8d4f855..7b9718e976bf 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
@@ -61,6 +61,10 @@ static void acpi_ex_out_pointer(char *title, void *value); | |||
61 | 61 | ||
62 | static void acpi_ex_out_address(char *title, acpi_physical_address value); | 62 | static void acpi_ex_out_address(char *title, acpi_physical_address value); |
63 | 63 | ||
64 | static void | ||
65 | acpi_ex_dump_object(union acpi_operand_object *obj_desc, | ||
66 | struct acpi_exdump_info *info); | ||
67 | |||
64 | static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc); | 68 | static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc); |
65 | 69 | ||
66 | static void | 70 | static void |
@@ -119,7 +123,7 @@ static struct acpi_exdump_info acpi_ex_dump_event[2] = { | |||
119 | 123 | ||
120 | static struct acpi_exdump_info acpi_ex_dump_method[8] = { | 124 | static struct acpi_exdump_info acpi_ex_dump_method[8] = { |
121 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL}, | 125 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL}, |
122 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "param_count"}, | 126 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "ParamCount"}, |
123 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"}, | 127 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"}, |
124 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"}, | 128 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"}, |
125 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, | 129 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, |
@@ -263,12 +267,10 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { | |||
263 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} | 267 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} |
264 | }; | 268 | }; |
265 | 269 | ||
266 | static struct acpi_exdump_info acpi_ex_dump_node[6] = { | 270 | static struct acpi_exdump_info acpi_ex_dump_node[5] = { |
267 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, | 271 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, |
268 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, | 272 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, |
269 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, | 273 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, |
270 | {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(reference_count), | ||
271 | "Reference Count"}, | ||
272 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"}, | 274 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"}, |
273 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"} | 275 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"} |
274 | }; | 276 | }; |
@@ -330,7 +332,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, | |||
330 | 332 | ||
331 | if (!info) { | 333 | if (!info) { |
332 | acpi_os_printf | 334 | acpi_os_printf |
333 | ("ex_dump_object: Display not implemented for object type %s\n", | 335 | ("ExDumpObject: Display not implemented for object type %s\n", |
334 | acpi_ut_get_object_type_name(obj_desc)); | 336 | acpi_ut_get_object_type_name(obj_desc)); |
335 | return; | 337 | return; |
336 | } | 338 | } |
@@ -454,7 +456,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
454 | u32 length; | 456 | u32 length; |
455 | u32 index; | 457 | u32 index; |
456 | 458 | ||
457 | ACPI_FUNCTION_NAME("ex_dump_operand") | 459 | ACPI_FUNCTION_NAME(ex_dump_operand) |
458 | 460 | ||
459 | if (! | 461 | if (! |
460 | ((ACPI_LV_EXEC & acpi_dbg_level) | 462 | ((ACPI_LV_EXEC & acpi_dbg_level) |
@@ -463,6 +465,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
463 | } | 465 | } |
464 | 466 | ||
465 | if (!obj_desc) { | 467 | if (!obj_desc) { |
468 | |||
466 | /* This could be a null element of a package */ | 469 | /* This could be a null element of a package */ |
467 | 470 | ||
468 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Null Object Descriptor\n")); | 471 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Null Object Descriptor\n")); |
@@ -522,7 +525,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
522 | 525 | ||
523 | case AML_REF_OF_OP: | 526 | case AML_REF_OF_OP: |
524 | 527 | ||
525 | acpi_os_printf("Reference: (ref_of) %p\n", | 528 | acpi_os_printf("Reference: (RefOf) %p\n", |
526 | obj_desc->reference.object); | 529 | obj_desc->reference.object); |
527 | break; | 530 | break; |
528 | 531 | ||
@@ -532,6 +535,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
532 | obj_desc->reference.offset); | 535 | obj_desc->reference.offset); |
533 | 536 | ||
534 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 537 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
538 | |||
535 | /* Value is an Integer */ | 539 | /* Value is an Integer */ |
536 | 540 | ||
537 | acpi_os_printf(" value is [%8.8X%8.8x]", | 541 | acpi_os_printf(" value is [%8.8X%8.8x]", |
@@ -610,7 +614,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
610 | 614 | ||
611 | case ACPI_TYPE_PACKAGE: | 615 | case ACPI_TYPE_PACKAGE: |
612 | 616 | ||
613 | acpi_os_printf("Package [Len %X] element_array %p\n", | 617 | acpi_os_printf("Package [Len %X] ElementArray %p\n", |
614 | obj_desc->package.count, | 618 | obj_desc->package.count, |
615 | obj_desc->package.elements); | 619 | obj_desc->package.elements); |
616 | 620 | ||
@@ -662,13 +666,13 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
662 | 666 | ||
663 | case ACPI_TYPE_LOCAL_BANK_FIELD: | 667 | case ACPI_TYPE_LOCAL_BANK_FIELD: |
664 | 668 | ||
665 | acpi_os_printf("bank_field\n"); | 669 | acpi_os_printf("BankField\n"); |
666 | break; | 670 | break; |
667 | 671 | ||
668 | case ACPI_TYPE_LOCAL_REGION_FIELD: | 672 | case ACPI_TYPE_LOCAL_REGION_FIELD: |
669 | 673 | ||
670 | acpi_os_printf | 674 | acpi_os_printf |
671 | ("region_field: Bits=%X acc_width=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", | 675 | ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", |
672 | obj_desc->field.bit_length, | 676 | obj_desc->field.bit_length, |
673 | obj_desc->field.access_byte_width, | 677 | obj_desc->field.access_byte_width, |
674 | obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK, | 678 | obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK, |
@@ -681,12 +685,12 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
681 | 685 | ||
682 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | 686 | case ACPI_TYPE_LOCAL_INDEX_FIELD: |
683 | 687 | ||
684 | acpi_os_printf("index_field\n"); | 688 | acpi_os_printf("IndexField\n"); |
685 | break; | 689 | break; |
686 | 690 | ||
687 | case ACPI_TYPE_BUFFER_FIELD: | 691 | case ACPI_TYPE_BUFFER_FIELD: |
688 | 692 | ||
689 | acpi_os_printf("buffer_field: %X bits at byte %X bit %X of\n", | 693 | acpi_os_printf("BufferField: %X bits at byte %X bit %X of\n", |
690 | obj_desc->buffer_field.bit_length, | 694 | obj_desc->buffer_field.bit_length, |
691 | obj_desc->buffer_field.base_byte_offset, | 695 | obj_desc->buffer_field.base_byte_offset, |
692 | obj_desc->buffer_field.start_field_bit_offset); | 696 | obj_desc->buffer_field.start_field_bit_offset); |
@@ -777,7 +781,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, | |||
777 | { | 781 | { |
778 | acpi_native_uint i; | 782 | acpi_native_uint i; |
779 | 783 | ||
780 | ACPI_FUNCTION_NAME("ex_dump_operands"); | 784 | ACPI_FUNCTION_NAME(ex_dump_operands); |
781 | 785 | ||
782 | if (!ident) { | 786 | if (!ident) { |
783 | ident = "?"; | 787 | ident = "?"; |
@@ -901,7 +905,7 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) | |||
901 | acpi_os_printf("Could not convert name to pathname\n"); | 905 | acpi_os_printf("Could not convert name to pathname\n"); |
902 | } else { | 906 | } else { |
903 | acpi_os_printf("%s\n", (char *)ret_buf.pointer); | 907 | acpi_os_printf("%s\n", (char *)ret_buf.pointer); |
904 | ACPI_MEM_FREE(ret_buf.pointer); | 908 | ACPI_FREE(ret_buf.pointer); |
905 | } | 909 | } |
906 | } else if (obj_desc->reference.object) { | 910 | } else if (obj_desc->reference.object) { |
907 | acpi_os_printf("\nReferenced Object: %p\n", | 911 | acpi_os_printf("\nReferenced Object: %p\n", |
@@ -1017,7 +1021,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, | |||
1017 | void | 1021 | void |
1018 | acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | 1022 | acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) |
1019 | { | 1023 | { |
1020 | ACPI_FUNCTION_TRACE("ex_dump_object_descriptor"); | 1024 | ACPI_FUNCTION_TRACE(ex_dump_object_descriptor); |
1021 | 1025 | ||
1022 | if (!obj_desc) { | 1026 | if (!obj_desc) { |
1023 | return_VOID; | 1027 | return_VOID; |
@@ -1046,7 +1050,7 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
1046 | 1050 | ||
1047 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) { | 1051 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) { |
1048 | acpi_os_printf | 1052 | acpi_os_printf |
1049 | ("ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n", | 1053 | ("ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n", |
1050 | obj_desc, acpi_ut_get_descriptor_name(obj_desc)); | 1054 | obj_desc, acpi_ut_get_descriptor_name(obj_desc)); |
1051 | return_VOID; | 1055 | return_VOID; |
1052 | } | 1056 | } |