summaryrefslogtreecommitdiff
path: root/source/components/disassembler/dmwalk.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/disassembler/dmwalk.c')
-rw-r--r--source/components/disassembler/dmwalk.c55
1 files changed, 47 insertions, 8 deletions
diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c
index dd3ee002557bb..6a6b95e1f71d6 100644
--- a/source/components/disassembler/dmwalk.c
+++ b/source/components/disassembler/dmwalk.c
@@ -453,7 +453,7 @@ AcpiDmDescendingOp (
* keep track of the current column.
*/
Info->Count++;
- if (Info->Count /*+Info->LastLevel*/ > 10)
+ if (Info->Count /* +Info->LastLevel */ > 10)
{
Info->Count = 0;
AcpiOsPrintf ("\n");
@@ -533,6 +533,10 @@ AcpiDmDescendingOp (
AcpiDmMethodFlags (Op);
AcpiOsPrintf (")");
+
+ /* Emit description comment for Method() with a predefined ACPI name */
+
+ AcpiDmPredefinedDescription (Op);
break;
@@ -603,7 +607,8 @@ AcpiDmDescendingOp (
default:
- AcpiOsPrintf ("*** Unhandled named opcode %X\n", Op->Common.AmlOpcode);
+ AcpiOsPrintf ("*** Unhandled named opcode %X\n",
+ Op->Common.AmlOpcode);
break;
}
}
@@ -644,7 +649,8 @@ AcpiDmDescendingOp (
NextOp = NextOp->Common.Next;
Info->Flags = ACPI_PARSEOP_PARAMLIST;
- AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp, AcpiDmAscendingOp, Info);
+ AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp,
+ AcpiDmAscendingOp, Info);
Info->Flags = 0;
Info->Level = Level;
@@ -686,12 +692,18 @@ AcpiDmDescendingOp (
if (Op->Common.DisasmOpcode == ACPI_DASM_RESOURCE)
{
/*
- * We have a resource list. Don't need to output
- * the buffer size Op. Open up a new block
+ * We have a resource list. Don't need to output
+ * the buffer size Op. Open up a new block
*/
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
NextOp = NextOp->Common.Next;
- AcpiOsPrintf (")\n");
+ AcpiOsPrintf (")");
+
+ /* Emit description comment for Name() with a predefined ACPI name */
+
+ AcpiDmPredefinedDescription (Op->Asl.Parent);
+
+ AcpiOsPrintf ("\n");
AcpiDmIndent (Info->Level);
AcpiOsPrintf ("{\n");
return (AE_OK);
@@ -719,7 +731,7 @@ AcpiDmDescendingOp (
case AML_PACKAGE_OP:
- /* The next op is the size or predicate parameter */
+ /* The next op is the size parameter */
NextOp = AcpiPsGetDepthNext (NULL, Op);
if (NextOp)
@@ -772,6 +784,7 @@ AcpiDmAscendingOp (
void *Context)
{
ACPI_OP_WALK_INFO *Info = Context;
+ ACPI_PARSE_OBJECT *ParentOp;
if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE)
@@ -797,6 +810,19 @@ AcpiDmAscendingOp (
AcpiOsPrintf (")");
+ if (Op->Common.AmlOpcode == AML_NAME_OP)
+ {
+ /* Emit description comment for Name() with a predefined ACPI name */
+
+ AcpiDmPredefinedDescription (Op);
+ }
+ else
+ {
+ /* For Create* operators, attempt to emit resource tag description */
+
+ AcpiDmFieldPredefinedDescription (Op);
+ }
+
/* Could be a nested operator, check if comma required */
if (!AcpiDmCommaIfListMember (Op))
@@ -911,7 +937,20 @@ AcpiDmAscendingOp (
*/
if (Op->Common.Next)
{
- AcpiOsPrintf (")\n");
+ AcpiOsPrintf (")");
+
+ /* Emit description comment for Name() with a predefined ACPI name */
+
+ ParentOp = Op->Common.Parent;
+ if (ParentOp)
+ {
+ ParentOp = ParentOp->Common.Parent;
+ if (ParentOp && ParentOp->Asl.AmlOpcode == AML_NAME_OP)
+ {
+ AcpiDmPredefinedDescription (ParentOp);
+ }
+ }
+ AcpiOsPrintf ("\n");
AcpiDmIndent (Level - 1);
AcpiOsPrintf ("{\n");
}