summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/dsopcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/dsopcode.c')
-rw-r--r--sys/contrib/dev/acpica/dsopcode.c397
1 files changed, 210 insertions, 187 deletions
diff --git a/sys/contrib/dev/acpica/dsopcode.c b/sys/contrib/dev/acpica/dsopcode.c
index 7166753..8cf27ae 100644
--- a/sys/contrib/dev/acpica/dsopcode.c
+++ b/sys/contrib/dev/acpica/dsopcode.c
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
- * $Revision: 74 $
+ * $Revision: 80 $
*
*****************************************************************************/
@@ -124,7 +124,6 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acevents.h"
-#include "actables.h"
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dsopcode")
@@ -135,7 +134,8 @@
* FUNCTION: AcpiDsExecuteArguments
*
* PARAMETERS: Node - Parent NS node
- * ExtraDesc - Has AML pointer and length
+ * AmlLength - Length of executable AML
+ * AmlStart - Pointer to the AML
*
* RETURN: Status.
*
@@ -170,7 +170,7 @@ AcpiDsExecuteArguments (
/* Save the Node for use in AcpiPsParseAml */
- Op->Node = ScopeNode;
+ Op->Common.Node = ScopeNode;
/* Create and initialize a new parser state */
@@ -201,9 +201,9 @@ AcpiDsExecuteArguments (
/* Get and init the Op created above */
- Arg = Op->Value.Arg;
- Op->Node = Node;
- Arg->Node = Node;
+ Arg = Op->Common.Value.Arg;
+ Op->Common.Node = Node;
+ Arg->Common.Node = Node;
AcpiPsDeleteParseTree (Op);
/* Evaluate the address and length arguments for the Buffer Field */
@@ -214,7 +214,7 @@ AcpiDsExecuteArguments (
return_ACPI_STATUS (AE_NO_MEMORY);
}
- Op->Node = ScopeNode;
+ Op->Common.Node = ScopeNode;
/* Create and initialize a new parser state */
@@ -275,7 +275,7 @@ AcpiDsGetBufferFieldArguments (
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (Node, " [Field]"));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] BufferField JIT Init\n",
- (char *) &Node->Name));
+ Node->Name.Ascii));
/* Execute the AML code for the TermArg arguments */
@@ -426,7 +426,7 @@ AcpiDsGetRegionArguments (
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (Node, " [Operation Region]"));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] OpRegion Init at AML %p\n",
- (char *) &Node->Name, ExtraDesc->Extra.AmlStart));
+ Node->Name.Ascii, ExtraDesc->Extra.AmlStart));
Status = AcpiDsExecuteArguments (Node, AcpiNsGetParentNode (Node),
@@ -443,7 +443,7 @@ AcpiDsGetRegionArguments (
*
* RETURN: Status
*
- * DESCRIPTION:
+ * DESCRIPTION: Front end to EvInitializeRegion
*
****************************************************************************/
@@ -466,268 +466,283 @@ AcpiDsInitializeRegion (
/*****************************************************************************
*
- * FUNCTION: AcpiDsEvalBufferFieldOperands
+ * FUNCTION: AcpiDsInitBufferField
*
- * PARAMETERS: Op - A valid BufferField Op object
+ * PARAMETERS: AmlOpcode - CreateXxxField
+ * ObjDesc - BufferField object
+ * BufferDesc - Host Buffer
+ * OffsetDesc - Offset into buffer
+ * Length - Length of field (CREATE_FIELD_OP only)
+ * Result - Where to store the result
*
* RETURN: Status
*
- * DESCRIPTION: Get BufferField Buffer and Index
- * Called from AcpiDsExecEndOp during BufferField parse tree walk
+ * DESCRIPTION: Perform actual initialization of a buffer field
*
****************************************************************************/
ACPI_STATUS
-AcpiDsEvalBufferFieldOperands (
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Op)
+AcpiDsInitBufferField (
+ UINT16 AmlOpcode,
+ ACPI_OPERAND_OBJECT *ObjDesc,
+ ACPI_OPERAND_OBJECT *BufferDesc,
+ ACPI_OPERAND_OBJECT *OffsetDesc,
+ ACPI_OPERAND_OBJECT *LengthDesc,
+ ACPI_OPERAND_OBJECT *ResultDesc)
{
- ACPI_STATUS Status;
- ACPI_OPERAND_OBJECT *ObjDesc;
- ACPI_NAMESPACE_NODE *Node;
- ACPI_PARSE_OBJECT *NextOp;
UINT32 Offset;
UINT32 BitOffset;
UINT32 BitCount;
UINT8 FieldFlags;
- ACPI_OPERAND_OBJECT *ResDesc = NULL;
- ACPI_OPERAND_OBJECT *CntDesc = NULL;
- ACPI_OPERAND_OBJECT *OffDesc = NULL;
- ACPI_OPERAND_OBJECT *SrcDesc = NULL;
-
-
- ACPI_FUNCTION_TRACE_PTR ("DsEvalBufferFieldOperands", Op);
-
-
- /*
- * This is where we evaluate the address and length fields of the
- * CreateXxxField declaration
- */
- Node = Op->Node;
-
- /* NextOp points to the op that holds the Buffer */
+ ACPI_STATUS Status;
- NextOp = Op->Value.Arg;
- /* Evaluate/create the address and length operands */
+ ACPI_FUNCTION_TRACE_PTR ("DsInitBufferField", ObjDesc);
- Status = AcpiDsCreateOperands (WalkState, NextOp);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- ObjDesc = AcpiNsGetAttachedObject (Node);
- if (!ObjDesc)
- {
- return_ACPI_STATUS (AE_NOT_EXIST);
- }
-
- /* Resolve the operands */
+ /* Host object must be a Buffer */
- Status = AcpiExResolveOperands (Op->Opcode, ACPI_WALK_OPERANDS, WalkState);
- ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE, AcpiPsGetOpcodeName (Op->Opcode),
- WalkState->NumOperands, "after AcpiExResolveOperands");
-
- if (ACPI_FAILURE (Status))
+ if (ACPI_GET_OBJECT_TYPE (BufferDesc) != ACPI_TYPE_BUFFER)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) bad operand(s) (%X)\n",
- AcpiPsGetOpcodeName (Op->Opcode), Status));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "Target of Create Field is not a Buffer object - %s\n",
+ AcpiUtGetObjectTypeName (BufferDesc)));
+ Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
- /* Get the operands */
-
- if (AML_CREATE_FIELD_OP == Op->Opcode)
- {
- ResDesc = WalkState->Operands[3];
- CntDesc = WalkState->Operands[2];
- }
- else
- {
- ResDesc = WalkState->Operands[2];
- }
-
- OffDesc = WalkState->Operands[1];
- SrcDesc = WalkState->Operands[0];
- Offset = (UINT32) OffDesc->Integer.Value;
-
/*
- * If ResDesc is a Name, it will be a direct name pointer after
- * AcpiExResolveOperands()
+ * The last parameter to all of these opcodes (ResultDesc) started
+ * out as a NameString, and should therefore now be a NS node
+ * after resolution in AcpiExResolveOperands().
*/
- if (ACPI_GET_DESCRIPTOR_TYPE (ResDesc) != ACPI_DESC_TYPE_NAMED)
+ if (ACPI_GET_DESCRIPTOR_TYPE (ResultDesc) != ACPI_DESC_TYPE_NAMED)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) destination must be a NS Node\n",
- AcpiPsGetOpcodeName (Op->Opcode)));
+ AcpiPsGetOpcodeName (AmlOpcode)));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
+ Offset = (UINT32) OffsetDesc->Integer.Value;
+
/*
* Setup the Bit offsets and counts, according to the opcode
*/
- switch (Op->Opcode)
+ switch (AmlOpcode)
{
case AML_CREATE_FIELD_OP:
/* Offset is in bits, count is in bits */
- BitOffset = Offset;
- BitCount = (UINT32) CntDesc->Integer.Value;
- FieldFlags = AML_FIELD_ACCESS_BYTE;
+ BitOffset = Offset;
+ BitCount = (UINT32) LengthDesc->Integer.Value;
+ FieldFlags = AML_FIELD_ACCESS_BYTE;
break;
case AML_CREATE_BIT_FIELD_OP:
/* Offset is in bits, Field is one bit */
- BitOffset = Offset;
- BitCount = 1;
- FieldFlags = AML_FIELD_ACCESS_BYTE;
+ BitOffset = Offset;
+ BitCount = 1;
+ FieldFlags = AML_FIELD_ACCESS_BYTE;
break;
case AML_CREATE_BYTE_FIELD_OP:
/* Offset is in bytes, field is one byte */
- BitOffset = 8 * Offset;
- BitCount = 8;
- FieldFlags = AML_FIELD_ACCESS_BYTE;
+ BitOffset = 8 * Offset;
+ BitCount = 8;
+ FieldFlags = AML_FIELD_ACCESS_BYTE;
break;
case AML_CREATE_WORD_FIELD_OP:
/* Offset is in bytes, field is one word */
- BitOffset = 8 * Offset;
- BitCount = 16;
- FieldFlags = AML_FIELD_ACCESS_WORD;
+ BitOffset = 8 * Offset;
+ BitCount = 16;
+ FieldFlags = AML_FIELD_ACCESS_WORD;
break;
case AML_CREATE_DWORD_FIELD_OP:
/* Offset is in bytes, field is one dword */
- BitOffset = 8 * Offset;
- BitCount = 32;
- FieldFlags = AML_FIELD_ACCESS_DWORD;
+ BitOffset = 8 * Offset;
+ BitCount = 32;
+ FieldFlags = AML_FIELD_ACCESS_DWORD;
break;
case AML_CREATE_QWORD_FIELD_OP:
/* Offset is in bytes, field is one qword */
- BitOffset = 8 * Offset;
- BitCount = 64;
- FieldFlags = AML_FIELD_ACCESS_QWORD;
+ BitOffset = 8 * Offset;
+ BitCount = 64;
+ FieldFlags = AML_FIELD_ACCESS_QWORD;
break;
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Internal error - unknown field creation opcode %02x\n",
- Op->Opcode));
+ "Unknown field creation opcode %02x\n",
+ AmlOpcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
+
+ /* Entire field must fit within the current length of the buffer */
+
+ if ((BitOffset + BitCount) >
+ (8 * (UINT32) BufferDesc->Buffer.Length))
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "Field size %d exceeds Buffer size %d (bits)\n",
+ BitOffset + BitCount, 8 * (UINT32) BufferDesc->Buffer.Length));
+ Status = AE_AML_BUFFER_LIMIT;
+ goto Cleanup;
+ }
+
/*
- * Setup field according to the object type
+ * Initialize areas of the field object that are common to all fields
+ * For FieldFlags, use LOCK_RULE = 0 (NO_LOCK), UPDATE_RULE = 0 (UPDATE_PRESERVE)
*/
- switch (SrcDesc->Common.Type)
+ Status = AcpiExPrepCommonFieldObject (ObjDesc, FieldFlags, 0,
+ BitOffset, BitCount);
+ if (ACPI_FAILURE (Status))
{
+ goto Cleanup;
+ }
- /* SourceBuff := TermArg=>Buffer */
-
- case ACPI_TYPE_BUFFER:
+ ObjDesc->BufferField.BufferObj = BufferDesc;
- if ((BitOffset + BitCount) >
- (8 * (UINT32) SrcDesc->Buffer.Length))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Field size %d exceeds Buffer size %d (bits)\n",
- BitOffset + BitCount, 8 * (UINT32) SrcDesc->Buffer.Length));
- Status = AE_AML_BUFFER_LIMIT;
- goto Cleanup;
- }
+ /* Reference count for BufferDesc inherits ObjDesc count */
- /*
- * Initialize areas of the field object that are common to all fields
- * For FieldFlags, use LOCK_RULE = 0 (NO_LOCK), UPDATE_RULE = 0 (UPDATE_PRESERVE)
- */
- Status = AcpiExPrepCommonFieldObject (ObjDesc, FieldFlags, 0,
- BitOffset, BitCount);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
+ BufferDesc->Common.ReferenceCount = (UINT16) (BufferDesc->Common.ReferenceCount +
+ ObjDesc->Common.ReferenceCount);
- ObjDesc->BufferField.BufferObj = SrcDesc;
- /* Reference count for SrcDesc inherits ObjDesc count */
+Cleanup:
- SrcDesc->Common.ReferenceCount = (UINT16) (SrcDesc->Common.ReferenceCount +
- ObjDesc->Common.ReferenceCount);
- break;
+ /* Always delete the operands */
+ AcpiUtRemoveReference (OffsetDesc);
+ AcpiUtRemoveReference (BufferDesc);
- /* Improper object type */
+ if (AmlOpcode == AML_CREATE_FIELD_OP)
+ {
+ AcpiUtRemoveReference (LengthDesc);
+ }
- default:
+ /* On failure, delete the result descriptor */
- if ((SrcDesc->Common.Type > (UINT8) INTERNAL_TYPE_REFERENCE) || !AcpiUtValidObjectType (SrcDesc->Common.Type)) /* This line MUST be a single line until AcpiSrc can handle it (block deletion) */
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Tried to create field in invalid object type %X\n",
- SrcDesc->Common.Type));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Tried to create field in improper object type - %s\n",
- AcpiUtGetTypeName (SrcDesc->Common.Type)));
- }
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiUtRemoveReference (ResultDesc); /* Result descriptor */
+ }
+ else
+ {
+ /* Now the address and length are valid for this BufferField */
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ ObjDesc->BufferField.Flags |= AOPOBJ_DATA_VALID;
}
+ return_ACPI_STATUS (Status);
+}
- if (AML_CREATE_FIELD_OP == Op->Opcode)
- {
- /* Delete object descriptor unique to CreateField */
- AcpiUtRemoveReference (CntDesc);
- CntDesc = NULL;
- }
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiDsEvalBufferFieldOperands
+ *
+ * PARAMETERS: WalkState - Current walk
+ * Op - A valid BufferField Op object
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Get BufferField Buffer and Index
+ * Called from AcpiDsExecEndOp during BufferField parse tree walk
+ *
+ ****************************************************************************/
+ACPI_STATUS
+AcpiDsEvalBufferFieldOperands (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_STATUS Status;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_NAMESPACE_NODE *Node;
+ ACPI_PARSE_OBJECT *NextOp;
-Cleanup:
- /* Always delete the operands */
+ ACPI_FUNCTION_TRACE_PTR ("DsEvalBufferFieldOperands", Op);
- AcpiUtRemoveReference (OffDesc);
- AcpiUtRemoveReference (SrcDesc);
- if (AML_CREATE_FIELD_OP == Op->Opcode)
+ /*
+ * This is where we evaluate the address and length fields of the
+ * CreateXxxField declaration
+ */
+ Node = Op->Common.Node;
+
+ /* NextOp points to the op that holds the Buffer */
+
+ NextOp = Op->Common.Value.Arg;
+
+ /* Evaluate/create the address and length operands */
+
+ Status = AcpiDsCreateOperands (WalkState, NextOp);
+ if (ACPI_FAILURE (Status))
{
- AcpiUtRemoveReference (CntDesc);
+ return_ACPI_STATUS (Status);
}
- /* On failure, delete the result descriptor */
+ ObjDesc = AcpiNsGetAttachedObject (Node);
+ if (!ObjDesc)
+ {
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ /* Resolve the operands */
+
+ Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
+ ACPI_WALK_OPERANDS, WalkState);
+
+ ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
+ AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
+ WalkState->NumOperands, "after AcpiExResolveOperands");
if (ACPI_FAILURE (Status))
{
- AcpiUtRemoveReference (ResDesc); /* Result descriptor */
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) bad operand(s) (%X)\n",
+ AcpiPsGetOpcodeName (Op->Common.AmlOpcode), Status));
+
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Initialize the Buffer Field */
+
+ if (Op->Common.AmlOpcode == AML_CREATE_FIELD_OP)
+ {
+ /* NOTE: Slightly different operands for this opcode */
+
+ Status = AcpiDsInitBufferField (Op->Common.AmlOpcode, ObjDesc,
+ WalkState->Operands[0], WalkState->Operands[1],
+ WalkState->Operands[2], WalkState->Operands[3]);
}
else
{
- /* Now the address and length are valid for this BufferField */
+ /* All other, CreateXxxField opcodes */
- ObjDesc->BufferField.Flags |= AOPOBJ_DATA_VALID;
+ Status = AcpiDsInitBufferField (Op->Common.AmlOpcode, ObjDesc,
+ WalkState->Operands[0], WalkState->Operands[1],
+ NULL, WalkState->Operands[2]);
}
return_ACPI_STATUS (Status);
@@ -738,7 +753,8 @@ Cleanup:
*
* FUNCTION: AcpiDsEvalRegionOperands
*
- * PARAMETERS: Op - A valid region Op object
+ * PARAMETERS: WalkState - Current walk
+ * Op - A valid region Op object
*
* RETURN: Status
*
@@ -765,15 +781,15 @@ AcpiDsEvalRegionOperands (
/*
* This is where we evaluate the address and length fields of the OpRegion declaration
*/
- Node = Op->Node;
+ Node = Op->Common.Node;
/* NextOp points to the op that holds the SpaceID */
- NextOp = Op->Value.Arg;
+ NextOp = Op->Common.Value.Arg;
/* NextOp points to address op */
- NextOp = NextOp->Next;
+ NextOp = NextOp->Common.Next;
/* Evaluate/create the address and length operands */
@@ -785,14 +801,14 @@ AcpiDsEvalRegionOperands (
/* Resolve the length and address operands to numbers */
- Status = AcpiExResolveOperands (Op->Opcode, ACPI_WALK_OPERANDS, WalkState);
+ Status = AcpiExResolveOperands (Op->Common.AmlOpcode, ACPI_WALK_OPERANDS, WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
- AcpiPsGetOpcodeName (Op->Opcode),
+ AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
1, "after AcpiExResolveOperands");
ObjDesc = AcpiNsGetAttachedObject (Node);
@@ -837,7 +853,9 @@ AcpiDsEvalRegionOperands (
*
* FUNCTION: AcpiDsEvalDataObjectOperands
*
- * PARAMETERS: Op - A valid DataObject Op object
+ * PARAMETERS: WalkState - Current walk
+ * Op - A valid DataObject Op object
+ * ObjDesc - DataObject
*
* RETURN: Status
*
@@ -863,7 +881,7 @@ AcpiDsEvalDataObjectOperands (
/* The first operand (for all of these data objects) is the length */
- Status = AcpiDsCreateOperand (WalkState, Op->Value.Arg, 1);
+ Status = AcpiDsCreateOperand (WalkState, Op->Common.Value.Arg, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -884,13 +902,18 @@ AcpiDsEvalDataObjectOperands (
/* Cleanup for length operand */
- AcpiDsObjStackPop (1, WalkState);
+ Status = AcpiDsObjStackPop (1, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
AcpiUtRemoveReference (ArgDesc);
/*
* Create the actual data object
*/
- switch (Op->Opcode)
+ switch (Op->Common.AmlOpcode)
{
case AML_BUFFER_OP:
@@ -914,10 +937,10 @@ AcpiDsEvalDataObjectOperands (
* in this case, the return object will be stored in the parse tree
* for the package.
*/
- if ((!Op->Parent) ||
- ((Op->Parent->Opcode != AML_PACKAGE_OP) &&
- (Op->Parent->Opcode != AML_VAR_PACKAGE_OP) &&
- (Op->Parent->Opcode != AML_NAME_OP)))
+ if ((!Op->Common.Parent) ||
+ ((Op->Common.Parent->Common.AmlOpcode != AML_PACKAGE_OP) &&
+ (Op->Common.Parent->Common.AmlOpcode != AML_VAR_PACKAGE_OP) &&
+ (Op->Common.Parent->Common.AmlOpcode != AML_NAME_OP)))
{
WalkState->ResultObj = ObjDesc;
}
@@ -955,9 +978,9 @@ AcpiDsExecBeginControlOp (
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p Opcode=%2.2X State=%p\n", Op,
- Op->Opcode, WalkState));
+ Op->Common.AmlOpcode, WalkState));
- switch (Op->Opcode)
+ switch (Op->Common.AmlOpcode)
{
case AML_IF_OP:
case AML_WHILE_OP:
@@ -979,7 +1002,7 @@ AcpiDsExecBeginControlOp (
*/
ControlState->Control.AmlPredicateStart = WalkState->ParserState.Aml - 1;
ControlState->Control.PackageEnd = WalkState->ParserState.PkgEnd;
- ControlState->Control.Opcode = Op->Opcode;
+ ControlState->Control.Opcode = Op->Common.AmlOpcode;
/* Push the control state on this walk's control stack */
@@ -1037,7 +1060,7 @@ AcpiDsExecEndControlOp (
ACPI_FUNCTION_NAME ("DsExecEndControlOp");
- switch (Op->Opcode)
+ switch (Op->Common.AmlOpcode)
{
case AML_IF_OP:
@@ -1089,18 +1112,18 @@ AcpiDsExecEndControlOp (
case AML_RETURN_OP:
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "[RETURN_OP] Op=%p Arg=%p\n",Op, Op->Value.Arg));
+ "[RETURN_OP] Op=%p Arg=%p\n",Op, Op->Common.Value.Arg));
/*
* One optional operand -- the return value
* It can be either an immediate operand or a result that
* has been bubbled up the tree
*/
- if (Op->Value.Arg)
+ if (Op->Common.Value.Arg)
{
/* Return statement has an immediate operand */
- Status = AcpiDsCreateOperands (WalkState, Op->Value.Arg);
+ Status = AcpiDsCreateOperands (WalkState, Op->Common.Value.Arg);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -1136,8 +1159,8 @@ AcpiDsExecEndControlOp (
*
* Allow references created by the Index operator to return unchanged.
*/
- if ((ACPI_GET_DESCRIPTOR_TYPE (WalkState->Results->Results.ObjDesc[0]) == ACPI_DESC_TYPE_INTERNAL) &&
- ((WalkState->Results->Results.ObjDesc [0])->Common.Type == INTERNAL_TYPE_REFERENCE) &&
+ if ((ACPI_GET_DESCRIPTOR_TYPE (WalkState->Results->Results.ObjDesc[0]) == ACPI_DESC_TYPE_OPERAND) &&
+ (ACPI_GET_OBJECT_TYPE (WalkState->Results->Results.ObjDesc [0]) == INTERNAL_TYPE_REFERENCE) &&
((WalkState->Results->Results.ObjDesc [0])->Reference.Opcode != AML_INDEX_OP))
{
Status = AcpiExResolveToValue (&WalkState->Results->Results.ObjDesc [0], WalkState);
@@ -1184,7 +1207,7 @@ AcpiDsExecEndControlOp (
/* Call up to the OS service layer to handle this */
- AcpiOsSignal (ACPI_SIGNAL_BREAKPOINT, "Executed AML Breakpoint opcode");
+ Status = AcpiOsSignal (ACPI_SIGNAL_BREAKPOINT, "Executed AML Breakpoint opcode");
/* If and when it returns, all done. */
@@ -1217,7 +1240,7 @@ AcpiDsExecEndControlOp (
/* Return status depending on opcode */
- if (Op->Opcode == AML_BREAK_OP)
+ if (Op->Common.AmlOpcode == AML_BREAK_OP)
{
Status = AE_CTRL_BREAK;
}
@@ -1231,7 +1254,7 @@ AcpiDsExecEndControlOp (
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown control opcode=%X Op=%p\n",
- Op->Opcode, Op));
+ Op->Common.AmlOpcode, Op));
Status = AE_AML_BAD_OPCODE;
break;
OpenPOWER on IntegriCloud