exresop.c (cb5629b10d64a8006622ce3a52bc887d91057d69) exresop.c (3371c19c294a4cb3649aa4e84606be8a1d999e61)
1
2/******************************************************************************
3 *
4 * Module Name: exresop - AML Interpreter operand/object resolution
5 *
6 *****************************************************************************/
7
8/*

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

207 type;
208 }
209 break;
210
211 case ACPI_DESC_TYPE_OPERAND:
212
213 /* ACPI internal object */
214
1
2/******************************************************************************
3 *
4 * Module Name: exresop - AML Interpreter operand/object resolution
5 *
6 *****************************************************************************/
7
8/*

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

207 type;
208 }
209 break;
210
211 case ACPI_DESC_TYPE_OPERAND:
212
213 /* ACPI internal object */
214
215 object_type = ACPI_GET_OBJECT_TYPE(obj_desc);
215 object_type = obj_desc->common.type;
216
217 /* Check for bad acpi_object_type */
218
219 if (!acpi_ut_valid_object_type(object_type)) {
220 ACPI_ERROR((AE_INFO,
221 "Bad operand object type [%X]",
222 object_type));
223

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

282 * Handle cases where the object does not need to be
283 * resolved to a value
284 */
285 switch (this_arg_type) {
286 case ARGI_REF_OR_STRING: /* Can be a String or Reference */
287
288 if ((ACPI_GET_DESCRIPTOR_TYPE(obj_desc) ==
289 ACPI_DESC_TYPE_OPERAND)
216
217 /* Check for bad acpi_object_type */
218
219 if (!acpi_ut_valid_object_type(object_type)) {
220 ACPI_ERROR((AE_INFO,
221 "Bad operand object type [%X]",
222 object_type));
223

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

282 * Handle cases where the object does not need to be
283 * resolved to a value
284 */
285 switch (this_arg_type) {
286 case ARGI_REF_OR_STRING: /* Can be a String or Reference */
287
288 if ((ACPI_GET_DESCRIPTOR_TYPE(obj_desc) ==
289 ACPI_DESC_TYPE_OPERAND)
290 && (ACPI_GET_OBJECT_TYPE(obj_desc) ==
291 ACPI_TYPE_STRING)) {
290 && (obj_desc->common.type == ACPI_TYPE_STRING)) {
292 /*
293 * String found - the string references a named object and
294 * must be resolved to a node
295 */
296 goto next_operand;
297 }
298
299 /*

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

331
332 /*
333 * We don't want to resolve index_op reference objects during
334 * a store because this would be an implicit de_ref_of operation.
335 * Instead, we just want to store the reference object.
336 * -- All others must be resolved below.
337 */
338 if ((opcode == AML_STORE_OP) &&
291 /*
292 * String found - the string references a named object and
293 * must be resolved to a node
294 */
295 goto next_operand;
296 }
297
298 /*

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

330
331 /*
332 * We don't want to resolve index_op reference objects during
333 * a store because this would be an implicit de_ref_of operation.
334 * Instead, we just want to store the reference object.
335 * -- All others must be resolved below.
336 */
337 if ((opcode == AML_STORE_OP) &&
339 (ACPI_GET_OBJECT_TYPE(*stack_ptr) ==
338 ((*stack_ptr)->common.type ==
340 ACPI_TYPE_LOCAL_REFERENCE)
341 && ((*stack_ptr)->reference.class == ACPI_REFCLASS_INDEX)) {
342 goto next_operand;
343 }
344 break;
345
346 default:
347 /* All cases covered above */

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

485 acpi_ut_remove_reference(obj_desc);
486 }
487 goto next_operand;
488
489 case ARGI_COMPUTEDATA:
490
491 /* Need an operand of type INTEGER, STRING or BUFFER */
492
339 ACPI_TYPE_LOCAL_REFERENCE)
340 && ((*stack_ptr)->reference.class == ACPI_REFCLASS_INDEX)) {
341 goto next_operand;
342 }
343 break;
344
345 default:
346 /* All cases covered above */

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

484 acpi_ut_remove_reference(obj_desc);
485 }
486 goto next_operand;
487
488 case ARGI_COMPUTEDATA:
489
490 /* Need an operand of type INTEGER, STRING or BUFFER */
491
493 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
492 switch (obj_desc->common.type) {
494 case ACPI_TYPE_INTEGER:
495 case ACPI_TYPE_STRING:
496 case ACPI_TYPE_BUFFER:
497
498 /* Valid operand */
499 break;
500
501 default:

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

507 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
508 }
509 goto next_operand;
510
511 case ARGI_BUFFER_OR_STRING:
512
513 /* Need an operand of type STRING or BUFFER */
514
493 case ACPI_TYPE_INTEGER:
494 case ACPI_TYPE_STRING:
495 case ACPI_TYPE_BUFFER:
496
497 /* Valid operand */
498 break;
499
500 default:

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

506 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
507 }
508 goto next_operand;
509
510 case ARGI_BUFFER_OR_STRING:
511
512 /* Need an operand of type STRING or BUFFER */
513
515 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
514 switch (obj_desc->common.type) {
516 case ACPI_TYPE_STRING:
517 case ACPI_TYPE_BUFFER:
518
519 /* Valid operand */
520 break;
521
522 case ACPI_TYPE_INTEGER:
523

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

548 case ARGI_DATAOBJECT:
549 /*
550 * ARGI_DATAOBJECT is only used by the size_of operator.
551 * Need a buffer, string, package, or ref_of reference.
552 *
553 * The only reference allowed here is a direct reference to
554 * a namespace node.
555 */
515 case ACPI_TYPE_STRING:
516 case ACPI_TYPE_BUFFER:
517
518 /* Valid operand */
519 break;
520
521 case ACPI_TYPE_INTEGER:
522

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

547 case ARGI_DATAOBJECT:
548 /*
549 * ARGI_DATAOBJECT is only used by the size_of operator.
550 * Need a buffer, string, package, or ref_of reference.
551 *
552 * The only reference allowed here is a direct reference to
553 * a namespace node.
554 */
556 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
555 switch (obj_desc->common.type) {
557 case ACPI_TYPE_PACKAGE:
558 case ACPI_TYPE_STRING:
559 case ACPI_TYPE_BUFFER:
560 case ACPI_TYPE_LOCAL_REFERENCE:
561
562 /* Valid operand */
563 break;
564

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

571 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
572 }
573 goto next_operand;
574
575 case ARGI_COMPLEXOBJ:
576
577 /* Need a buffer or package or (ACPI 2.0) String */
578
556 case ACPI_TYPE_PACKAGE:
557 case ACPI_TYPE_STRING:
558 case ACPI_TYPE_BUFFER:
559 case ACPI_TYPE_LOCAL_REFERENCE:
560
561 /* Valid operand */
562 break;
563

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

570 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
571 }
572 goto next_operand;
573
574 case ARGI_COMPLEXOBJ:
575
576 /* Need a buffer or package or (ACPI 2.0) String */
577
579 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
578 switch (obj_desc->common.type) {
580 case ACPI_TYPE_PACKAGE:
581 case ACPI_TYPE_STRING:
582 case ACPI_TYPE_BUFFER:
583
584 /* Valid operand */
585 break;
586
587 default:

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

593 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
594 }
595 goto next_operand;
596
597 case ARGI_REGION_OR_BUFFER: /* Used by Load() only */
598
599 /* Need an operand of type REGION or a BUFFER (which could be a resolved region field) */
600
579 case ACPI_TYPE_PACKAGE:
580 case ACPI_TYPE_STRING:
581 case ACPI_TYPE_BUFFER:
582
583 /* Valid operand */
584 break;
585
586 default:

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

592 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
593 }
594 goto next_operand;
595
596 case ARGI_REGION_OR_BUFFER: /* Used by Load() only */
597
598 /* Need an operand of type REGION or a BUFFER (which could be a resolved region field) */
599
601 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
600 switch (obj_desc->common.type) {
602 case ACPI_TYPE_BUFFER:
603 case ACPI_TYPE_REGION:
604
605 /* Valid operand */
606 break;
607
608 default:
609 ACPI_ERROR((AE_INFO,

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

614 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
615 }
616 goto next_operand;
617
618 case ARGI_DATAREFOBJ:
619
620 /* Used by the Store() operator only */
621
601 case ACPI_TYPE_BUFFER:
602 case ACPI_TYPE_REGION:
603
604 /* Valid operand */
605 break;
606
607 default:
608 ACPI_ERROR((AE_INFO,

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

613 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
614 }
615 goto next_operand;
616
617 case ARGI_DATAREFOBJ:
618
619 /* Used by the Store() operator only */
620
622 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
621 switch (obj_desc->common.type) {
623 case ACPI_TYPE_INTEGER:
624 case ACPI_TYPE_PACKAGE:
625 case ACPI_TYPE_STRING:
626 case ACPI_TYPE_BUFFER:
627 case ACPI_TYPE_BUFFER_FIELD:
628 case ACPI_TYPE_LOCAL_REFERENCE:
629 case ACPI_TYPE_LOCAL_REGION_FIELD:
630 case ACPI_TYPE_LOCAL_BANK_FIELD:

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

672 return_ACPI_STATUS(AE_BAD_PARAMETER);
673 }
674
675 /*
676 * Make sure that the original object was resolved to the
677 * required object type (Simple cases only).
678 */
679 status = acpi_ex_check_object_type(type_needed,
622 case ACPI_TYPE_INTEGER:
623 case ACPI_TYPE_PACKAGE:
624 case ACPI_TYPE_STRING:
625 case ACPI_TYPE_BUFFER:
626 case ACPI_TYPE_BUFFER_FIELD:
627 case ACPI_TYPE_LOCAL_REFERENCE:
628 case ACPI_TYPE_LOCAL_REGION_FIELD:
629 case ACPI_TYPE_LOCAL_BANK_FIELD:

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

671 return_ACPI_STATUS(AE_BAD_PARAMETER);
672 }
673
674 /*
675 * Make sure that the original object was resolved to the
676 * required object type (Simple cases only).
677 */
678 status = acpi_ex_check_object_type(type_needed,
680 ACPI_GET_OBJECT_TYPE
681 (*stack_ptr), *stack_ptr);
679 (*stack_ptr)->common.type,
680 *stack_ptr);
682 if (ACPI_FAILURE(status)) {
683 return_ACPI_STATUS(status);
684 }
685
686 next_operand:
687 /*
688 * If more operands needed, decrement stack_ptr to point
689 * to next operand on stack

--- 12 unchanged lines hidden ---
681 if (ACPI_FAILURE(status)) {
682 return_ACPI_STATUS(status);
683 }
684
685 next_operand:
686 /*
687 * If more operands needed, decrement stack_ptr to point
688 * to next operand on stack

--- 12 unchanged lines hidden ---