diff options
author | Robert Moore <Robert.Moore@intel.com> | 2016-05-24 14:27:59 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2016-05-24 14:27:59 -0700 |
commit | 152a8ca2c7fc877d6aff0f9d0965184ef2ddce5c (patch) | |
tree | 34754c6d97ded3b10d30fa4e1ff349863e8f1112 | |
parent | 622063bae684490191c8e8b10bf18e86d0ab4ebf (diff) | |
download | acpica-152a8ca2c7fc877d6aff0f9d0965184ef2ddce5c.tar.gz |
Disassembler: Add option to emit embedded External operators/opcodes
Opcode 0x15 was added in ACPI 6.0 for disassemblers.
The disassembler by default does not emit the actual opcodes, they
are used internally. Option added for internal debugging only.
-rw-r--r-- | source/compiler/asloptions.c | 6 | ||||
-rw-r--r-- | source/components/disassembler/dmopcode.c | 11 | ||||
-rw-r--r-- | source/components/disassembler/dmwalk.c | 29 | ||||
-rw-r--r-- | source/include/acglobal.h | 1 |
4 files changed, 33 insertions, 14 deletions
diff --git a/source/compiler/asloptions.c b/source/compiler/asloptions.c index b84610697..651cd9d6e 100644 --- a/source/compiler/asloptions.c +++ b/source/compiler/asloptions.c @@ -613,9 +613,13 @@ AslDoOptions ( case 'e': - /* Disable External opcode generation */ + /* iASL: Disable External opcode generation */ Gbl_DoExternals = FALSE; + + /* Disassembler: Emit embedded external operators */ + + AcpiGbl_DmEmitExternalOpcodes = TRUE; break; case 'f': diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c index f0204de82..683fd0add 100644 --- a/source/components/disassembler/dmopcode.c +++ b/source/components/disassembler/dmopcode.c @@ -1043,7 +1043,16 @@ AcpiDmDisassembleOneOp ( case AML_EXTERNAL_OP: - break; + if (AcpiGbl_DmEmitExternalOpcodes) + { + AcpiOsPrintf ("/* Opcode 0x15 */ "); + + /* Fallthrough */ + } + else + { + break; + } default: diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c index 7c18065ff..34ab04019 100644 --- a/source/components/disassembler/dmwalk.c +++ b/source/components/disassembler/dmwalk.c @@ -534,21 +534,26 @@ AcpiDmDescendingOp ( { NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST; - /* - * A Zero predicate indicates the possibility of one or more - * External() opcodes within the If() block. - */ - if (NextOp->Common.AmlOpcode == AML_ZERO_OP) - { - NextOp2 = NextOp->Common.Next; + /* Don't emit the actual embedded externals unless asked */ - if (NextOp2 && - (NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP)) + if (!AcpiGbl_DmEmitExternalOpcodes) + { + /* + * A Zero predicate indicates the possibility of one or more + * External() opcodes within the If() block. + */ + if (NextOp->Common.AmlOpcode == AML_ZERO_OP) { - /* Ignore the If 0 block and all children */ + NextOp2 = NextOp->Common.Next; + + if (NextOp2 && + (NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP)) + { + /* Ignore the If 0 block and all children */ - Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; - return (AE_CTRL_DEPTH); + Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; + return (AE_CTRL_DEPTH); + } } } } diff --git a/source/include/acglobal.h b/source/include/acglobal.h index 67a167216..23763127c 100644 --- a/source/include/acglobal.h +++ b/source/include/acglobal.h @@ -393,6 +393,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Verbose, TRUE); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmEmitExternalOpcodes, FALSE); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Disasm); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Listing); |