Deleted Added
full compact
dsmthdat.c (151600) dsmthdat.c (151937)
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: 80 $
4 * $Revision: 1.85 $
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 - 2004, Intel Corp.
12 * Some or all of this work - Copyright (c) 1999 - 2005, 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.

--- 100 unchanged lines hidden (view full) ---

121#include <contrib/dev/acpica/amlcode.h>
122#include <contrib/dev/acpica/acnamesp.h>
123#include <contrib/dev/acpica/acinterp.h>
124
125
126#define _COMPONENT ACPI_DISPATCHER
127 ACPI_MODULE_NAME ("dsmthdat")
128
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.

--- 100 unchanged lines hidden (view full) ---

121#include <contrib/dev/acpica/amlcode.h>
122#include <contrib/dev/acpica/acnamesp.h>
123#include <contrib/dev/acpica/acinterp.h>
124
125
126#define _COMPONENT ACPI_DISPATCHER
127 ACPI_MODULE_NAME ("dsmthdat")
128
129/* Local prototypes */
129
130
131static void
132AcpiDsMethodDataDeleteValue (
133 UINT16 Opcode,
134 UINT32 Index,
135 ACPI_WALK_STATE *WalkState);
136
137static ACPI_STATUS
138AcpiDsMethodDataSetValue (
139 UINT16 Opcode,
140 UINT32 Index,
141 ACPI_OPERAND_OBJECT *Object,
142 ACPI_WALK_STATE *WalkState);
143
144#ifdef ACPI_OBSOLETE_FUNCTIONS
145ACPI_OBJECT_TYPE
146AcpiDsMethodDataGetType (
147 UINT16 Opcode,
148 UINT32 Index,
149 ACPI_WALK_STATE *WalkState);
150#endif
151
152
130/*******************************************************************************
131 *
132 * FUNCTION: AcpiDsMethodDataInit
133 *
134 * PARAMETERS: WalkState - Current walk state object
135 *
136 * RETURN: Status
137 *
138 * DESCRIPTION: Initialize the data structures that hold the method's arguments
153/*******************************************************************************
154 *
155 * FUNCTION: AcpiDsMethodDataInit
156 *
157 * PARAMETERS: WalkState - Current walk state object
158 *
159 * RETURN: Status
160 *
161 * DESCRIPTION: Initialize the data structures that hold the method's arguments
139 * and locals. The data struct is an array of NTEs for each.
140 * This allows RefOf and DeRefOf to work properly for these
162 * and locals. The data struct is an array of namespace nodes for
163 * each - this allows RefOf and DeRefOf to work properly for these
141 * special data types.
142 *
143 * NOTES: WalkState fields are initialized to zero by the
144 * ACPI_MEM_CALLOCATE().
145 *
146 * A pseudo-Namespace Node is assigned to each argument and local
147 * so that RefOf() can return a pointer to the Node.
148 *

--- 13 unchanged lines hidden (view full) ---

162
163 for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
164 {
165 ACPI_MOVE_32_TO_32 (&WalkState->Arguments[i].Name,
166 NAMEOF_ARG_NTE);
167 WalkState->Arguments[i].Name.Integer |= (i << 24);
168 WalkState->Arguments[i].Descriptor = ACPI_DESC_TYPE_NAMED;
169 WalkState->Arguments[i].Type = ACPI_TYPE_ANY;
164 * special data types.
165 *
166 * NOTES: WalkState fields are initialized to zero by the
167 * ACPI_MEM_CALLOCATE().
168 *
169 * A pseudo-Namespace Node is assigned to each argument and local
170 * so that RefOf() can return a pointer to the Node.
171 *

--- 13 unchanged lines hidden (view full) ---

185
186 for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
187 {
188 ACPI_MOVE_32_TO_32 (&WalkState->Arguments[i].Name,
189 NAMEOF_ARG_NTE);
190 WalkState->Arguments[i].Name.Integer |= (i << 24);
191 WalkState->Arguments[i].Descriptor = ACPI_DESC_TYPE_NAMED;
192 WalkState->Arguments[i].Type = ACPI_TYPE_ANY;
170 WalkState->Arguments[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_ARG;
193 WalkState->Arguments[i].Flags = ANOBJ_END_OF_PEER_LIST |
194 ANOBJ_METHOD_ARG;
171 }
172
173 /* Init the method locals */
174
175 for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
176 {
177 ACPI_MOVE_32_TO_32 (&WalkState->LocalVariables[i].Name,
178 NAMEOF_LOCAL_NTE);
179
180 WalkState->LocalVariables[i].Name.Integer |= (i << 24);
181 WalkState->LocalVariables[i].Descriptor = ACPI_DESC_TYPE_NAMED;
182 WalkState->LocalVariables[i].Type = ACPI_TYPE_ANY;
195 }
196
197 /* Init the method locals */
198
199 for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
200 {
201 ACPI_MOVE_32_TO_32 (&WalkState->LocalVariables[i].Name,
202 NAMEOF_LOCAL_NTE);
203
204 WalkState->LocalVariables[i].Name.Integer |= (i << 24);
205 WalkState->LocalVariables[i].Descriptor = ACPI_DESC_TYPE_NAMED;
206 WalkState->LocalVariables[i].Type = ACPI_TYPE_ANY;
183 WalkState->LocalVariables[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_LOCAL;
207 WalkState->LocalVariables[i].Flags = ANOBJ_END_OF_PEER_LIST |
208 ANOBJ_METHOD_LOCAL;
184 }
185
186 return_VOID;
187}
188
189
190/*******************************************************************************
191 *

--- 82 unchanged lines hidden (view full) ---

274
275
276 if (!Params)
277 {
278 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "No param list passed to method\n"));
279 return_ACPI_STATUS (AE_OK);
280 }
281
209 }
210
211 return_VOID;
212}
213
214
215/*******************************************************************************
216 *

--- 82 unchanged lines hidden (view full) ---

299
300
301 if (!Params)
302 {
303 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "No param list passed to method\n"));
304 return_ACPI_STATUS (AE_OK);
305 }
306
282 /* Copy passed parameters into the new method stack frame */
307 /* Copy passed parameters into the new method stack frame */
283
308
284 while ((Index < ACPI_METHOD_NUM_ARGS) && (Index < MaxParamCount) && Params[Index])
309 while ((Index < ACPI_METHOD_NUM_ARGS) &&
310 (Index < MaxParamCount) &&
311 Params[Index])
285 {
286 /*
287 * A valid parameter.
288 * Store the argument in the method/walk descriptor.
289 * Do not copy the arg in order to implement call by reference
290 */
312 {
313 /*
314 * A valid parameter.
315 * Store the argument in the method/walk descriptor.
316 * Do not copy the arg in order to implement call by reference
317 */
291 Status = AcpiDsMethodDataSetValue (AML_ARG_OP, Index, Params[Index], WalkState);
318 Status = AcpiDsMethodDataSetValue (AML_ARG_OP, Index,
319 Params[Index], WalkState);
292 if (ACPI_FAILURE (Status))
293 {
294 return_ACPI_STATUS (Status);
295 }
296
297 Index++;
298 }
299
300 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%d args passed to method\n", Index));
301 return_ACPI_STATUS (AE_OK);
302}
303
304
305/*******************************************************************************
306 *
307 * FUNCTION: AcpiDsMethodDataGetNode
308 *
309 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
320 if (ACPI_FAILURE (Status))
321 {
322 return_ACPI_STATUS (Status);
323 }
324
325 Index++;
326 }
327
328 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%d args passed to method\n", Index));
329 return_ACPI_STATUS (AE_OK);
330}
331
332
333/*******************************************************************************
334 *
335 * FUNCTION: AcpiDsMethodDataGetNode
336 *
337 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
310 * Index - Which localVar or argument whose type
311 * to get
338 * Index - Which Local or Arg whose type to get
312 * WalkState - Current walk state object
339 * WalkState - Current walk state object
340 * Node - Where the node is returned.
313 *
341 *
314 * RETURN: Get the Node associated with a local or arg.
342 * RETURN: Status and node
315 *
343 *
344 * DESCRIPTION: Get the Node associated with a local or arg.
345 *
316 ******************************************************************************/
317
318ACPI_STATUS
319AcpiDsMethodDataGetNode (
320 UINT16 Opcode,
321 UINT32 Index,
322 ACPI_WALK_STATE *WalkState,
323 ACPI_NAMESPACE_NODE **Node)

