aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/nsutils.c9
-rw-r--r--drivers/acpi/acpica/psloop.c51
-rw-r--r--drivers/acpi/acpica/utmisc.c3
-rw-r--r--drivers/acpi/acpica/utxferror.c2
4 files changed, 49 insertions, 16 deletions
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index 16b3da80b92d..0d3d481ce58e 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -557,10 +557,11 @@ acpi_ns_externalize_name(u32 internal_name_length,
557 (*converted_name)[j++] = '.'; 557 (*converted_name)[j++] = '.';
558 } 558 }
559 559
560 (*converted_name)[j++] = internal_name[names_index++]; 560 ACPI_MOVE_NAME(*converted_name, internal_name);
561 (*converted_name)[j++] = internal_name[names_index++]; 561 acpi_ut_repair_name(*converted_name);
562 (*converted_name)[j++] = internal_name[names_index++]; 562
563 (*converted_name)[j++] = internal_name[names_index++]; 563 j += ACPI_NAME_SIZE;
564 names_index += ACPI_NAME_SIZE;
564 } 565 }
565 } 566 }
566 567
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index 31e2e9fb2def..e8b6dc0c51ca 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -135,16 +135,38 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state)
135 135
136 /* The opcode is unrecognized. Just skip unknown opcodes */ 136 /* The opcode is unrecognized. Just skip unknown opcodes */
137 137
138 ACPI_ERROR((AE_INFO, 138 if (walk_state->pass_number == 2) {
139 "Found unknown opcode 0x%X at AML address %p offset 0x%X, ignoring", 139 ACPI_ERROR((AE_INFO,
140 walk_state->opcode, walk_state->parser_state.aml, 140 "Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring",
141 walk_state->aml_offset)); 141 walk_state->opcode,
142 walk_state->aml_offset +
143 sizeof(struct acpi_table_header)));
142 144
143 ACPI_DUMP_BUFFER(walk_state->parser_state.aml, 128); 145 ACPI_DUMP_BUFFER(walk_state->parser_state.aml, 128);
144 146
145 /* Assume one-byte bad opcode */ 147#ifdef ACPI_ASL_COMPILER
148
149 acpi_os_printf
150 ("/*\nError: Unknown opcode 0x%.2X at table offset 0x%.4X, context:\n",
151 walk_state->opcode,
152 walk_state->aml_offset +
153 sizeof(struct acpi_table_header));
154
155 /* TBD: Pass current offset to dump_buffer */
156
157 acpi_ut_dump_buffer2(((u8 *)walk_state->parser_state.
158 aml - 16), 48, DB_BYTE_DISPLAY);
159 acpi_os_printf(" */\n");
160#endif
161 }
162
163 /* Increment past one or two-byte opcode */
146 164
147 walk_state->parser_state.aml++; 165 walk_state->parser_state.aml++;
166 if (walk_state->opcode > 0xFF) {
167 walk_state->parser_state.aml++;
168 }
169
148 return_ACPI_STATUS(AE_CTRL_PARSE_CONTINUE); 170 return_ACPI_STATUS(AE_CTRL_PARSE_CONTINUE);
149 171
150 default: 172 default:
@@ -519,11 +541,18 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state,
519 if ((op_info->class == 541 if ((op_info->class ==
520 AML_CLASS_EXECUTE) && (!arg)) { 542 AML_CLASS_EXECUTE) && (!arg)) {
521 ACPI_WARNING((AE_INFO, 543 ACPI_WARNING((AE_INFO,
522 "Detected an unsupported executable opcode " 544 "Unsupported module-level executable opcode "
523 "at module-level: [0x%.4X] at table offset 0x%.4X", 545 "0x%.2X at table offset 0x%.4X",
524 op->common.aml_opcode, 546 op->common.
525 (u32)((aml_op_start - walk_state->parser_state.aml_start) 547 aml_opcode,
526 + sizeof(struct acpi_table_header)))); 548 (u32)
549 (ACPI_PTR_DIFF
550 (aml_op_start,
551 walk_state->
552 parser_state.
553 aml_start) +
554 sizeof(struct
555 acpi_table_header))));
527 } 556 }
528 } 557 }
529 break; 558 break;
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c
index 7ba197298ef8..9286a69eb9aa 100644
--- a/drivers/acpi/acpica/utmisc.c
+++ b/drivers/acpi/acpica/utmisc.c
@@ -720,9 +720,12 @@ void acpi_ut_repair_name(char *name)
720{ 720{
721 u32 i; 721 u32 i;
722 u8 found_bad_char = FALSE; 722 u8 found_bad_char = FALSE;
723 u32 original_name;
723 724
724 ACPI_FUNCTION_NAME(ut_repair_name); 725 ACPI_FUNCTION_NAME(ut_repair_name);
725 726
727 ACPI_MOVE_NAME(&original_name, name);
728
726 /* Check each character in the name */ 729 /* Check each character in the name */
727 730
728 for (i = 0; i < ACPI_NAME_SIZE; i++) { 731 for (i = 0; i < ACPI_NAME_SIZE; i++) {
diff --git a/drivers/acpi/acpica/utxferror.c b/drivers/acpi/acpica/utxferror.c
index 6d63cc39b9ae..d4d3826140d8 100644
--- a/drivers/acpi/acpica/utxferror.c
+++ b/drivers/acpi/acpica/utxferror.c
@@ -408,7 +408,7 @@ acpi_ut_namespace_error(const char *module_name,
408 408
409 ACPI_MOVE_32_TO_32(&bad_name, 409 ACPI_MOVE_32_TO_32(&bad_name,
410 ACPI_CAST_PTR(u32, internal_name)); 410 ACPI_CAST_PTR(u32, internal_name));
411 acpi_os_printf("[0x%4.4X] (NON-ASCII)", bad_name); 411 acpi_os_printf("[0x%.8X] (NON-ASCII)", bad_name);
412 } else { 412 } else {
413 /* Convert path to external format */ 413 /* Convert path to external format */
414 414