aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/Subsystem/Dispatcher
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/Subsystem/Dispatcher')
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c9
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c50
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c21
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c12
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c18
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c63
10 files changed, 99 insertions, 92 deletions
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c
index bb634d712d19..11f304da90c2 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsfield - Dispatcher field routines
- * $Revision: 30 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
index 266fa6e048db..02e1322318d4 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
- * $Revision: 54 $
+ * $Revision: 56 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -544,8 +544,9 @@ AcpiDsRestartControlMethod (
}
DEBUG_PRINT (TRACE_DISPATCH,
- ("DsRestart: Method=%p Return=%p State=%p\n",
- WalkState->MethodCallOp, ReturnDesc, WalkState));
+ ("DsRestart: Method=%p Return=%p ReturnUsed?=%X ResStack=%p State=%p\n",
+ WalkState->MethodCallOp, ReturnDesc, WalkState->ReturnUsed,
+ WalkState->Results, WalkState));
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
index 022c1bd4c0a7..0734ce6f2d1d 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsmthdat - control method arguments and local variables
- * $Revision: 37 $
+ * $Revision: 39 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -132,7 +132,7 @@
*
* FUNCTION: AcpiDsMethodDataInit
*
- * PARAMETERS: *ObjDesc
+ * PARAMETERS: WalkState - Current walk state object
*
* RETURN: Status
*
@@ -193,7 +193,7 @@ AcpiDsMethodDataInit (
*
* FUNCTION: AcpiDsMethodDataDeleteAll
*
- * PARAMETERS: None
+ * PARAMETERS: WalkState - Current walk state object
*
* RETURN: Status
*
@@ -268,7 +268,9 @@ AcpiDsMethodDataDeleteAll (
*
* FUNCTION: AcpiDsMethodDataInitArgs
*
- * PARAMETERS: None
+ * PARAMETERS: *Params - Pointer to a parameter list for the method
+ * MaxParamCount - The arg count for this method
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -340,6 +342,7 @@ AcpiDsMethodDataInitArgs (
* Index - Which localVar or argument to get
* Entry - Pointer to where a pointer to the stack
* entry is returned.
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -415,6 +418,7 @@ AcpiDsMethodDataGetEntry (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to get
* Object - Object to be inserted into the stack entry
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -462,6 +466,7 @@ AcpiDsMethodDataSetEntry (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument whose type
* to get
+ * WalkState - Current walk state object
*
* RETURN: Data type of selected Arg or Local
* Used only in ExecMonadic2()/TypeOp.
@@ -513,6 +518,7 @@ AcpiDsMethodDataGetType (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument whose type
* to get
+ * WalkState - Current walk state object
*
* RETURN: Get the Node associated with a local or arg.
*
@@ -579,7 +585,8 @@ AcpiDsMethodDataGetNte (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to get
- * *DestDesc - Descriptor into which selected Arg
+ * WalkState - Current walk state object
+ * *DestDesc - Ptr to Descriptor into which selected Arg
* or Local value should be copied
*
* RETURN: Status
@@ -643,16 +650,20 @@ AcpiDsMethodDataGetValue (
switch (Type)
{
case MTH_TYPE_ARG:
+
DEBUG_PRINT (ACPI_ERROR,
("DsMethodDataGetValue: Uninitialized Arg[%d] at entry %p\n",
Index, Entry));
+
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
break;
case MTH_TYPE_LOCAL:
+
DEBUG_PRINT (ACPI_ERROR,
("DsMethodDataGetValue: Uninitialized Local[%d] at entry %p\n",
Index, Entry));
+
return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
break;
}
@@ -677,6 +688,7 @@ AcpiDsMethodDataGetValue (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to delete
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -727,7 +739,6 @@ AcpiDsMethodDataDeleteValue (
* Decrement the reference count by one to balance the
* increment when the object was stored in the slot.
*/
-
AcpiCmRemoveReference (Object);
}
@@ -742,18 +753,14 @@ AcpiDsMethodDataDeleteValue (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to set
- * *SrcDesc - Value to be stored
- * *DestDesc - Descriptor into which *SrcDesc
- * can be copied, or NULL if one must
- * be allocated for the purpose. If
- * provided, this descriptor will be
- * used for the new value.
+ * SrcDesc - Value to be stored
+ * WalkState - Current walk state
*
* RETURN: Status
*
* DESCRIPTION: Store a value in an Arg or Local. The SrcDesc is installed
* as the new value for the Arg or Local and the reference count
- * is incremented.
+ * for SrcDesc is incremented.
*
******************************************************************************/
@@ -840,7 +847,6 @@ AcpiDsMethodDataSetValue (
* Store this object into the Node
* (do the indirect store)
*/
-
Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) *Entry, SrcDesc,
SrcDesc->Common.Type);
return_ACPI_STATUS (Status);
@@ -848,10 +854,19 @@ AcpiDsMethodDataSetValue (
/*
- * Otherwise, just delete the existing object
- * before storing the new one
+ * Perform "Implicit conversion" of the new object to the type of the
+ * existing object
*/
+ Status = AcpiAmlConvertToTargetType ((*Entry)->Common.Type, &SrcDesc, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+ /*
+ * Delete the existing object
+ * before storing the new one
+ */
AcpiDsMethodDataDeleteValue (Type, Index, WalkState);
}
@@ -862,7 +877,6 @@ AcpiDsMethodDataSetValue (
* Install the new object in the stack entry
* (increments the object reference count by one)
*/
-
Status = AcpiDsMethodDataSetEntry (Type, Index, SrcDesc, WalkState);
if (ACPI_FAILURE (Status))
{
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
index 6e583241117f..870fd3278e0c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
- * $Revision: 54 $
+ * $Revision: 56 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -364,7 +364,7 @@ AcpiDsInitObjectFromOp (
/* We are expecting a number */
- if (ArgDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ArgDesc->Common.Type != ACPI_TYPE_INTEGER)
{
DEBUG_PRINT (ACPI_ERROR,
("InitObject: Expecting number, got obj: %p type %X\n",
@@ -375,7 +375,7 @@ AcpiDsInitObjectFromOp (
/* Get the value, delete the internal object */
- (*ObjDesc)->Buffer.Length = (UINT32) ArgDesc->Number.Value;
+ (*ObjDesc)->Buffer.Length = (UINT32) ArgDesc->Integer.Value;
AcpiCmRemoveReference (ArgDesc);
/* Allocate the buffer */
@@ -439,8 +439,8 @@ AcpiDsInitObjectFromOp (
Status = AcpiDsBuildInternalObject (WalkState, Op, ObjDesc);
break;
- case ACPI_TYPE_NUMBER:
- (*ObjDesc)->Number.Value = Op->Value.Integer;
+ case ACPI_TYPE_INTEGER:
+ (*ObjDesc)->Integer.Value = Op->Value.Integer;
break;
@@ -559,19 +559,22 @@ AcpiDsBuildInternalSimpleObj (
if (Name)
{
- REPORT_WARNING (("Reference %s AML %X not found\n",
+ REPORT_WARNING (("Reference %s at AML %X not found\n",
Name, Op->AmlOffset));
AcpiCmFree (Name);
}
else
{
- REPORT_WARNING (("Reference %s AML %X not found\n",
+ REPORT_WARNING (("Reference %s at AML %X not found\n",
Op->Value.String, Op->AmlOffset));
}
*ObjDescPtr = NULL;
}
- return_ACPI_STATUS (Status);
+ else
+ {
+ return_ACPI_STATUS (Status);
+ }
}
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
index 6e10594d4468..1a736ff6a6d9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
- * $Revision: 29 $
+ * $Revision: 30 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -485,7 +485,7 @@ AcpiDsEvalFieldUnitOperands (
}
- Offset = (UINT32) OffDesc->Number.Value;
+ Offset = (UINT32) OffDesc->Integer.Value;
/*
@@ -562,7 +562,7 @@ AcpiDsEvalFieldUnitOperands (
/* Offset is in bits, count is in bits */
BitOffset = Offset;
- BitCount = (UINT16) CntDesc->Number.Value;
+ BitCount = (UINT16) CntDesc->Integer.Value;
break;
@@ -753,7 +753,7 @@ AcpiDsEvalRegionOperands (
*/
OperandDesc = WalkState->Operands[WalkState->NumOperands - 1];
- ObjDesc->Region.Length = (UINT32) OperandDesc->Number.Value;
+ ObjDesc->Region.Length = (UINT32) OperandDesc->Integer.Value;
AcpiCmRemoveReference (OperandDesc);
/*
@@ -762,7 +762,7 @@ AcpiDsEvalRegionOperands (
*/
OperandDesc = WalkState->Operands[WalkState->NumOperands - 2];
- ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) OperandDesc->Number.Value;
+ ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) OperandDesc->Integer.Value;
AcpiCmRemoveReference (OperandDesc);
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
index c1278ce6ce5f..9e4d0da3400b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsutils - Dispatcher utilities
- * $Revision: 51 $
+ * $Revision: 52 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -744,7 +744,7 @@ AcpiDsMapOpcodeToDataType (
case AML_WORD_OP:
case AML_DWORD_OP:
- DataType = ACPI_TYPE_NUMBER;
+ DataType = ACPI_TYPE_INTEGER;
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
index 1e9c1402dfa7..d3c04a6371a9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
@@ -2,7 +2,7 @@
*
* Module Name: dswexec - Dispatcher method execution callbacks;
* dispatch to interpreter.
- * $Revision: 51 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,7 +138,7 @@
*
* RETURN: Status
*
- * DESCRIPTION:
+ * DESCRIPTION: Get the result of a predicate evaluation
*
****************************************************************************/
@@ -163,7 +163,7 @@ AcpiDsGetPredicateValue (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsGetPredicateValue: Missing or null operand, %s\n",
+ ("DsGetPredicateValue: Could not get result from predicate evaluation, %s\n",
AcpiCmFormatException (Status)));
return_ACPI_STATUS (Status);
@@ -202,7 +202,7 @@ AcpiDsGetPredicateValue (
* be a number
*/
- if (ObjDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
DEBUG_PRINT (ACPI_ERROR,
("ExecEndOp: Bad predicate (not a number) ObjDesc=%X State=%X Type=%X\n",
@@ -213,16 +213,16 @@ AcpiDsGetPredicateValue (
}
- /* TBD: 64/32-bit */
+ /* Truncate the predicate to 32-bits if necessary */
- ObjDesc->Number.Value &= (UINT64) 0x00000000FFFFFFFF;
+ AcpiAmlTruncateFor32bitTable (ObjDesc, WalkState);
/*
* Save the result of the predicate evaluation on
* the control stack
*/
- if (ObjDesc->Number.Value)
+ if (ObjDesc->Integer.Value)
{
WalkState->ControlState->Common.Value = TRUE;
}
@@ -471,6 +471,8 @@ AcpiDsExecEndOp (
WalkState->NumOperands = 0;
WalkState->ReturnDesc = NULL;
+ WalkState->OpInfo = OpInfo;
+ WalkState->Opcode = Opcode;
/* Call debugger for single step support (DEBUG build only) */
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
index 4a8053356cca..47d57a26eff8 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
- * $Revision: 25 $
+ * $Revision: 26 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
index 03a03d5a9634..6e7d7ffed122 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswscope - Scope stack manipulation
- * $Revision: 41 $
+ * $Revision: 42 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
index f4494de1174a..dc0b394ea286 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
- * $Revision: 36 $
+ * $Revision: 38 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,30 +128,6 @@
MODULE_NAME ("dswstate")
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsResultStackClear
- *
- * PARAMETERS: WalkState - Current Walk state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Reset this walk's result stack pointers to zero, thus setting
- * the stack to zero.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-xxxAcpiDsResultStackClear (
- ACPI_WALK_STATE *WalkState)
-{
-/*
- WalkState->NumResults = 0;
- WalkState->CurrentResult = 0;
-*/
- return (AE_OK);
-}
-
/*******************************************************************************
*
@@ -259,7 +235,7 @@ AcpiDsResultRemove (
DEBUG_PRINT (ACPI_ERROR,
("DsResultStackRemove: Null operand! State=%p #Ops=%X, Index=%X\n",
WalkState, State->Results.NumResults, Index));
- return (AE_AML_NO_OPERAND);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove the object */
@@ -311,9 +287,9 @@ AcpiDsResultPop (
if (!State->Results.NumResults)
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsResultPop: No result objects! State=%p\n",
+ ("DsResultPop: Result stack is empty! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove top element */
@@ -342,12 +318,12 @@ AcpiDsResultPop (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPop: No result objects! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultPop
+ * FUNCTION: AcpiDsResultPopFromBottom
*
* PARAMETERS: Object - Where to return the popped object
* WalkState - Current Walk state
@@ -383,7 +359,7 @@ AcpiDsResultPopFromBottom (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPopFromBottom: No result objects! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove Bottom element */
@@ -407,7 +383,7 @@ AcpiDsResultPopFromBottom (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPopFromBottom: Null operand! State=%p #Ops=%X, Index=%X\n",
WalkState, State->Results.NumResults, Index));
- return (AE_AML_NO_OPERAND);
+ return (AE_AML_NO_RETURN_VALUE);
}
DEBUG_PRINT (TRACE_EXEC,
@@ -422,15 +398,14 @@ AcpiDsResultPopFromBottom (
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultPop
+ * FUNCTION: AcpiDsResultPush
*
* PARAMETERS: Object - Where to return the popped object
* WalkState - Current Walk state
*
* RETURN: Status
*
- * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
- * other words, this is a FIFO.
+ * DESCRIPTION: Push an object onto the current result stack
*
******************************************************************************/
@@ -445,7 +420,9 @@ AcpiDsResultPush (
State = WalkState->Results;
if (!State)
{
- return (AE_OK);
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPush: No result stack frame\n"));
+ return (AE_AML_INTERNAL);
}
if (State->Results.NumResults == OBJ_NUM_OPERANDS)
@@ -964,6 +941,7 @@ AcpiDsCreateWalkState (
ACPI_WALK_LIST *WalkList)
{
ACPI_WALK_STATE *WalkState;
+ ACPI_STATUS Status;
FUNCTION_TRACE ("DsCreateWalkState");
@@ -987,7 +965,7 @@ AcpiDsCreateWalkState (
DEBUG_PRINT (TRACE_EXEC, ("DsCreateWalkState: State %p from cache\n", WalkState));
AcpiCmReleaseMutex (ACPI_MTX_CACHES);
- }
+ }
else
{
@@ -1015,6 +993,15 @@ AcpiDsCreateWalkState (
AcpiDsMethodDataInit (WalkState);
#endif
+ /* Create an initial result stack entry */
+
+ Status = AcpiDsResultStackPush (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_VALUE (NULL);
+ }
+
+
/* Put the new state at the head of the walk list */
AcpiDsPushWalkState (WalkState, WalkList);