Deleted Added
full compact
exoparg1.c (250838) exoparg1.c (253690)
1/******************************************************************************
2 *
3 * Module Name: exoparg1 - AML execution - opcodes with 1 argument
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2013, Intel Corp.

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

1004 break;
1005
1006 case ACPI_TYPE_PACKAGE:
1007 /*
1008 * Return the referenced element of the package. We must
1009 * add another reference to the referenced object, however.
1010 */
1011 ReturnDesc = *(Operand[0]->Reference.Where);
1/******************************************************************************
2 *
3 * Module Name: exoparg1 - AML execution - opcodes with 1 argument
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2013, Intel Corp.

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

1004 break;
1005
1006 case ACPI_TYPE_PACKAGE:
1007 /*
1008 * Return the referenced element of the package. We must
1009 * add another reference to the referenced object, however.
1010 */
1011 ReturnDesc = *(Operand[0]->Reference.Where);
1012 if (ReturnDesc)
1012 if (!ReturnDesc)
1013 {
1013 {
1014 AcpiUtAddReference (ReturnDesc);
1014 /*
1015 * Element is NULL, do not allow the dereference.
1016 * This provides compatibility with other ACPI
1017 * implementations.
1018 */
1019 return_ACPI_STATUS (AE_AML_UNINITIALIZED_ELEMENT);
1015 }
1020 }
1021
1022 AcpiUtAddReference (ReturnDesc);
1016 break;
1017
1018 default:
1019
1020 ACPI_ERROR ((AE_INFO,
1021 "Unknown Index TargetType 0x%X in reference object %p",
1022 Operand[0]->Reference.TargetType, Operand[0]));
1023 Status = AE_AML_OPERAND_TYPE;
1024 goto Cleanup;
1025 }
1026 break;
1027
1028 case ACPI_REFCLASS_REFOF:
1029
1030 ReturnDesc = Operand[0]->Reference.Object;
1031
1032 if (ACPI_GET_DESCRIPTOR_TYPE (ReturnDesc) ==
1023 break;
1024
1025 default:
1026
1027 ACPI_ERROR ((AE_INFO,
1028 "Unknown Index TargetType 0x%X in reference object %p",
1029 Operand[0]->Reference.TargetType, Operand[0]));
1030 Status = AE_AML_OPERAND_TYPE;
1031 goto Cleanup;
1032 }
1033 break;
1034
1035 case ACPI_REFCLASS_REFOF:
1036
1037 ReturnDesc = Operand[0]->Reference.Object;
1038
1039 if (ACPI_GET_DESCRIPTOR_TYPE (ReturnDesc) ==
1033 ACPI_DESC_TYPE_NAMED)
1040 ACPI_DESC_TYPE_NAMED)
1034 {
1035 ReturnDesc = AcpiNsGetAttachedObject (
1041 {
1042 ReturnDesc = AcpiNsGetAttachedObject (
1036 (ACPI_NAMESPACE_NODE *) ReturnDesc);
1037 }
1043 (ACPI_NAMESPACE_NODE *) ReturnDesc);
1044 if (!ReturnDesc)
1045 {
1046 break;
1047 }
1038
1048
1039 /* Add another reference to the object! */
1049 /*
1050 * June 2013:
1051 * BufferFields/FieldUnits require additional resolution
1052 */
1053 switch (ReturnDesc->Common.Type)
1054 {
1055 case ACPI_TYPE_BUFFER_FIELD:
1056 case ACPI_TYPE_LOCAL_REGION_FIELD:
1057 case ACPI_TYPE_LOCAL_BANK_FIELD:
1058 case ACPI_TYPE_LOCAL_INDEX_FIELD:
1040
1059
1041 AcpiUtAddReference (ReturnDesc);
1060 Status = AcpiExReadDataFromField (WalkState,
1061 ReturnDesc, &TempDesc);
1062 if (ACPI_FAILURE (Status))
1063 {
1064 goto Cleanup;
1065 }
1066
1067 ReturnDesc = TempDesc;
1068 break;
1069
1070 default:
1071
1072 /* Add another reference to the object */
1073
1074 AcpiUtAddReference (ReturnDesc);
1075 break;
1076 }
1077 }
1042 break;
1043
1044 default:
1045
1046 ACPI_ERROR ((AE_INFO,
1047 "Unknown class in reference(%p) - 0x%2.2X",
1048 Operand[0], Operand[0]->Reference.Class));
1049

--- 33 unchanged lines hidden ---
1078 break;
1079
1080 default:
1081
1082 ACPI_ERROR ((AE_INFO,
1083 "Unknown class in reference(%p) - 0x%2.2X",
1084 Operand[0], Operand[0]->Reference.Class));
1085

--- 33 unchanged lines hidden ---