Don't delete everything on the caller's obj stack, just the method

args


date	2000.02.23.22.23.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 17:01:04 +00:00
parent 32c1dfa384
commit c016d15600

View File

@ -257,7 +257,10 @@ PsxCallControlMethod (
ACPI_STATUS Status;
ACPI_DEFERRED_OP *Method;
NAME_TABLE_ENTRY *MethodNte;
ACPI_OBJECT_INTERNAL *MethodDesc;
ACPI_WALK_STATE *NextWalkState;
UINT32 NumArgs;
UINT32 i;
FUNCTION_TRACE_PTR ("PsxCallControlMethod", ThisWalkState);
@ -285,6 +288,9 @@ PsxCallControlMethod (
/* TBD: Parse method */
}
MethodDesc = NsGetAttachedObject (MethodNte);
NumArgs = MethodDesc->Method.MethodFlags & METHOD_ARG_COUNT_MASK;
/* Save the Op for when this walk is restarted */
ThisWalkState->PrevOp = Op;
@ -310,7 +316,13 @@ PsxCallControlMethod (
/* Delete the operands on the previous walkstate operand stack (they were copied to new objects) */
PsxObjStackDeleteAll (ThisWalkState);
for (i = 0; i < NumArgs; i++)
{
CmDeleteInternalObject (ThisWalkState->Operands [ThisWalkState->NumOperands]);
PsxObjStackPop (1, ThisWalkState);
}
/* TBD: REMOVE PsxObjStackDeleteAll (ThisWalkState); */
/* The next op will be the beginning of the method */