dsmthdat.c (124120) | dsmthdat.c (126372) |
---|---|
1/******************************************************************************* 2 * 3 * Module Name: dsmthdat - control method arguments and local variables | 1/******************************************************************************* 2 * 3 * Module Name: dsmthdat - control method arguments and local variables |
4 * $Revision: 74 $ | 4 * $Revision: 77 $ |
5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * | 5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * |
12 * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. | 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. |
13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. --- 259 unchanged lines hidden (view full) --- 280 } 281 282 /* Copy passed parameters into the new method stack frame */ 283 284 while ((Index < ACPI_METHOD_NUM_ARGS) && (Index < MaxParamCount) && Params[Index]) 285 { 286 /* 287 * A valid parameter. | 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. --- 259 unchanged lines hidden (view full) --- 280 } 281 282 /* Copy passed parameters into the new method stack frame */ 283 284 while ((Index < ACPI_METHOD_NUM_ARGS) && (Index < MaxParamCount) && Params[Index]) 285 { 286 /* 287 * A valid parameter. |
288 * Store the argument in the method/walk descriptor | 288 * Store the argument in the method/walk descriptor. 289 * Do not copy the arg in order to implement call by reference |
289 */ | 290 */ |
290 Status = AcpiDsStoreObjectToLocal (AML_ARG_OP, Index, Params[Index], 291 WalkState); | 291 Status = AcpiDsMethodDataSetValue (AML_ARG_OP, Index, Params[Index], WalkState); |
292 if (ACPI_FAILURE (Status)) 293 { 294 return_ACPI_STATUS (Status); 295 } 296 297 Index++; 298 } 299 --- 252 unchanged lines hidden (view full) --- 552 case AML_LOCAL_OP: 553 554 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Uninitialized Local[%d] at node %p\n", 555 Index, Node)); 556 557 return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL); 558 559 default: | 292 if (ACPI_FAILURE (Status)) 293 { 294 return_ACPI_STATUS (Status); 295 } 296 297 Index++; 298 } 299 --- 252 unchanged lines hidden (view full) --- 552 case AML_LOCAL_OP: 553 554 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Uninitialized Local[%d] at node %p\n", 555 Index, Node)); 556 557 return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL); 558 559 default: |
560 ACPI_REPORT_ERROR (("Not Arg/Local opcode: %X\n", Opcode)); |
|
560 return_ACPI_STATUS (AE_AML_INTERNAL); 561 } 562 } 563 564 /* 565 * The Index points to an initialized and valid object. 566 * Return an additional reference to the object 567 */ --- 90 unchanged lines hidden (view full) --- 658 UINT32 Index, 659 ACPI_OPERAND_OBJECT *ObjDesc, 660 ACPI_WALK_STATE *WalkState) 661{ 662 ACPI_STATUS Status; 663 ACPI_NAMESPACE_NODE *Node; 664 ACPI_OPERAND_OBJECT *CurrentObjDesc; 665 ACPI_OPERAND_OBJECT *NewObjDesc; | 561 return_ACPI_STATUS (AE_AML_INTERNAL); 562 } 563 } 564 565 /* 566 * The Index points to an initialized and valid object. 567 * Return an additional reference to the object 568 */ --- 90 unchanged lines hidden (view full) --- 659 UINT32 Index, 660 ACPI_OPERAND_OBJECT *ObjDesc, 661 ACPI_WALK_STATE *WalkState) 662{ 663 ACPI_STATUS Status; 664 ACPI_NAMESPACE_NODE *Node; 665 ACPI_OPERAND_OBJECT *CurrentObjDesc; 666 ACPI_OPERAND_OBJECT *NewObjDesc; |
666 UINT8 ObjType; | |
667 668 669 ACPI_FUNCTION_TRACE ("DsStoreObjectToLocal"); 670 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode=%d Idx=%d Obj=%p\n", 671 Opcode, Index, ObjDesc)); 672 673 /* Parameter validation */ 674 --- 15 unchanged lines hidden (view full) --- 690 { 691 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p already installed!\n", 692 ObjDesc)); 693 return_ACPI_STATUS (Status); 694 } 695 696 /* 697 * If the reference count on the object is more than one, we must | 667 668 669 ACPI_FUNCTION_TRACE ("DsStoreObjectToLocal"); 670 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode=%d Idx=%d Obj=%p\n", 671 Opcode, Index, ObjDesc)); 672 673 /* Parameter validation */ 674 --- 15 unchanged lines hidden (view full) --- 690 { 691 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p already installed!\n", 692 ObjDesc)); 693 return_ACPI_STATUS (Status); 694 } 695 696 /* 697 * If the reference count on the object is more than one, we must |
698 * take a copy of the object before we store. | 698 * take a copy of the object before we store. A reference count 699 * of exactly 1 means that the object was just created during the 700 * evaluation of an expression, and we can safely use it since it 701 * is not used anywhere else. |
699 */ 700 NewObjDesc = ObjDesc; | 702 */ 703 NewObjDesc = ObjDesc; |
701 ObjType = ACPI_GET_OBJECT_TYPE(ObjDesc); 702 if (ObjDesc->Common.ReferenceCount > 1 && 703 ObjType != ACPI_TYPE_BUFFER && 704 ObjType != ACPI_TYPE_PACKAGE && 705 ObjType != ACPI_TYPE_REGION) | 704 if (ObjDesc->Common.ReferenceCount > 1) |
706 { 707 Status = AcpiUtCopyIobjectToIobject (ObjDesc, &NewObjDesc, WalkState); 708 if (ACPI_FAILURE (Status)) 709 { 710 return_ACPI_STATUS (Status); 711 } 712 } 713 --- 91 unchanged lines hidden --- | 705 { 706 Status = AcpiUtCopyIobjectToIobject (ObjDesc, &NewObjDesc, WalkState); 707 if (ACPI_FAILURE (Status)) 708 { 709 return_ACPI_STATUS (Status); 710 } 711 } 712 --- 91 unchanged lines hidden --- |