summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/psloop.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2012-10-31 03:28:11 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-15 00:31:29 +0100
commit97171c6be3088a68b403c7285d34c151f7dbfb18 (patch)
tree0aebf4710463ea8698c7c03058aa082ef1c1a2e6 /drivers/acpi/acpica/psloop.c
parentACPICA: Deploy ACPI_MOVE_NAME across ACPICA source base (diff)
downloadlinux-97171c6be3088a68b403c7285d34c151f7dbfb18.tar.xz
linux-97171c6be3088a68b403c7285d34c151f7dbfb18.zip
ACPICA: Add starting offset parameter to common dump buffer routine
Rename the dump buffer routines. Offset parameter can specify the buffer starting offset that is used when displaying each line of the buffer. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/psloop.c')
-rw-r--r--drivers/acpi/acpica/psloop.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index e8b6dc0c51ca..d48c8fc0e729 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -133,7 +133,7 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state)
case AML_CLASS_UNKNOWN:
- /* The opcode is unrecognized. Just skip unknown opcodes */
+ /* The opcode is unrecognized. Complain and skip unknown opcodes */
if (walk_state->pass_number == 2) {
ACPI_ERROR((AE_INFO,
@@ -142,28 +142,34 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state)
walk_state->aml_offset +
sizeof(struct acpi_table_header)));
- ACPI_DUMP_BUFFER(walk_state->parser_state.aml, 128);
+ ACPI_DUMP_BUFFER(walk_state->parser_state.aml - 16, 48);
#ifdef ACPI_ASL_COMPILER
-
+ /*
+ * This is executed for the disassembler only. Output goes
+ * to the disassembled ASL output file.
+ */
acpi_os_printf
("/*\nError: Unknown opcode 0x%.2X at table offset 0x%.4X, context:\n",
walk_state->opcode,
walk_state->aml_offset +
sizeof(struct acpi_table_header));
- /* TBD: Pass current offset to dump_buffer */
+ /* Dump the context surrounding the invalid opcode */
- acpi_ut_dump_buffer2(((u8 *)walk_state->parser_state.
- aml - 16), 48, DB_BYTE_DISPLAY);
+ acpi_ut_dump_buffer(((u8 *)walk_state->parser_state.
+ aml - 16), 48, DB_BYTE_DISPLAY,
+ walk_state->aml_offset +
+ sizeof(struct acpi_table_header) -
+ 16);
acpi_os_printf(" */\n");
#endif
}
- /* Increment past one or two-byte opcode */
+ /* Increment past one-byte or two-byte opcode */
walk_state->parser_state.aml++;
- if (walk_state->opcode > 0xFF) {
+ if (walk_state->opcode > 0xFF) { /* Can only happen if first byte is 0x5B */
walk_state->parser_state.aml++;
}