aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2016-12-28 02:29:17 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-02 17:18:45 -0500
commita654b8ca6d28736995de767ba62e801fd806a3b2 (patch)
treec71817c1fa0252aaf99ba962419fcca6f4941a77
parent55333089390909f3aee73764836bc85ba18e6b4e (diff)
ACPICA: Disassembler: Add Switch/Case disassembly support
ACPICA commit 0f6cc80e8af519a3c31184367b0a9be7a399cf53 iasl compiles Switch/Case statements into a single iteration While loop with If/Else statements. This patch adds support to recognize this generated compiler output and disassemble it back to the original Switch statement. Linux kernel is not affected by this patch. Link: https://github.com/acpica/acpica/commit/0f6cc80e Signed-off-by: David E. Box <david.e.box@linux.intel.com> 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>
-rw-r--r--drivers/acpi/acpica/aclocal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 792660054992..7b97801d907d 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -770,7 +770,7 @@ union acpi_parse_value {
770 char *operator_symbol;/* Used for C-style operator name strings */\ 770 char *operator_symbol;/* Used for C-style operator name strings */\
771 char aml_op_name[16]) /* Op name (debug only) */ 771 char aml_op_name[16]) /* Op name (debug only) */
772 772
773/* Flags for disasm_flags field above */ 773/* Internal opcodes for disasm_opcode field above */
774 774
775#define ACPI_DASM_BUFFER 0x00 /* Buffer is a simple data buffer */ 775#define ACPI_DASM_BUFFER 0x00 /* Buffer is a simple data buffer */
776#define ACPI_DASM_RESOURCE 0x01 /* Buffer is a Resource Descriptor */ 776#define ACPI_DASM_RESOURCE 0x01 /* Buffer is a Resource Descriptor */
@@ -783,7 +783,10 @@ union acpi_parse_value {
783#define ACPI_DASM_LNOT_PREFIX 0x08 /* Start of a Lnot_equal (etc.) pair of opcodes */ 783#define ACPI_DASM_LNOT_PREFIX 0x08 /* Start of a Lnot_equal (etc.) pair of opcodes */
784#define ACPI_DASM_LNOT_SUFFIX 0x09 /* End of a Lnot_equal (etc.) pair of opcodes */ 784#define ACPI_DASM_LNOT_SUFFIX 0x09 /* End of a Lnot_equal (etc.) pair of opcodes */
785#define ACPI_DASM_HID_STRING 0x0A /* String is a _HID or _CID */ 785#define ACPI_DASM_HID_STRING 0x0A /* String is a _HID or _CID */
786#define ACPI_DASM_IGNORE 0x0B /* Not used at this time */ 786#define ACPI_DASM_IGNORE_SINGLE 0x0B /* Ignore the opcode but not it's children */
787#define ACPI_DASM_SWITCH_PREDICATE 0x0C /* Object is a predicate for a Switch or Case block */
788#define ACPI_DASM_CASE 0x0D /* If/Else is a Case in a Switch/Case block */
789#define ACPI_DASM_DEFAULT 0x0E /* Else is a Default in a Switch/Case block */
787 790
788/* 791/*
789 * Generic operation (for example: If, While, Store) 792 * Generic operation (for example: If, While, Store)