summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/executer/exoparg1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/executer/exoparg1.c')
-rw-r--r--sys/contrib/dev/acpica/components/executer/exoparg1.c43
1 files changed, 8 insertions, 35 deletions
diff --git a/sys/contrib/dev/acpica/components/executer/exoparg1.c b/sys/contrib/dev/acpica/components/executer/exoparg1.c
index 8ce02de..44f06a4 100644
--- a/sys/contrib/dev/acpica/components/executer/exoparg1.c
+++ b/sys/contrib/dev/acpica/components/executer/exoparg1.c
@@ -180,37 +180,31 @@ AcpiExOpcode_1A_0T_0R (
Status = AcpiExReleaseMutex (Operand[0], WalkState);
break;
-
case AML_RESET_OP: /* Reset (EventObject) */
Status = AcpiExSystemResetEvent (Operand[0]);
break;
-
case AML_SIGNAL_OP: /* Signal (EventObject) */
Status = AcpiExSystemSignalEvent (Operand[0]);
break;
-
case AML_SLEEP_OP: /* Sleep (MsecTime) */
Status = AcpiExSystemDoSleep (Operand[0]->Integer.Value);
break;
-
case AML_STALL_OP: /* Stall (UsecTime) */
Status = AcpiExSystemDoStall ((UINT32) Operand[0]->Integer.Value);
break;
-
case AML_UNLOAD_OP: /* Unload (Handle) */
Status = AcpiExUnloadTable (Operand[0]);
break;
-
default: /* Unknown opcode */
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
@@ -330,7 +324,6 @@ AcpiExOpcode_1A_1T_1R (
ReturnDesc->Integer.Value = ~Operand[0]->Integer.Value;
break;
-
case AML_FIND_SET_LEFT_BIT_OP: /* FindSetLeftBit (Operand, Result) */
ReturnDesc->Integer.Value = Operand[0]->Integer.Value;
@@ -348,7 +341,6 @@ AcpiExOpcode_1A_1T_1R (
ReturnDesc->Integer.Value = Temp32;
break;
-
case AML_FIND_SET_RIGHT_BIT_OP: /* FindSetRightBit (Operand, Result) */
ReturnDesc->Integer.Value = Operand[0]->Integer.Value;
@@ -369,9 +361,7 @@ AcpiExOpcode_1A_1T_1R (
Temp32 == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - Temp32;
break;
-
case AML_FROM_BCD_OP: /* FromBcd (BCDValue, Result) */
-
/*
* The 64-bit ACPI integer can hold 16 4-bit BCD characters
* (if table is 32-bit, integer can hold 8 BCD characters)
@@ -416,7 +406,6 @@ AcpiExOpcode_1A_1T_1R (
}
break;
-
case AML_TO_BCD_OP: /* ToBcd (Operand, Result) */
ReturnDesc->Integer.Value = 0;
@@ -448,9 +437,7 @@ AcpiExOpcode_1A_1T_1R (
}
break;
-
case AML_COND_REF_OF_OP: /* CondRefOf (SourceObject, Result) */
-
/*
* This op is a little strange because the internal return value is
* different than the return value stored in the result descriptor
@@ -485,14 +472,14 @@ AcpiExOpcode_1A_1T_1R (
default:
+
/* No other opcodes get here */
+
break;
}
break;
-
case AML_STORE_OP: /* Store (Source, Target) */
-
/*
* A store operand is typically a number, string, buffer or lvalue
* Be careful about deleting the source object,
@@ -519,7 +506,6 @@ AcpiExOpcode_1A_1T_1R (
}
return_ACPI_STATUS (Status);
-
/*
* ACPI 2.0 Opcodes
*/
@@ -529,7 +515,6 @@ AcpiExOpcode_1A_1T_1R (
WalkState);
break;
-
case AML_TO_DECSTRING_OP: /* ToDecimalString (Data, Result) */
Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
@@ -541,7 +526,6 @@ AcpiExOpcode_1A_1T_1R (
}
break;
-
case AML_TO_HEXSTRING_OP: /* ToHexString (Data, Result) */
Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
@@ -553,7 +537,6 @@ AcpiExOpcode_1A_1T_1R (
}
break;
-
case AML_TO_BUFFER_OP: /* ToBuffer (Data, Result) */
Status = AcpiExConvertToBuffer (Operand[0], &ReturnDesc);
@@ -564,7 +547,6 @@ AcpiExOpcode_1A_1T_1R (
}
break;
-
case AML_TO_INTEGER_OP: /* ToInteger (Data, Result) */
Status = AcpiExConvertToInteger (Operand[0], &ReturnDesc,
@@ -576,7 +558,6 @@ AcpiExOpcode_1A_1T_1R (
}
break;
-
case AML_SHIFT_LEFT_BIT_OP: /* ShiftLeftBit (Source, BitNum) */
case AML_SHIFT_RIGHT_BIT_OP: /* ShiftRightBit (Source, BitNum) */
@@ -588,7 +569,6 @@ AcpiExOpcode_1A_1T_1R (
Status = AE_SUPPORT;
goto Cleanup;
-
default: /* Unknown opcode */
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
@@ -676,10 +656,8 @@ AcpiExOpcode_1A_0T_1R (
}
break;
-
case AML_DECREMENT_OP: /* Decrement (Operand) */
case AML_INCREMENT_OP: /* Increment (Operand) */
-
/*
* Create a new integer. Can't just get the base integer and
* increment it because it may be an Arg or Field.
@@ -744,9 +722,7 @@ AcpiExOpcode_1A_0T_1R (
Status = AcpiExStore (ReturnDesc, Operand[0], WalkState);
break;
-
case AML_TYPE_OP: /* ObjectType (SourceObject) */
-
/*
* Note: The operand is not resolved at this point because we want to
* get the associated object, not its value. For example, we don't
@@ -772,9 +748,7 @@ AcpiExOpcode_1A_0T_1R (
}
break;
-
case AML_SIZE_OF_OP: /* SizeOf (SourceObject) */
-
/*
* Note: The operand is not resolved at this point because we want to
* get the associated object, not its value.
@@ -801,10 +775,12 @@ AcpiExOpcode_1A_0T_1R (
switch (Type)
{
case ACPI_TYPE_INTEGER:
+
Value = AcpiGbl_IntegerByteWidth;
break;
case ACPI_TYPE_STRING:
+
Value = TempDesc->String.Length;
break;
@@ -825,6 +801,7 @@ AcpiExOpcode_1A_0T_1R (
break;
default:
+
ACPI_ERROR ((AE_INFO,
"Operand must be Buffer/Integer/String/Package - found type %s",
AcpiUtGetTypeName (Type)));
@@ -932,9 +909,11 @@ AcpiExOpcode_1A_0T_1R (
break;
case ACPI_TYPE_STRING:
+
break;
default:
+
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
@@ -993,7 +972,6 @@ AcpiExOpcode_1A_0T_1R (
switch (Operand[0]->Reference.Class)
{
case ACPI_REFCLASS_INDEX:
-
/*
* The target type for the Index operator must be
* either a Buffer or a Package
@@ -1025,9 +1003,7 @@ AcpiExOpcode_1A_0T_1R (
}
break;
-
case ACPI_TYPE_PACKAGE:
-
/*
* Return the referenced element of the package. We must
* add another reference to the referenced object, however.
@@ -1039,7 +1015,6 @@ AcpiExOpcode_1A_0T_1R (
}
break;
-
default:
ACPI_ERROR ((AE_INFO,
@@ -1050,7 +1025,6 @@ AcpiExOpcode_1A_0T_1R (
}
break;
-
case ACPI_REFCLASS_REFOF:
ReturnDesc = Operand[0]->Reference.Object;
@@ -1067,8 +1041,8 @@ AcpiExOpcode_1A_0T_1R (
AcpiUtAddReference (ReturnDesc);
break;
-
default:
+
ACPI_ERROR ((AE_INFO,
"Unknown class in reference(%p) - 0x%2.2X",
Operand[0], Operand[0]->Reference.Class));
@@ -1079,7 +1053,6 @@ AcpiExOpcode_1A_0T_1R (
}
break;
-
default:
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
OpenPOWER on IntegriCloud