summaryrefslogtreecommitdiffstats
path: root/source/components/dispatcher
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/dispatcher')
-rw-r--r--source/components/dispatcher/dscontrol.c12
-rw-r--r--source/components/dispatcher/dsfield.c4
-rw-r--r--source/components/dispatcher/dsinit.c4
-rw-r--r--source/components/dispatcher/dsmthdat.c2
-rw-r--r--source/components/dispatcher/dsobject.c12
-rw-r--r--source/components/dispatcher/dsopcode.c1
-rw-r--r--source/components/dispatcher/dsutils.c8
-rw-r--r--source/components/dispatcher/dswexec.c14
-rw-r--r--source/components/dispatcher/dswload.c8
-rw-r--r--source/components/dispatcher/dswload2.c11
10 files changed, 21 insertions, 55 deletions
diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c
index 39bb178..32efe10 100644
--- a/source/components/dispatcher/dscontrol.c
+++ b/source/components/dispatcher/dscontrol.c
@@ -86,7 +86,6 @@ AcpiDsExecBeginControlOp (
switch (Op->Common.AmlOpcode)
{
case AML_WHILE_OP:
-
/*
* If this is an additional iteration of a while loop, continue.
* There is no need to allocate a new control state.
@@ -107,7 +106,6 @@ AcpiDsExecBeginControlOp (
/*lint -fallthrough */
case AML_IF_OP:
-
/*
* IF/WHILE: Create a new control state to manage these
* constructs. We need to manage these as a stack, in order
@@ -150,6 +148,7 @@ AcpiDsExecBeginControlOp (
break;
default:
+
break;
}
@@ -204,12 +203,10 @@ AcpiDsExecEndControlOp (
AcpiUtDeleteGenericState (ControlState);
break;
-
case AML_ELSE_OP:
break;
-
case AML_WHILE_OP:
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[WHILE_OP] Op=%p\n", Op));
@@ -252,7 +249,6 @@ AcpiDsExecEndControlOp (
AcpiUtDeleteGenericState (ControlState);
break;
-
case AML_RETURN_OP:
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
@@ -348,12 +344,11 @@ AcpiDsExecEndControlOp (
Status = AE_CTRL_TERMINATE;
break;
-
case AML_NOOP_OP:
/* Just do nothing! */
- break;
+ break;
case AML_BREAK_POINT_OP:
@@ -373,11 +368,9 @@ AcpiDsExecEndControlOp (
"Executed AML Breakpoint opcode");
break;
-
case AML_BREAK_OP:
case AML_CONTINUE_OP: /* ACPI 2.0 */
-
/* Pop and delete control states until we find a while */
while (WalkState->ControlState &&
@@ -410,7 +403,6 @@ AcpiDsExecEndControlOp (
}
break;
-
default:
ACPI_ERROR ((AE_INFO, "Unknown control opcode=0x%X Op=%p",
diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c
index ac2e847..2fb4f0e 100644
--- a/source/components/dispatcher/dsfield.c
+++ b/source/components/dispatcher/dsfield.c
@@ -599,21 +599,25 @@ AcpiDsInitFieldObjects (
switch (WalkState->Opcode)
{
case AML_FIELD_OP:
+
Arg = AcpiPsGetArg (Op, 2);
Type = ACPI_TYPE_LOCAL_REGION_FIELD;
break;
case AML_BANK_FIELD_OP:
+
Arg = AcpiPsGetArg (Op, 4);
Type = ACPI_TYPE_LOCAL_BANK_FIELD;
break;
case AML_INDEX_FIELD_OP:
+
Arg = AcpiPsGetArg (Op, 3);
Type = ACPI_TYPE_LOCAL_INDEX_FIELD;
break;
default:
+
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
diff --git a/source/components/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c
index 65ff5cb..a00e1b4 100644
--- a/source/components/dispatcher/dsinit.c
+++ b/source/components/dispatcher/dsinit.c
@@ -128,20 +128,18 @@ AcpiDsInitOneObject (
Info->OpRegionCount++;
break;
-
case ACPI_TYPE_METHOD:
Info->MethodCount++;
break;
-
case ACPI_TYPE_DEVICE:
Info->DeviceCount++;
break;
-
default:
+
break;
}
diff --git a/source/components/dispatcher/dsmthdat.c b/source/components/dispatcher/dsmthdat.c
index ded1eb7..e5578f6 100644
--- a/source/components/dispatcher/dsmthdat.c
+++ b/source/components/dispatcher/dsmthdat.c
@@ -315,6 +315,7 @@ AcpiDsMethodDataGetNode (
break;
default:
+
ACPI_ERROR ((AE_INFO, "Type %u is invalid", Type));
return_ACPI_STATUS (AE_TYPE);
}
@@ -472,7 +473,6 @@ AcpiDsMethodDataGetValue (
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
case ACPI_REFCLASS_LOCAL:
-
/*
* No error message for this case, will be trapped again later to
* detect and ignore cases of Store(LocalX,LocalX)
diff --git a/source/components/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c
index 870b9b1..77cc582 100644
--- a/source/components/dispatcher/dsobject.c
+++ b/source/components/dispatcher/dsobject.c
@@ -677,7 +677,6 @@ AcpiDsInitObjectFromOp (
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_BUFFER:
-
/*
* Defer evaluation of Buffer TermArg operand
*/
@@ -687,9 +686,7 @@ AcpiDsInitObjectFromOp (
ObjDesc->Buffer.AmlLength = Op->Named.Length;
break;
-
case ACPI_TYPE_PACKAGE:
-
/*
* Defer evaluation of Package TermArg operand
*/
@@ -699,7 +696,6 @@ AcpiDsInitObjectFromOp (
ObjDesc->Package.AmlLength = Op->Named.Length;
break;
-
case ACPI_TYPE_INTEGER:
switch (OpInfo->Type)
@@ -752,7 +748,6 @@ AcpiDsInitObjectFromOp (
}
break;
-
case AML_TYPE_LITERAL:
ObjDesc->Integer.Value = Op->Common.Value.Integer;
@@ -770,8 +765,8 @@ AcpiDsInitObjectFromOp (
#endif
break;
-
default:
+
ACPI_ERROR ((AE_INFO, "Unknown Integer type 0x%X",
OpInfo->Type));
Status = AE_AML_OPERAND_TYPE;
@@ -779,7 +774,6 @@ AcpiDsInitObjectFromOp (
}
break;
-
case ACPI_TYPE_STRING:
ObjDesc->String.Pointer = Op->Common.Value.String;
@@ -792,11 +786,9 @@ AcpiDsInitObjectFromOp (
ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
break;
-
case ACPI_TYPE_METHOD:
break;
-
case ACPI_TYPE_LOCAL_REFERENCE:
switch (OpInfo->Type)
@@ -816,7 +808,6 @@ AcpiDsInitObjectFromOp (
#endif
break;
-
case AML_TYPE_METHOD_ARGUMENT:
/* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */
@@ -860,7 +851,6 @@ AcpiDsInitObjectFromOp (
}
break;
-
default:
ACPI_ERROR ((AE_INFO, "Unimplemented data type: 0x%X",
diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c
index 8415bec..63c20a3 100644
--- a/source/components/dispatcher/dsopcode.c
+++ b/source/components/dispatcher/dsopcode.c
@@ -680,6 +680,7 @@ AcpiDsEvalDataObjectOperands (
break;
default:
+
return_ACPI_STATUS (AE_AML_BAD_OPCODE);
}
diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c
index a7cc232..9fedbe6 100644
--- a/source/components/dispatcher/dsutils.c
+++ b/source/components/dispatcher/dsutils.c
@@ -264,7 +264,6 @@ AcpiDsIsResultUsed (
case AML_IF_OP:
case AML_WHILE_OP:
-
/*
* If we are executing the predicate AND this is the predicate op,
* we will use the return value
@@ -277,7 +276,9 @@ AcpiDsIsResultUsed (
break;
default:
+
/* Ignore other control opcodes */
+
break;
}
@@ -285,16 +286,13 @@ AcpiDsIsResultUsed (
goto ResultNotUsed;
-
case AML_CLASS_CREATE:
-
/*
* These opcodes allow TermArg(s) as operands and therefore
* the operands can be method calls. The result is used.
*/
goto ResultUsed;
-
case AML_CLASS_NAMED_OBJECT:
if ((Op->Common.Parent->Common.AmlOpcode == AML_REGION_OP) ||
@@ -314,9 +312,7 @@ AcpiDsIsResultUsed (
goto ResultNotUsed;
-
default:
-
/*
* In all other cases. the parent will actually use the return
* object, so keep it.
diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c
index 0336635..25de7f7 100644
--- a/source/components/dispatcher/dswexec.c
+++ b/source/components/dispatcher/dswexec.c
@@ -318,7 +318,6 @@ AcpiDsExecBeginOp (
Status = AcpiDsExecBeginControlOp (WalkState, Op);
break;
-
case AML_CLASS_NAMED_OBJECT:
if (WalkState->WalkType & ACPI_WALK_METHOD)
@@ -350,14 +349,13 @@ AcpiDsExecBeginOp (
}
break;
-
case AML_CLASS_EXECUTE:
case AML_CLASS_CREATE:
break;
-
default:
+
break;
}
@@ -441,7 +439,6 @@ AcpiDsExecEndOp (
}
break;
-
case AML_CLASS_EXECUTE: /* Most operators with arguments */
/* Build resolved operand stack */
@@ -514,7 +511,6 @@ AcpiDsExecEndOp (
}
break;
-
default:
switch (OpType)
@@ -527,9 +523,7 @@ AcpiDsExecEndOp (
break;
-
case AML_TYPE_METHOD_CALL:
-
/*
* If the method is referenced from within a package
* declaration, it is not a invocation of the method, just
@@ -596,7 +590,6 @@ AcpiDsExecEndOp (
*/
return_ACPI_STATUS (Status);
-
case AML_TYPE_CREATE_FIELD:
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
@@ -620,7 +613,6 @@ AcpiDsExecEndOp (
switch (Op->Common.Parent->Common.AmlOpcode)
{
case AML_NAME_OP:
-
/*
* Put the Node on the object stack (Contains the ACPI Name
* of this object)
@@ -661,7 +653,6 @@ AcpiDsExecEndOp (
}
break;
-
case AML_TYPE_NAMED_FIELD:
case AML_TYPE_NAMED_COMPLEX:
case AML_TYPE_NAMED_SIMPLE:
@@ -708,14 +699,12 @@ AcpiDsExecEndOp (
}
break;
-
case AML_TYPE_UNDEFINED:
ACPI_ERROR ((AE_INFO,
"Undefined opcode type Op=%p", Op));
return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
-
case AML_TYPE_BOGUS:
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
@@ -723,7 +712,6 @@ AcpiDsExecEndOp (
WalkState->Opcode, Op));
break;
-
default:
ACPI_ERROR ((AE_INFO,
diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c
index 10ff07a..7050c87 100644
--- a/source/components/dispatcher/dswload.c
+++ b/source/components/dispatcher/dswload.c
@@ -81,6 +81,7 @@ AcpiDsInitCallbacks (
switch (PassNumber)
{
case 1:
+
WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
ACPI_PARSE_DELETE_TREE;
WalkState->DescendingCallback = AcpiDsLoad1BeginOp;
@@ -88,6 +89,7 @@ AcpiDsInitCallbacks (
break;
case 2:
+
WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
ACPI_PARSE_DELETE_TREE;
WalkState->DescendingCallback = AcpiDsLoad2BeginOp;
@@ -95,6 +97,7 @@ AcpiDsInitCallbacks (
break;
case 3:
+
#ifndef ACPI_NO_METHOD_EXECUTION
WalkState->ParseFlags |= ACPI_PARSE_EXECUTE |
ACPI_PARSE_DELETE_TREE;
@@ -104,6 +107,7 @@ AcpiDsInitCallbacks (
break;
default:
+
return (AE_BAD_PARAMETER);
}
@@ -174,7 +178,6 @@ AcpiDsLoad1BeginOp (
switch (WalkState->Opcode)
{
case AML_SCOPE_OP:
-
/*
* The target name of the Scope() operator must exist at this point so
* that we can actually open the scope to enter new names underneath it.
@@ -221,7 +224,6 @@ AcpiDsLoad1BeginOp (
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
-
/*
* These types we will allow, but we will change the type.
* This enables some existing code of the form:
@@ -242,7 +244,6 @@ AcpiDsLoad1BeginOp (
break;
case ACPI_TYPE_METHOD:
-
/*
* Allow scope change to root during execution of module-level
* code. Root is typed METHOD during this time.
@@ -268,7 +269,6 @@ AcpiDsLoad1BeginOp (
}
break;
-
default:
/*
* For all other named opcodes, we will enter the name into
diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c
index a305564..07bd35e 100644
--- a/source/components/dispatcher/dswload2.c
+++ b/source/components/dispatcher/dswload2.c
@@ -496,7 +496,6 @@ AcpiDsLoad2EndOp (
Status = AcpiDsCreateBufferField (Op, WalkState);
break;
-
case AML_TYPE_NAMED_FIELD:
/*
* If we are executing a method, initialize the field
@@ -525,12 +524,12 @@ AcpiDsLoad2EndOp (
break;
default:
+
/* All NAMED_FIELD opcodes must be handled above */
break;
}
break;
-
case AML_TYPE_NAMED_SIMPLE:
Status = AcpiDsCreateOperands (WalkState, Arg);
@@ -561,13 +560,13 @@ AcpiDsLoad2EndOp (
Status = AcpiExCreateEvent (WalkState);
break;
-
case AML_ALIAS_OP:
Status = AcpiExCreateAlias (WalkState);
break;
default:
+
/* Unknown opcode */
Status = AE_OK;
@@ -652,13 +651,11 @@ AcpiDsLoad2EndOp (
}
break;
-
case AML_NAME_OP:
Status = AcpiDsCreateNode (WalkState, Node, Op);
break;
-
case AML_METHOD_OP:
/*
* MethodOp PkgLength NameString MethodFlags TermList
@@ -696,18 +693,17 @@ AcpiDsLoad2EndOp (
#endif /* ACPI_NO_METHOD_EXECUTION */
default:
+
/* All NAMED_COMPLEX opcodes must be handled above */
break;
}
break;
-
case AML_CLASS_INTERNAL:
/* case AML_INT_NAMEPATH_OP: */
break;
-
case AML_CLASS_METHOD_CALL:
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
@@ -747,6 +743,7 @@ AcpiDsLoad2EndOp (
default:
+
break;
}
OpenPOWER on IntegriCloud