--- 5 unchanged lines hidden (view full) ---

329 * Method Locals and Arguments are supported
330 */
331 switch (Opcode)
332 {
333 case AML_LOCAL_OP:
334
335 if (Index > ACPI_METHOD_MAX_LOCAL)
336 {
346 ******************************************************************************/
347
348ACPI_STATUS
349AcpiDsMethodDataGetNode (
350 UINT16 Opcode,
351 UINT32 Index,
352 ACPI_WALK_STATE *WalkState,
353 ACPI_NAMESPACE_NODE **Node)

--- 5 unchanged lines hidden (view full) ---

359 * Method Locals and Arguments are supported
360 */
361 switch (Opcode)
362 {
363 case AML_LOCAL_OP:
364
365 if (Index > ACPI_METHOD_MAX_LOCAL)
366 {
337 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Local index %d is invalid (max %d)\n",
367 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
368 "Local index %d is invalid (max %d)\n",
338 Index, ACPI_METHOD_MAX_LOCAL));
339 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
340 }
341
342 /* Return a pointer to the pseudo-node */
343
344 *Node = &WalkState->LocalVariables[Index];
345 break;
346
347 case AML_ARG_OP:
348
349 if (Index > ACPI_METHOD_MAX_ARG)
350 {
369 Index, ACPI_METHOD_MAX_LOCAL));
370 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
371 }
372
373 /* Return a pointer to the pseudo-node */
374
375 *Node = &WalkState->LocalVariables[Index];
376 break;
377
378 case AML_ARG_OP:
379
380 if (Index > ACPI_METHOD_MAX_ARG)
381 {
351 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Arg index %d is invalid (max %d)\n",
382 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
383 "Arg index %d is invalid (max %d)\n",
352 Index, ACPI_METHOD_MAX_ARG));
353 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
354 }
355
356 /* Return a pointer to the pseudo-node */
357
358 *Node = &WalkState->Arguments[Index];
359 break;

