mirror of
https://github.com/acpica/acpica/
synced 2025-01-18 15:39:18 +03:00
Changes to support Intel 64-bit compiler
date 2001.12.12.00.13.00; author rmoore1; state Exp;
This commit is contained in:
parent
717c39f09d
commit
17f77bef22
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dsutils - Dispatcher utilities
|
||||
* $Revision: 1.85 $
|
||||
* $Revision: 1.86 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -199,7 +199,6 @@ AcpiDsIsResultUsed (
|
||||
/* Never delete the return value associated with a return opcode */
|
||||
|
||||
goto ResultUsed;
|
||||
break;
|
||||
|
||||
case AML_IF_OP:
|
||||
case AML_WHILE_OP:
|
||||
@ -218,7 +217,6 @@ AcpiDsIsResultUsed (
|
||||
/* The general control opcode returns no result */
|
||||
|
||||
goto ResultNotUsed;
|
||||
break;
|
||||
|
||||
|
||||
case AML_CLASS_CREATE:
|
||||
@ -228,7 +226,6 @@ AcpiDsIsResultUsed (
|
||||
* the operands can be method calls. The result is used.
|
||||
*/
|
||||
goto ResultUsed;
|
||||
break;
|
||||
|
||||
|
||||
case AML_CLASS_NAMED_OBJECT:
|
||||
@ -244,7 +241,6 @@ AcpiDsIsResultUsed (
|
||||
}
|
||||
|
||||
goto ResultNotUsed;
|
||||
break;
|
||||
|
||||
|
||||
/*
|
||||
@ -253,7 +249,6 @@ AcpiDsIsResultUsed (
|
||||
*/
|
||||
default:
|
||||
goto ResultUsed;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: dswexec - Dispatcher method execution callbacks;
|
||||
* dispatch to interpreter.
|
||||
* $Revision: 1.76 $
|
||||
* $Revision: 1.85 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -130,9 +130,9 @@
|
||||
MODULE_NAME ("dswexec")
|
||||
|
||||
/*
|
||||
* Dispatch tables for opcode classes
|
||||
* Dispatch table for opcode classes
|
||||
*/
|
||||
ACPI_EXECUTE_OP AcpiGbl_OpClassDispatch [] = {
|
||||
ACPI_EXECUTE_OP AcpiGbl_OpTypeDispatch [] = {
|
||||
AcpiExOpcode_1A_0T_0R,
|
||||
AcpiExOpcode_1A_0T_1R,
|
||||
AcpiExOpcode_1A_1T_0R,
|
||||
@ -145,8 +145,6 @@ ACPI_EXECUTE_OP AcpiGbl_OpClassDispatch [] = {
|
||||
AcpiExOpcode_3A_1T_1R,
|
||||
AcpiExOpcode_6A_0T_1R};
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsGetPredicateValue
|
||||
@ -185,7 +183,6 @@ AcpiDsGetPredicateValue (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Status = AcpiDsCreateOperand (WalkState, WalkState->Op, 0);
|
||||
@ -205,13 +202,12 @@ AcpiDsGetPredicateValue (
|
||||
|
||||
if (!ObjDesc)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No predicate ObjDesc=%X State=%X\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No predicate ObjDesc=%p State=%p\n",
|
||||
ObjDesc, WalkState));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_NO_OPERAND);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Result of predicate evaluation currently must
|
||||
* be a number
|
||||
@ -219,14 +215,13 @@ AcpiDsGetPredicateValue (
|
||||
if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Bad predicate (not a number) ObjDesc=%X State=%X Type=%X\n",
|
||||
"Bad predicate (not a number) ObjDesc=%p State=%p Type=%X\n",
|
||||
ObjDesc, WalkState, ObjDesc->Common.Type));
|
||||
|
||||
Status = AE_AML_OPERAND_TYPE;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
|
||||
/* Truncate the predicate to 32-bits if necessary */
|
||||
|
||||
AcpiExTruncateFor32bitTable (ObjDesc, WalkState);
|
||||
@ -239,7 +234,6 @@ AcpiDsGetPredicateValue (
|
||||
{
|
||||
WalkState->ControlState->Common.Value = TRUE;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
@ -253,7 +247,7 @@ AcpiDsGetPredicateValue (
|
||||
|
||||
Cleanup:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Completed a predicate eval=%X Op=%X\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Completed a predicate eval=%X Op=%p\n",
|
||||
WalkState->ControlState->Common.Value, WalkState->Op));
|
||||
|
||||
/* Break to debugger to display result */
|
||||
@ -312,6 +306,13 @@ AcpiDsExecBeginOp (
|
||||
WalkState->Op = Op;
|
||||
WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
|
||||
WalkState->Opcode = Op->Opcode;
|
||||
|
||||
if (AcpiNsOpensScope (WalkState->OpInfo->ObjectType))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "(%s) Popping scope for Op %p\n",
|
||||
AcpiUtGetTypeName (WalkState->OpInfo->ObjectType), Op));
|
||||
AcpiDsScopeStackPop (WalkState);
|
||||
}
|
||||
}
|
||||
|
||||
if (Op == WalkState->Origin)
|
||||
@ -333,7 +334,7 @@ AcpiDsExecBeginOp (
|
||||
(WalkState->ControlState->Common.State ==
|
||||
CONTROL_CONDITIONAL_EXECUTING))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Exec predicate Op=%X State=%X\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Exec predicate Op=%p State=%p\n",
|
||||
Op, WalkState));
|
||||
|
||||
WalkState->ControlState->Common.State = CONTROL_PREDICATE_EXECUTING;
|
||||
@ -384,20 +385,17 @@ AcpiDsExecBeginOp (
|
||||
Status = AcpiDsLoad2BeginOp (WalkState, NULL);
|
||||
}
|
||||
|
||||
|
||||
if (Op->Opcode == AML_REGION_OP)
|
||||
{
|
||||
Status = AcpiDsResultStackPush (WalkState);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
/* most operators with arguments */
|
||||
|
||||
case AML_CLASS_EXECUTE:
|
||||
case AML_CLASS_CREATE:
|
||||
|
||||
/* most operators with arguments */
|
||||
/* Start a new result/operand state */
|
||||
|
||||
Status = AcpiDsResultStackPush (WalkState);
|
||||
@ -464,23 +462,20 @@ AcpiDsExecEndOp (
|
||||
WalkState->ReturnDesc = NULL;
|
||||
WalkState->ResultObj = NULL;
|
||||
|
||||
|
||||
/* Call debugger for single step support (DEBUG build only) */
|
||||
|
||||
DEBUGGER_EXEC (Status = AcpiDbSingleStep (WalkState, Op, OpClass));
|
||||
DEBUGGER_EXEC (if (ACPI_FAILURE (Status)) {return_ACPI_STATUS (Status);});
|
||||
|
||||
/* Decode the Opcode Class */
|
||||
|
||||
switch (OpClass)
|
||||
{
|
||||
/* Decode the Opcode Class */
|
||||
|
||||
case AML_CLASS_ARGUMENT: /* constants, literals, etc. do nothing */
|
||||
case AML_CLASS_ARGUMENT: /* constants, literals, etc. -- do nothing */
|
||||
break;
|
||||
|
||||
/* most operators with arguments */
|
||||
|
||||
case AML_CLASS_EXECUTE:
|
||||
|
||||
case AML_CLASS_EXECUTE: /* most operators with arguments */
|
||||
|
||||
/* Build resolved operand stack */
|
||||
|
||||
@ -500,45 +495,39 @@ AcpiDsExecEndOp (
|
||||
|
||||
/* Resolve all operands */
|
||||
|
||||
Status = AcpiExResolveOperands (WalkState->Opcode,
|
||||
&(WalkState->Operands [WalkState->NumOperands -1]),
|
||||
Status = AcpiExResolveOperands (WalkState->Opcode,
|
||||
&(WalkState->Operands [WalkState->NumOperands -1]),
|
||||
WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/* TBD: must pop and delete operands */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: Could not resolve operands, %s\n",
|
||||
AcpiPsGetOpcodeName (WalkState->Opcode), AcpiFormatException (Status)));
|
||||
DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE,
|
||||
AcpiPsGetOpcodeName (WalkState->Opcode),
|
||||
WalkState->NumOperands, "after ExResolveOperands");
|
||||
|
||||
/*
|
||||
* On error, we must delete all the operands and clear the
|
||||
* operand stack
|
||||
* Dispatch the request to the appropriate interpreter handler
|
||||
* routine. There is one routine per opcode "type" based upon the
|
||||
* number of opcode arguments and return type.
|
||||
*/
|
||||
for (i = 0; i < WalkState->NumOperands; i++)
|
||||
{
|
||||
AcpiUtRemoveReference (WalkState->Operands[i]);
|
||||
WalkState->Operands[i] = NULL;
|
||||
}
|
||||
|
||||
WalkState->NumOperands = 0;
|
||||
goto Cleanup;
|
||||
Status = AcpiGbl_OpTypeDispatch [OpType] (WalkState);
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"[%s]: Could not resolve operands, %s\n",
|
||||
AcpiPsGetOpcodeName (WalkState->Opcode),
|
||||
AcpiFormatException (Status)));
|
||||
}
|
||||
|
||||
DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE, AcpiPsGetOpcodeName (WalkState->Opcode),
|
||||
WalkState->NumOperands, "after ExResolveOperands");
|
||||
|
||||
/*
|
||||
* Dispatch the request to the appropriate interpreter handler
|
||||
* routine. There is one routine per opcode "type" based upon the
|
||||
* number of opcode arguments and return type.
|
||||
*/
|
||||
Status = AcpiGbl_OpClassDispatch [OpType] (WalkState);
|
||||
|
||||
|
||||
/* Clear the operand stack */
|
||||
/* Always delete the argument objects and clear the operand stack */
|
||||
|
||||
for (i = 0; i < WalkState->NumOperands; i++)
|
||||
{
|
||||
/*
|
||||
* Remove a reference to all operands, including both
|
||||
* "Arguments" and "Targets".
|
||||
*/
|
||||
AcpiUtRemoveReference (WalkState->Operands[i]);
|
||||
WalkState->Operands[i] = NULL;
|
||||
}
|
||||
WalkState->NumOperands = 0;
|
||||
@ -572,7 +561,7 @@ AcpiDsExecEndOp (
|
||||
|
||||
case AML_TYPE_METHOD_CALL:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Method invocation, Op=%X\n", Op));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Method invocation, Op=%p\n", Op));
|
||||
|
||||
/*
|
||||
* (AML_METHODCALL) Op->Value->Arg->Node contains
|
||||
@ -596,10 +585,9 @@ AcpiDsExecEndOp (
|
||||
}
|
||||
|
||||
/*
|
||||
* Since the operands will be passed to another
|
||||
* control method, we must resolve all local
|
||||
* references here (Local variables, arguments
|
||||
* to *this* method, etc.)
|
||||
* Since the operands will be passed to another control method,
|
||||
* we must resolve all local references here (Local variables,
|
||||
* arguments to *this* method, etc.)
|
||||
*/
|
||||
Status = AcpiDsResolveOperands (WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -618,13 +606,12 @@ AcpiDsExecEndOp (
|
||||
* especially the operand count!
|
||||
*/
|
||||
return_ACPI_STATUS (Status);
|
||||
break;
|
||||
|
||||
|
||||
case AML_TYPE_CREATE_FIELD:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Executing CreateField Buffer/Index Op=%X\n", Op));
|
||||
"Executing CreateField Buffer/Index Op=%p\n", Op));
|
||||
|
||||
Status = AcpiDsLoad2EndOp (WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -636,7 +623,10 @@ AcpiDsExecEndOp (
|
||||
break;
|
||||
|
||||
|
||||
case AML_TYPE_NAMED_OBJECT:
|
||||
case AML_TYPE_NAMED_FIELD:
|
||||
case AML_TYPE_NAMED_COMPLEX:
|
||||
case AML_TYPE_NAMED_SIMPLE:
|
||||
case AML_TYPE_NAMED_NO_OBJ:
|
||||
|
||||
Status = AcpiDsLoad2EndOp (WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -644,12 +634,10 @@ AcpiDsExecEndOp (
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Op->Opcode)
|
||||
if (Op->Opcode == AML_REGION_OP)
|
||||
{
|
||||
case AML_REGION_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Executing OpRegion Address/Length Op=%X\n", Op));
|
||||
"Executing OpRegion Address/Length Op=%p\n", Op));
|
||||
|
||||
Status = AcpiDsEvalRegionOperands (WalkState, Op);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -658,45 +646,29 @@ AcpiDsExecEndOp (
|
||||
}
|
||||
|
||||
Status = AcpiDsResultStackPop (WalkState);
|
||||
break;
|
||||
|
||||
|
||||
case AML_METHOD_OP:
|
||||
break;
|
||||
|
||||
|
||||
case AML_ALIAS_OP:
|
||||
|
||||
/* Alias creation was already handled by call
|
||||
to psxload above */
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
/* Nothing needs to be done */
|
||||
|
||||
Status = AE_OK;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case AML_TYPE_UNDEFINED:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Undefined opcode type Op=%X\n", Op));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Undefined opcode type Op=%p\n", Op));
|
||||
return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
|
||||
break;
|
||||
|
||||
|
||||
case AML_TYPE_BOGUS:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Internal opcode=%X type Op=%X\n",
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"Internal opcode=%X type Op=%p\n",
|
||||
WalkState->Opcode, Op));
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Unimplemented opcode, class=%X type=%X Opcode=%X Op=%X\n",
|
||||
"Unimplemented opcode, class=%X type=%X Opcode=%X Op=%p\n",
|
||||
OpClass, OpType, Op->Opcode, Op));
|
||||
|
||||
Status = AE_NOT_IMPLEMENTED;
|
||||
@ -705,8 +677,8 @@ AcpiDsExecEndOp (
|
||||
}
|
||||
|
||||
/*
|
||||
* ACPI 2.0 support for 64-bit integers:
|
||||
* Truncate numeric result value if we are executing from a 32-bit ACPI table
|
||||
* ACPI 2.0 support for 64-bit integers: Truncate numeric
|
||||
* result value if we are executing from a 32-bit ACPI table
|
||||
*/
|
||||
AcpiExTruncateFor32bitTable (WalkState->ResultObj, WalkState);
|
||||
|
||||
@ -742,10 +714,7 @@ Cleanup:
|
||||
|
||||
/* Always clear the object stack */
|
||||
|
||||
/* TBD: [Investigate] Clear stack of return value,
|
||||
but don't delete it */
|
||||
WalkState->NumOperands = 0;
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dswload - Dispatcher namespace load callbacks
|
||||
* $Revision: 1.48 $
|
||||
* $Revision: 1.56 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -129,6 +129,19 @@
|
||||
MODULE_NAME ("dswload")
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsInitCallbacks
|
||||
*
|
||||
* PARAMETERS: WalkState - Current state of the parse tree walk
|
||||
* PassNumber - 1, 2, or 3
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Init walk state callbacks
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsInitCallbacks (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
@ -157,14 +170,12 @@ AcpiDsInitCallbacks (
|
||||
|
||||
default:
|
||||
return (AE_BAD_PARAMETER);
|
||||
break;
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsLoad1BeginOp
|
||||
@ -187,7 +198,7 @@ AcpiDsLoad1BeginOp (
|
||||
ACPI_PARSE_OBJECT *Op;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OBJECT_TYPE8 DataType;
|
||||
ACPI_OBJECT_TYPE8 ObjectType;
|
||||
NATIVE_CHAR *Path;
|
||||
|
||||
|
||||
@ -197,6 +208,11 @@ AcpiDsLoad1BeginOp (
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
|
||||
if (Op && (Op->Opcode == AML_INT_NAMEDFIELD_OP))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState));
|
||||
}
|
||||
|
||||
/* We are only interested in opcodes that have an associated name */
|
||||
|
||||
if (WalkState->Op)
|
||||
@ -220,25 +236,17 @@ AcpiDsLoad1BeginOp (
|
||||
|
||||
/* Map the raw opcode into an internal object type */
|
||||
|
||||
DataType = AcpiDsMapNamedOpcodeToDataType (WalkState->Opcode);
|
||||
|
||||
ObjectType = WalkState->OpInfo->ObjectType;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"State=%p Op=%p Type=%x\n", WalkState, Op, DataType));
|
||||
|
||||
|
||||
if (WalkState->Opcode == AML_SCOPE_OP)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"State=%p Op=%p Type=%x\n", WalkState, Op, DataType));
|
||||
}
|
||||
"State=%p Op=%p Type=%x\n", WalkState, Op, ObjectType));
|
||||
|
||||
/*
|
||||
* Enter the named type into the internal namespace. We enter the name
|
||||
* as we go downward in the parse tree. Any necessary subobjects that involve
|
||||
* arguments to the opcode must be created as we go back up the parse tree later.
|
||||
*/
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, DataType,
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
|
||||
IMODE_LOAD_PASS1, NS_NO_UPSEARCH, WalkState, &(Node));
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -293,7 +301,7 @@ AcpiDsLoad1EndOp (
|
||||
ACPI_WALK_STATE *WalkState)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *Op;
|
||||
ACPI_OBJECT_TYPE8 DataType;
|
||||
ACPI_OBJECT_TYPE8 ObjectType;
|
||||
|
||||
|
||||
PROC_NAME ("DsLoad1EndOp");
|
||||
@ -304,34 +312,51 @@ AcpiDsLoad1EndOp (
|
||||
|
||||
/* We are only interested in opcodes that have an associated name */
|
||||
|
||||
if (!(WalkState->OpInfo->Flags & AML_NAMED))
|
||||
if (!(WalkState->OpInfo->Flags & (AML_NAMED | AML_FIELD)))
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Get the type to determine if we should pop the scope */
|
||||
/* Get the object type to determine if we should pop the scope */
|
||||
|
||||
DataType = AcpiDsMapNamedOpcodeToDataType (Op->Opcode);
|
||||
ObjectType = WalkState->OpInfo->ObjectType;
|
||||
|
||||
if (WalkState->OpInfo->Flags & AML_FIELD)
|
||||
{
|
||||
if (WalkState->Opcode == AML_FIELD_OP ||
|
||||
WalkState->Opcode == AML_BANK_FIELD_OP ||
|
||||
WalkState->Opcode == AML_INDEX_FIELD_OP)
|
||||
{
|
||||
AcpiDsInitFieldObjects (Op, WalkState);
|
||||
}
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
if (Op->Opcode == AML_REGION_OP)
|
||||
{
|
||||
/*Status = */AcpiExCreateRegion (((ACPI_PARSE2_OBJECT *) Op)->Data,
|
||||
((ACPI_PARSE2_OBJECT *) Op)->Length,
|
||||
(ACPI_ADR_SPACE_TYPE) ((Op->Value.Arg)->Value.Integer), WalkState);
|
||||
}
|
||||
|
||||
if (Op->Opcode == AML_NAME_OP)
|
||||
{
|
||||
/* For Name opcode, check the argument */
|
||||
/* For Name opcode, get the object type from the argument */
|
||||
|
||||
if (Op->Value.Arg)
|
||||
{
|
||||
DataType = AcpiDsMapOpcodeToDataType (
|
||||
(Op->Value.Arg)->Opcode, NULL);
|
||||
((ACPI_NAMESPACE_NODE *)Op->Node)->Type =
|
||||
(UINT8) DataType;
|
||||
ObjectType = (AcpiPsGetOpcodeInfo ((Op->Value.Arg)->Opcode))->ObjectType;
|
||||
Op->Node->Type = (UINT8) ObjectType;
|
||||
}
|
||||
}
|
||||
|
||||
/* Pop the scope stack */
|
||||
|
||||
if (AcpiNsOpensScope (DataType))
|
||||
if (AcpiNsOpensScope (ObjectType))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "(%s): Popping scope for Op %p\n",
|
||||
AcpiUtGetTypeName (DataType), Op));
|
||||
AcpiUtGetTypeName (ObjectType), Op));
|
||||
|
||||
AcpiDsScopeStackPop (WalkState);
|
||||
}
|
||||
@ -362,7 +387,7 @@ AcpiDsLoad2BeginOp (
|
||||
ACPI_PARSE_OBJECT *Op;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OBJECT_TYPE8 DataType;
|
||||
ACPI_OBJECT_TYPE8 ObjectType;
|
||||
NATIVE_CHAR *BufferPtr;
|
||||
void *Original = NULL;
|
||||
|
||||
@ -405,7 +430,6 @@ AcpiDsLoad2BeginOp (
|
||||
return (AE_OK);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* Get name from the op */
|
||||
@ -413,7 +437,6 @@ AcpiDsLoad2BeginOp (
|
||||
BufferPtr = (NATIVE_CHAR *) &((ACPI_PARSE2_OBJECT *)Op)->Name;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
BufferPtr = AcpiPsGetNextNamestring (&WalkState->ParserState);
|
||||
@ -422,10 +445,10 @@ AcpiDsLoad2BeginOp (
|
||||
|
||||
/* Map the raw opcode into an internal object type */
|
||||
|
||||
DataType = AcpiDsMapNamedOpcodeToDataType (WalkState->Opcode);
|
||||
ObjectType = WalkState->OpInfo->ObjectType;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"State=%p Op=%p Type=%x\n", WalkState, Op, DataType));
|
||||
"State=%p Op=%p Type=%x\n", WalkState, Op, ObjectType));
|
||||
|
||||
|
||||
if (WalkState->Opcode == AML_FIELD_OP ||
|
||||
@ -442,7 +465,7 @@ AcpiDsLoad2BeginOp (
|
||||
* The NamePath is an object reference to an existing object. Don't enter the
|
||||
* name into the namespace, but look it up for use later
|
||||
*/
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, DataType,
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
|
||||
IMODE_EXECUTE, NS_SEARCH_PARENT, WalkState, &(Node));
|
||||
}
|
||||
|
||||
@ -453,9 +476,9 @@ AcpiDsLoad2BeginOp (
|
||||
Original = Op->Node;
|
||||
Node = Op->Node;
|
||||
|
||||
if (AcpiNsOpensScope (DataType))
|
||||
if (AcpiNsOpensScope (ObjectType))
|
||||
{
|
||||
Status = AcpiDsScopeStackPush (Node, DataType, WalkState);
|
||||
Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
@ -470,7 +493,7 @@ AcpiDsLoad2BeginOp (
|
||||
* as we go downward in the parse tree. Any necessary subobjects that involve
|
||||
* arguments to the opcode must be created as we go back up the parse tree later.
|
||||
*/
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, DataType,
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
|
||||
IMODE_EXECUTE, NS_NO_UPSEARCH, WalkState, &(Node));
|
||||
}
|
||||
|
||||
@ -535,17 +558,18 @@ AcpiDsLoad2EndOp (
|
||||
{
|
||||
ACPI_PARSE_OBJECT *Op;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_OBJECT_TYPE8 DataType;
|
||||
ACPI_OBJECT_TYPE8 ObjectType;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_PARSE_OBJECT *Arg;
|
||||
ACPI_NAMESPACE_NODE *NewNode;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
PROC_NAME ("DsLoad2EndOp");
|
||||
|
||||
Op = WalkState->Op;
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Opcode [%4.4X] Op %p State %p\n",
|
||||
Op->Opcode, Op, WalkState));
|
||||
|
||||
/* Only interested in opcodes that have namespace objects */
|
||||
|
||||
@ -559,7 +583,7 @@ AcpiDsLoad2EndOp (
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"Ending scope Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
if (((ACPI_PARSE2_OBJECT *)Op)->Name == -1)
|
||||
if (((ACPI_PARSE2_OBJECT *)Op)->Name == ACPI_UINT16_MAX)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unnamed scope! Op=%p State=%p\n",
|
||||
Op, WalkState));
|
||||
@ -568,7 +592,7 @@ AcpiDsLoad2EndOp (
|
||||
}
|
||||
|
||||
|
||||
DataType = AcpiDsMapNamedOpcodeToDataType (Op->Opcode);
|
||||
ObjectType = WalkState->OpInfo->ObjectType;
|
||||
|
||||
/*
|
||||
* Get the Node/name from the earlier lookup
|
||||
@ -585,11 +609,10 @@ AcpiDsLoad2EndOp (
|
||||
|
||||
/* Pop the scope stack */
|
||||
|
||||
if (AcpiNsOpensScope (DataType))
|
||||
if (AcpiNsOpensScope (ObjectType))
|
||||
{
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "(%s) Popping scope for Op %p\n",
|
||||
AcpiUtGetTypeName (DataType), Op));
|
||||
AcpiUtGetTypeName (ObjectType), Op));
|
||||
AcpiDsScopeStackPop (WalkState);
|
||||
}
|
||||
|
||||
@ -621,85 +644,174 @@ AcpiDsLoad2EndOp (
|
||||
* AML_THERMALZONE
|
||||
*/
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"Create-Load [%s] State=%p Op=%p NamedObj=%p\n",
|
||||
AcpiPsGetOpcodeName (Op->Opcode), WalkState, Op, Node));
|
||||
|
||||
/* Decode the opcode */
|
||||
|
||||
Arg = Op->Value.Arg;
|
||||
|
||||
switch (Op->Opcode)
|
||||
switch (WalkState->OpInfo->Type)
|
||||
{
|
||||
|
||||
case AML_CREATE_FIELD_OP:
|
||||
case AML_CREATE_BIT_FIELD_OP:
|
||||
case AML_CREATE_BYTE_FIELD_OP:
|
||||
case AML_CREATE_WORD_FIELD_OP:
|
||||
case AML_CREATE_DWORD_FIELD_OP:
|
||||
case AML_CREATE_QWORD_FIELD_OP:
|
||||
case AML_TYPE_CREATE_FIELD:
|
||||
|
||||
/*
|
||||
* Create the field object, but the field buffer and index must
|
||||
* be evaluated later during the execution phase
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"CreateXxxField: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
Status = AcpiDsCreateBufferField (Op, WalkState);
|
||||
break;
|
||||
|
||||
/* Get the NameString argument */
|
||||
|
||||
if (Op->Opcode == AML_CREATE_FIELD_OP)
|
||||
case AML_TYPE_NAMED_FIELD:
|
||||
|
||||
switch (Op->Opcode)
|
||||
{
|
||||
Arg = AcpiPsGetArg (Op, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Create Bit/Byte/Word/Dword field */
|
||||
case AML_INDEX_FIELD_OP:
|
||||
|
||||
Arg = AcpiPsGetArg (Op, 2);
|
||||
}
|
||||
Status = AcpiDsCreateIndexField (Op, (ACPI_HANDLE) Arg->Node,
|
||||
WalkState);
|
||||
break;
|
||||
|
||||
if (!Arg)
|
||||
{
|
||||
Status = AE_AML_NO_OPERAND;
|
||||
goto Cleanup;
|
||||
}
|
||||
case AML_BANK_FIELD_OP:
|
||||
|
||||
/*
|
||||
* Enter the NameString into the namespace
|
||||
*/
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String,
|
||||
INTERNAL_TYPE_DEF_ANY, IMODE_LOAD_PASS1,
|
||||
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE,
|
||||
WalkState, &(NewNode));
|
||||
Status = AcpiDsCreateBankField (Op, Arg->Node, WalkState);
|
||||
break;
|
||||
|
||||
case AML_FIELD_OP:
|
||||
|
||||
Status = AcpiDsCreateField (Op, Arg->Node, WalkState);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_TYPE_NAMED_SIMPLE:
|
||||
|
||||
Status = AcpiDsCreateOperands (WalkState, Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* We could put the returned object (Node) on the object stack for later, but
|
||||
* for now, we will put it in the "op" object that the parser uses, so we
|
||||
* can get it again at the end of this scope
|
||||
*/
|
||||
Op->Node = NewNode;
|
||||
|
||||
/*
|
||||
* If there is no object attached to the node, this node was just created and
|
||||
* we need to create the field object. Otherwise, this was a lookup of an
|
||||
* existing node and we don't want to create the field object again.
|
||||
*/
|
||||
if (!NewNode->Object)
|
||||
switch (Op->Opcode)
|
||||
{
|
||||
case AML_PROCESSOR_OP:
|
||||
|
||||
Status = AcpiExCreateProcessor (WalkState);
|
||||
break;
|
||||
|
||||
case AML_POWER_RES_OP:
|
||||
|
||||
Status = AcpiExCreatePowerResource (WalkState);
|
||||
break;
|
||||
|
||||
case AML_MUTEX_OP:
|
||||
|
||||
Status = AcpiExCreateMutex (WalkState);
|
||||
break;
|
||||
|
||||
case AML_EVENT_OP:
|
||||
|
||||
Status = AcpiExCreateEvent (WalkState);
|
||||
break;
|
||||
|
||||
case AML_DATA_REGION_OP:
|
||||
|
||||
Status = AcpiExCreateTableRegion (WalkState);
|
||||
break;
|
||||
|
||||
case AML_ALIAS_OP:
|
||||
|
||||
Status = AcpiExCreateAlias (WalkState);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Unknown opcode */
|
||||
|
||||
Status = AE_OK;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Delete operands */
|
||||
|
||||
for (i = 1; i < WalkState->NumOperands; i++)
|
||||
{
|
||||
AcpiUtRemoveReference (WalkState->Operands[i]);
|
||||
WalkState->Operands[i] = NULL;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case AML_TYPE_NAMED_COMPLEX:
|
||||
|
||||
switch (Op->Opcode)
|
||||
{
|
||||
case AML_METHOD_OP:
|
||||
/*
|
||||
* The Field definition is not fully parsed at this time.
|
||||
* (We must save the address of the AML for the buffer and index operands)
|
||||
* MethodOp PkgLength NameString MethodFlags TermList
|
||||
*/
|
||||
Status = AcpiExCreateBufferField (((ACPI_PARSE2_OBJECT *) Op)->Data,
|
||||
((ACPI_PARSE2_OBJECT *) Op)->Length,
|
||||
NewNode, WalkState);
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Method: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
|
||||
if (!AcpiNsGetAttachedObject (Node))
|
||||
{
|
||||
Status = AcpiDsCreateOperands (WalkState, Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiExCreateMethod (((ACPI_PARSE2_OBJECT *) Op)->Data,
|
||||
((ACPI_PARSE2_OBJECT *) Op)->Length,
|
||||
WalkState);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_REGION_OP:
|
||||
/*
|
||||
* The OpRegion is not fully parsed at this time. Only valid argument is the SpaceId.
|
||||
* (We must save the address of the AML of the address and length operands)
|
||||
*/
|
||||
/*
|
||||
* If we have a valid region, initialize it
|
||||
* Namespace is NOT locked at this point.
|
||||
*/
|
||||
Status = AcpiEvInitializeRegion (AcpiNsGetAttachedObject (Node), FALSE);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
/*
|
||||
* If AE_NOT_EXIST is returned, it is not fatal
|
||||
* because many regions get created before a handler
|
||||
* is installed for said region.
|
||||
*/
|
||||
if (AE_NOT_EXIST == Status)
|
||||
{
|
||||
Status = AE_OK;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_NAME_OP:
|
||||
|
||||
Status = AcpiDsCreateNode (WalkState, Node, Op);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_INT_METHODCALL_OP:
|
||||
case AML_CLASS_INTERNAL:
|
||||
|
||||
/* case AML_INT_NAMEPATH_OP: */
|
||||
break;
|
||||
|
||||
|
||||
case AML_CLASS_METHOD_CALL:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"RESOLVING-MethodCall: State=%p Op=%p NamedObj=%p\n",
|
||||
@ -714,10 +826,14 @@ AcpiDsLoad2EndOp (
|
||||
WalkState, &(NewNode));
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/* TBD: has name already been resolved by here ??*/
|
||||
|
||||
/* TBD: [Restructure] Make sure that what we found is indeed a method! */
|
||||
/* We didn't search for a method on purpose, to see if the name would resolve! */
|
||||
/*
|
||||
* Make sure that what we found is indeed a method
|
||||
* We didn't search for a method on purpose, to see if the name would resolve
|
||||
*/
|
||||
if (NewNode->Type != ACPI_TYPE_METHOD)
|
||||
{
|
||||
Status = AE_AML_OPERAND_TYPE;
|
||||
}
|
||||
|
||||
/* We could put the returned object (Node) on the object stack for later, but
|
||||
* for now, we will put it in the "op" object that the parser uses, so we
|
||||
@ -726,225 +842,6 @@ AcpiDsLoad2EndOp (
|
||||
Op->Node = NewNode;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case AML_PROCESSOR_OP:
|
||||
|
||||
/* Nothing to do other than enter object into namespace */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Processor: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
|
||||
Status = AcpiExCreateProcessor (Op, Node);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"Completed Processor Init, Op=%p State=%p entry=%p\n",
|
||||
Op, WalkState, Node));
|
||||
break;
|
||||
|
||||
|
||||
case AML_POWER_RES_OP:
|
||||
|
||||
/* Nothing to do other than enter object into namespace */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-PowerResource: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
|
||||
Status = AcpiExCreatePowerResource (Op, Node);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"Completed PowerResource Init, Op=%p State=%p entry=%p\n",
|
||||
Op, WalkState, Node));
|
||||
break;
|
||||
|
||||
|
||||
case AML_THERMAL_ZONE_OP:
|
||||
|
||||
/* Nothing to do other than enter object into namespace */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-ThermalZone: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
break;
|
||||
|
||||
|
||||
case AML_FIELD_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Field: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
|
||||
Arg = Op->Value.Arg;
|
||||
|
||||
Status = AcpiDsCreateField (Op, Arg->Node, WalkState);
|
||||
break;
|
||||
|
||||
|
||||
case AML_INDEX_FIELD_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-IndexField: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
|
||||
Arg = Op->Value.Arg;
|
||||
|
||||
Status = AcpiDsCreateIndexField (Op, (ACPI_HANDLE) Arg->Node,
|
||||
WalkState);
|
||||
break;
|
||||
|
||||
|
||||
case AML_BANK_FIELD_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-BankField: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
|
||||
Arg = Op->Value.Arg;
|
||||
Status = AcpiDsCreateBankField (Op, Arg->Node, WalkState);
|
||||
break;
|
||||
|
||||
|
||||
/*
|
||||
* MethodOp PkgLength NamesString MethodFlags TermList
|
||||
*/
|
||||
case AML_METHOD_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Method: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
|
||||
if (!Node->Object)
|
||||
{
|
||||
Status = AcpiExCreateMethod (((ACPI_PARSE2_OBJECT *) Op)->Data,
|
||||
((ACPI_PARSE2_OBJECT *) Op)->Length,
|
||||
Arg->Value.Integer32, Node);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_MUTEX_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Mutex: Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
Status = AcpiDsCreateOperands (WalkState, Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiExCreateMutex (WalkState);
|
||||
break;
|
||||
|
||||
|
||||
case AML_EVENT_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Event: Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
Status = AcpiDsCreateOperands (WalkState, Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiExCreateEvent (WalkState);
|
||||
break;
|
||||
|
||||
|
||||
case AML_REGION_OP:
|
||||
|
||||
if (Node->Object)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-OpRegion: Op=%p State=%p NamedObj=%p\n",
|
||||
Op, WalkState, Node));
|
||||
|
||||
/*
|
||||
* The OpRegion is not fully parsed at this time. Only valid argument is the SpaceId.
|
||||
* (We must save the address of the AML of the address and length operands)
|
||||
*/
|
||||
Status = AcpiExCreateRegion (((ACPI_PARSE2_OBJECT *) Op)->Data,
|
||||
((ACPI_PARSE2_OBJECT *) Op)->Length,
|
||||
(ACPI_ADR_SPACE_TYPE) Arg->Value.Integer, WalkState);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"Completed OpRegion Init, Op=%p State=%p entry=%p\n",
|
||||
Op, WalkState, Node));
|
||||
break;
|
||||
|
||||
|
||||
case AML_DATA_REGION_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-DataRegion: Op=%p State=%p NamedObj=%p\n",
|
||||
Op, WalkState, Node));
|
||||
|
||||
Status = AcpiDsCreateOperands (WalkState, Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiExCreateTableRegion (WalkState);
|
||||
break;
|
||||
|
||||
|
||||
/* Namespace Modifier Opcodes */
|
||||
|
||||
case AML_ALIAS_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Alias: Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
Status = AcpiDsCreateOperands (WalkState, Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiExCreateAlias (WalkState);
|
||||
break;
|
||||
|
||||
|
||||
case AML_NAME_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Name: Op=%p State=%p\n", Op, WalkState));
|
||||
|
||||
/*
|
||||
* Because of the execution pass through the non-control-method
|
||||
* parts of the table, we can arrive here twice. Only init
|
||||
* the named object node the first time through
|
||||
*/
|
||||
if (!Node->Object)
|
||||
{
|
||||
Status = AcpiDsCreateNode (WalkState, Node, Op);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case AML_INT_NAMEPATH_OP:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-NamePath object: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
break;
|
||||
|
||||
|
||||
@ -957,7 +854,8 @@ Cleanup:
|
||||
|
||||
/* Remove the Node pushed at the very beginning */
|
||||
|
||||
AcpiDsObjStackPop (1, WalkState);
|
||||
WalkState->Operands[0] = NULL;
|
||||
WalkState->NumOperands = 0;
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user