aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exdump.c')
-rw-r--r--drivers/acpi/executer/exdump.c67
1 files changed, 26 insertions, 41 deletions
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
index 74f1b22601b3..2be2e2bf95bf 100644
--- a/drivers/acpi/executer/exdump.c
+++ b/drivers/acpi/executer/exdump.c
@@ -580,25 +580,22 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
580 580
581 case ACPI_TYPE_BUFFER: 581 case ACPI_TYPE_BUFFER:
582 582
583 acpi_os_printf("Buffer len %X @ %p\n", 583 acpi_os_printf("Buffer length %.2X @ %p\n",
584 obj_desc->buffer.length, 584 obj_desc->buffer.length,
585 obj_desc->buffer.pointer); 585 obj_desc->buffer.pointer);
586 586
587 length = obj_desc->buffer.length;
588 if (length > 64) {
589 length = 64;
590 }
591
592 /* Debug only -- dump the buffer contents */ 587 /* Debug only -- dump the buffer contents */
593 588
594 if (obj_desc->buffer.pointer) { 589 if (obj_desc->buffer.pointer) {
595 acpi_os_printf("Buffer Contents: "); 590 length = obj_desc->buffer.length;
596 591 if (length > 128) {
597 for (index = 0; index < length; index++) { 592 length = 128;
598 acpi_os_printf(" %02x",
599 obj_desc->buffer.pointer[index]);
600 } 593 }
601 acpi_os_printf("\n"); 594
595 acpi_os_printf
596 ("Buffer Contents: (displaying length 0x%.2X)\n",
597 length);
598 ACPI_DUMP_BUFFER(obj_desc->buffer.pointer, length);
602 } 599 }
603 break; 600 break;
604 601
@@ -756,54 +753,42 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
756 * 753 *
757 * FUNCTION: acpi_ex_dump_operands 754 * FUNCTION: acpi_ex_dump_operands
758 * 755 *
759 * PARAMETERS: Operands - Operand list 756 * PARAMETERS: Operands - A list of Operand objects
760 * interpreter_mode - Load or Exec 757 * opcode_name - AML opcode name
761 * Ident - Identification 758 * num_operands - Operand count for this opcode
762 * num_levels - # of stack entries to dump above line
763 * Note - Output notation
764 * module_name - Caller's module name
765 * line_number - Caller's invocation line number
766 * 759 *
767 * DESCRIPTION: Dump the object stack 760 * DESCRIPTION: Dump the operands associated with the opcode
768 * 761 *
769 ******************************************************************************/ 762 ******************************************************************************/
770 763
771void 764void
772acpi_ex_dump_operands(union acpi_operand_object **operands, 765acpi_ex_dump_operands(union acpi_operand_object **operands,
773 acpi_interpreter_mode interpreter_mode, 766 const char *opcode_name, u32 num_operands)
774 char *ident,
775 u32 num_levels,
776 char *note, char *module_name, u32 line_number)
777{ 767{
778 acpi_native_uint i;
779
780 ACPI_FUNCTION_NAME(ex_dump_operands); 768 ACPI_FUNCTION_NAME(ex_dump_operands);
781 769
782 if (!ident) { 770 if (!opcode_name) {
783 ident = "?"; 771 opcode_name = "UNKNOWN";
784 }
785
786 if (!note) {
787 note = "?";
788 } 772 }
789 773
790 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 774 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
791 "************* Operand Stack Contents (Opcode [%s], %d Operands)\n", 775 "**** Start operand dump for opcode [%s], %d operands\n",
792 ident, num_levels)); 776 opcode_name, num_operands));
793 777
794 if (num_levels == 0) { 778 if (num_operands == 0) {
795 num_levels = 1; 779 num_operands = 1;
796 } 780 }
797 781
798 /* Dump the operand stack starting at the top */ 782 /* Dump the individual operands */
799 783
800 for (i = 0; num_levels > 0; i--, num_levels--) { 784 while (num_operands) {
801 acpi_ex_dump_operand(operands[i], 0); 785 acpi_ex_dump_operand(*operands, 0);
786 operands++;
787 num_operands--;
802 } 788 }
803 789
804 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 790 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
805 "************* Operand Stack dump from %s(%d), %s\n", 791 "**** End operand dump for [%s]\n", opcode_name));
806 module_name, line_number, note));
807 return; 792 return;
808} 793}
809 794