--- 7 unchanged lines hidden (view full) ---

367}
368
369
370/*******************************************************************************
371 *
372 * FUNCTION: AcpiDsMethodDataSetValue
373 *
374 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
384 Index, ACPI_METHOD_MAX_ARG));
385 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
386 }
387
388 /* Return a pointer to the pseudo-node */
389
390 *Node = &WalkState->Arguments[Index];
391 break;

--- 7 unchanged lines hidden (view full) ---

399}
400
401
402/*******************************************************************************
403 *
404 * FUNCTION: AcpiDsMethodDataSetValue
405 *
406 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
375 * Index - Which localVar or argument to get
407 * Index - Which Local or Arg to get
376 * Object - Object to be inserted into the stack entry
377 * WalkState - Current walk state object
378 *
379 * RETURN: Status
380 *
381 * DESCRIPTION: Insert an object onto the method stack at entry Opcode:Index.
382 * Note: There is no "implicit conversion" for locals.
383 *
384 ******************************************************************************/
385
408 * Object - Object to be inserted into the stack entry
409 * WalkState - Current walk state object
410 *
411 * RETURN: Status
412 *
413 * DESCRIPTION: Insert an object onto the method stack at entry Opcode:Index.
414 * Note: There is no "implicit conversion" for locals.
415 *
416 ******************************************************************************/
417
386ACPI_STATUS
418static ACPI_STATUS
387AcpiDsMethodDataSetValue (
388 UINT16 Opcode,
389 UINT32 Index,
390 ACPI_OPERAND_OBJECT *Object,
391 ACPI_WALK_STATE *WalkState)
392{
393 ACPI_STATUS Status;
394 ACPI_NAMESPACE_NODE *Node;

--- 27 unchanged lines hidden (view full) ---

422
423 Node->Object = Object;
424 return_ACPI_STATUS (Status);
425}
426
427
428/*******************************************************************************
429 *
419AcpiDsMethodDataSetValue (
420 UINT16 Opcode,
421 UINT32 Index,
422 ACPI_OPERAND_OBJECT *Object,
423 ACPI_WALK_STATE *WalkState)
424{
425 ACPI_STATUS Status;
426 ACPI_NAMESPACE_NODE *Node;

--- 27 unchanged lines hidden (view full) ---

454
455 Node->Object = Object;
456 return_ACPI_STATUS (Status);
457}
458
459
460/*******************************************************************************
461 *
430 * FUNCTION: AcpiDsMethodDataGetType
431 *
432 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
433 * Index - Which localVar or argument whose type
434 * to get
435 * WalkState - Current walk state object
436 *
437 * RETURN: Data type of current value of the selected Arg or Local
438 *
439 ******************************************************************************/
440
441ACPI_OBJECT_TYPE
442AcpiDsMethodDataGetType (
443 UINT16 Opcode,
444 UINT32 Index,
445 ACPI_WALK_STATE *WalkState)
446{
447 ACPI_STATUS Status;
448 ACPI_NAMESPACE_NODE *Node;
449 ACPI_OPERAND_OBJECT *Object;
450
451
452 ACPI_FUNCTION_TRACE ("DsMethodDataGetType");
453
454
455 /* Get the namespace node for the arg/local */
456
457 Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
458 if (ACPI_FAILURE (Status))
459 {
460 return_VALUE ((ACPI_TYPE_NOT_FOUND));
461 }
462
463 /* Get the object */
464
465 Object = AcpiNsGetAttachedObject (Node);
466 if (!Object)
467 {
468 /* Uninitialized local/arg, return TYPE_ANY */
469
470 return_VALUE (ACPI_TYPE_ANY);
471 }
472
473 /* Get the object type */
474
475 return_VALUE (ACPI_GET_OBJECT_TYPE (Object));
476}
477
478
479/*******************************************************************************
480 *
481 * FUNCTION: AcpiDsMethodDataGetValue
482 *
483 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
484 * Index - Which localVar or argument to get
485 * WalkState - Current walk state object
462 * FUNCTION: AcpiDsMethodDataGetValue
463 *
464 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
465 * Index - Which localVar or argument to get
466 * WalkState - Current walk state object
486 * *DestDesc - Ptr to Descriptor into which selected Arg
487 * or Local value should be copied
467 * DestDesc - Where Arg or Local value is returned
488 *
489 * RETURN: Status
490 *
468 *
469 * RETURN: Status
470 *
491 * DESCRIPTION: Retrieve value of selected Arg or Local from the method frame
492 * at the current top of the method stack.
471 * DESCRIPTION: Retrieve value of selected Arg or Local for this method
493 * Used only in AcpiExResolveToValue().
494 *
495 ******************************************************************************/
496
497ACPI_STATUS
498AcpiDsMethodDataGetValue (
499 UINT16 Opcode,
500 UINT32 Index,

--- 55 unchanged lines hidden (view full) ---

556 }
557
558 /* Otherwise, return the error */
559
560 else switch (Opcode)
561 {
562 case AML_ARG_OP:
563
472 * Used only in AcpiExResolveToValue().
473 *
474 ******************************************************************************/
475
476ACPI_STATUS
477AcpiDsMethodDataGetValue (
478 UINT16 Opcode,
479 UINT32 Index,

--- 55 unchanged lines hidden (view full) ---

535 }
536
537 /* Otherwise, return the error */
538
539 else switch (Opcode)
540 {
541 case AML_ARG_OP:
542
564 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Uninitialized Arg[%d] at node %p\n",
543 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
544 "Uninitialized Arg[%d] at node %p\n",
565 Index, Node));
566
567 return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
568
569 case AML_LOCAL_OP:
570
545 Index, Node));
546
547 return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
548
549 case AML_LOCAL_OP:
550
571 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Uninitialized Local[%d] at node %p\n",
551 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
552 "Uninitialized Local[%d] at node %p\n",
572 Index, Node));
573
574 return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
575
576 default:
577 ACPI_REPORT_ERROR (("Not Arg/Local opcode: %X\n", Opcode));
578 return_ACPI_STATUS (AE_AML_INTERNAL);
579 }

--- 15 unchanged lines hidden (view full) ---

595 * FUNCTION: AcpiDsMethodDataDeleteValue
596 *
597 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
598 * Index - Which localVar or argument to delete
599 * WalkState - Current walk state object
600 *
601 * RETURN: None
602 *
553 Index, Node));
554
555 return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
556
557 default:
558 ACPI_REPORT_ERROR (("Not Arg/Local opcode: %X\n", Opcode));
559 return_ACPI_STATUS (AE_AML_INTERNAL);
560 }

--- 15 unchanged lines hidden (view full) ---

576 * FUNCTION: AcpiDsMethodDataDeleteValue
577 *
578 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
579 * Index - Which localVar or argument to delete
580 * WalkState - Current walk state object
581 *
582 * RETURN: None
583 *
603 * DESCRIPTION: Delete the entry at Opcode:Index on the method stack. Inserts
584 * DESCRIPTION: Delete the entry at Opcode:Index. Inserts
604 * a null into the stack slot after the object is deleted.
605 *
606 ******************************************************************************/
607
585 * a null into the stack slot after the object is deleted.
586 *
587 ******************************************************************************/
588
608void
589static void
609AcpiDsMethodDataDeleteValue (
610 UINT16 Opcode,
611 UINT32 Index,
612 ACPI_WALK_STATE *WalkState)
613{
614 ACPI_STATUS Status;
615 ACPI_NAMESPACE_NODE *Node;
616 ACPI_OPERAND_OBJECT *Object;

--- 36 unchanged lines hidden (view full) ---

653}
654
655
656/*******************************************************************************
657 *
658 * FUNCTION: AcpiDsStoreObjectToLocal
659 *
660 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
590AcpiDsMethodDataDeleteValue (
591 UINT16 Opcode,
592 UINT32 Index,
593 ACPI_WALK_STATE *WalkState)
594{
595 ACPI_STATUS Status;
596 ACPI_NAMESPACE_NODE *Node;
597 ACPI_OPERAND_OBJECT *Object;

--- 36 unchanged lines hidden (view full) ---

634}
635
636
637/*******************************************************************************
638 *
639 * FUNCTION: AcpiDsStoreObjectToLocal
640 *
641 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
661 * Index - Which localVar or argument to set
642 * Index - Which Local or Arg to set
662 * ObjDesc - Value to be stored
663 * WalkState - Current walk state
664 *
665 * RETURN: Status
666 *
667 * DESCRIPTION: Store a value in an Arg or Local. The ObjDesc is installed
668 * as the new value for the Arg or Local and the reference count
669 * for ObjDesc is incremented.

--- 79 unchanged lines hidden (view full) ---

749 * the reference to local4
750 * Store (1, DeRefof (Local0)) - Causes indirect store to local4
751 *
752 * Weird, but true.
753 */
754 if (Opcode == AML_ARG_OP)
755 {
756 /*
643 * ObjDesc - Value to be stored
644 * WalkState - Current walk state
645 *
646 * RETURN: Status
647 *
648 * DESCRIPTION: Store a value in an Arg or Local. The ObjDesc is installed
649 * as the new value for the Arg or Local and the reference count
650 * for ObjDesc is incremented.

--- 79 unchanged lines hidden (view full) ---

730 * the reference to local4
731 * Store (1, DeRefof (Local0)) - Causes indirect store to local4
732 *
733 * Weird, but true.
734 */
735 if (Opcode == AML_ARG_OP)
736 {
737 /*
757 * Make sure that the object is the correct type. This may be overkill, but
758 * it is here because references were NS nodes in the past. Now they are
759 * operand objects of type Reference.
738 * If we have a valid reference object that came from RefOf(),
739 * do the indirect store
760 */
740 */
761 if (ACPI_GET_DESCRIPTOR_TYPE (CurrentObjDesc) != ACPI_DESC_TYPE_OPERAND)
762 {
763 ACPI_REPORT_ERROR (("Invalid descriptor type while storing to method arg: [%s]\n",
764 AcpiUtGetDescriptorName (CurrentObjDesc)));
765 return_ACPI_STATUS (AE_AML_INTERNAL);
766 }
767
768 /*
769 * If we have a valid reference object that came from RefOf(), do the
770 * indirect store
771 */
772 if ((CurrentObjDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
741 if ((ACPI_GET_DESCRIPTOR_TYPE (CurrentObjDesc) == ACPI_DESC_TYPE_OPERAND) &&
742 (CurrentObjDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
773 (CurrentObjDesc->Reference.Opcode == AML_REF_OF_OP))
774 {
775 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
776 "Arg (%p) is an ObjRef(Node), storing in node %p\n",
777 NewObjDesc, CurrentObjDesc));
778
779 /*
780 * Store this object to the Node (perform the indirect store)

--- 34 unchanged lines hidden (view full) ---

815 {
816 AcpiUtRemoveReference (NewObjDesc);
817 }
818
819 return_ACPI_STATUS (Status);
820}
821
822
743 (CurrentObjDesc->Reference.Opcode == AML_REF_OF_OP))
744 {
745 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
746 "Arg (%p) is an ObjRef(Node), storing in node %p\n",
747 NewObjDesc, CurrentObjDesc));
748
749 /*
750 * Store this object to the Node (perform the indirect store)

--- 34 unchanged lines hidden (view full) ---

785 {
786 AcpiUtRemoveReference (NewObjDesc);
787 }
788
789 return_ACPI_STATUS (Status);
790}
791
792
793#ifdef ACPI_OBSOLETE_FUNCTIONS
794/*******************************************************************************
795 *
796 * FUNCTION: AcpiDsMethodDataGetType
797 *
798 * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
799 * Index - Which Local or Arg whose type to get
800 * WalkState - Current walk state object
801 *
802 * RETURN: Data type of current value of the selected Arg or Local
803 *
804 * DESCRIPTION: Get the type of the object stored in the Local or Arg
805 *
806 ******************************************************************************/
807
808ACPI_OBJECT_TYPE
809AcpiDsMethodDataGetType (
810 UINT16 Opcode,
811 UINT32 Index,
812 ACPI_WALK_STATE *WalkState)
813{
814 ACPI_STATUS Status;
815 ACPI_NAMESPACE_NODE *Node;
816 ACPI_OPERAND_OBJECT *Object;
817
818
819 ACPI_FUNCTION_TRACE ("DsMethodDataGetType");
820
821
822 /* Get the namespace node for the arg/local */
823
824 Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
825 if (ACPI_FAILURE (Status))
826 {
827 return_VALUE ((ACPI_TYPE_NOT_FOUND));
828 }
829
830 /* Get the object */
831
832 Object = AcpiNsGetAttachedObject (Node);
833 if (!Object)
834 {
835 /* Uninitialized local/arg, return TYPE_ANY */
836
837 return_VALUE (ACPI_TYPE_ANY);
838 }
839
840 /* Get the object type */
841
842 return_VALUE (ACPI_GET_OBJECT_TYPE (Object));
843}
844#endif
845
846