exoparg1.c (193529) | exoparg1.c (199337) |
---|---|
1 2/****************************************************************************** 3 * 4 * Module Name: exoparg1 - AML execution - opcodes with 1 argument 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** --- 169 unchanged lines hidden (view full) --- 178 /* Examine the AML opcode */ 179 180 switch (WalkState->Opcode) 181 { 182 case AML_TIMER_OP: /* Timer () */ 183 184 /* Create a return object of type Integer */ 185 | 1 2/****************************************************************************** 3 * 4 * Module Name: exoparg1 - AML execution - opcodes with 1 argument 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** --- 169 unchanged lines hidden (view full) --- 178 /* Examine the AML opcode */ 179 180 switch (WalkState->Opcode) 181 { 182 case AML_TIMER_OP: /* Timer () */ 183 184 /* Create a return object of type Integer */ 185 |
186 ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); | 186 ReturnDesc = AcpiUtCreateIntegerObject (AcpiOsGetTimer ()); |
187 if (!ReturnDesc) 188 { 189 Status = AE_NO_MEMORY; 190 goto Cleanup; 191 } | 187 if (!ReturnDesc) 188 { 189 Status = AE_NO_MEMORY; 190 goto Cleanup; 191 } |
192 ReturnDesc->Integer.Value = AcpiOsGetTimer (); | |
193 break; 194 195 default: /* Unknown opcode */ 196 197 ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X", 198 WalkState->Opcode)); 199 Status = AE_AML_BAD_OPCODE; 200 break; --- 527 unchanged lines hidden (view full) --- 728 729 730 /* Examine the AML opcode */ 731 732 switch (WalkState->Opcode) 733 { 734 case AML_LNOT_OP: /* LNot (Operand) */ 735 | 192 break; 193 194 default: /* Unknown opcode */ 195 196 ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X", 197 WalkState->Opcode)); 198 Status = AE_AML_BAD_OPCODE; 199 break; --- 527 unchanged lines hidden (view full) --- 727 728 729 /* Examine the AML opcode */ 730 731 switch (WalkState->Opcode) 732 { 733 case AML_LNOT_OP: /* LNot (Operand) */ 734 |
736 ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); | 735 ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) 0); |
737 if (!ReturnDesc) 738 { 739 Status = AE_NO_MEMORY; 740 goto Cleanup; 741 } 742 743 /* 744 * Set result to ONES (TRUE) if Value == 0. Note: --- 88 unchanged lines hidden (view full) --- 833 Status = AcpiExResolveMultiple (WalkState, Operand[0], &Type, NULL); 834 if (ACPI_FAILURE (Status)) 835 { 836 goto Cleanup; 837 } 838 839 /* Allocate a descriptor to hold the type. */ 840 | 736 if (!ReturnDesc) 737 { 738 Status = AE_NO_MEMORY; 739 goto Cleanup; 740 } 741 742 /* 743 * Set result to ONES (TRUE) if Value == 0. Note: --- 88 unchanged lines hidden (view full) --- 832 Status = AcpiExResolveMultiple (WalkState, Operand[0], &Type, NULL); 833 if (ACPI_FAILURE (Status)) 834 { 835 goto Cleanup; 836 } 837 838 /* Allocate a descriptor to hold the type. */ 839 |
841 ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); | 840 ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) Type); |
842 if (!ReturnDesc) 843 { 844 Status = AE_NO_MEMORY; 845 goto Cleanup; 846 } | 841 if (!ReturnDesc) 842 { 843 Status = AE_NO_MEMORY; 844 goto Cleanup; 845 } |
847 848 ReturnDesc->Integer.Value = Type; | |
849 break; 850 851 852 case AML_SIZE_OF_OP: /* SizeOf (SourceObject) */ 853 854 /* 855 * Note: The operand is not resolved at this point because we want to 856 * get the associated object, not its value. --- 55 unchanged lines hidden (view full) --- 912 { 913 goto Cleanup; 914 } 915 916 /* 917 * Now that we have the size of the object, create a result 918 * object to hold the value 919 */ | 846 break; 847 848 849 case AML_SIZE_OF_OP: /* SizeOf (SourceObject) */ 850 851 /* 852 * Note: The operand is not resolved at this point because we want to 853 * get the associated object, not its value. --- 55 unchanged lines hidden (view full) --- 909 { 910 goto Cleanup; 911 } 912 913 /* 914 * Now that we have the size of the object, create a result 915 * object to hold the value 916 */ |
920 ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); | 917 ReturnDesc = AcpiUtCreateIntegerObject (Value); |
921 if (!ReturnDesc) 922 { 923 Status = AE_NO_MEMORY; 924 goto Cleanup; 925 } | 918 if (!ReturnDesc) 919 { 920 Status = AE_NO_MEMORY; 921 goto Cleanup; 922 } |
926 927 ReturnDesc->Integer.Value = Value; | |
928 break; 929 930 931 case AML_REF_OF_OP: /* RefOf (SourceObject) */ 932 933 Status = AcpiExGetObjectReference (Operand[0], &ReturnDesc, WalkState); 934 if (ACPI_FAILURE (Status)) 935 { --- 148 unchanged lines hidden (view full) --- 1084 1085 /* 1086 * Create a new object that contains one element of the 1087 * buffer -- the element pointed to by the index. 1088 * 1089 * NOTE: index into a buffer is NOT a pointer to a 1090 * sub-buffer of the main buffer, it is only a pointer to a 1091 * single element (byte) of the buffer! | 923 break; 924 925 926 case AML_REF_OF_OP: /* RefOf (SourceObject) */ 927 928 Status = AcpiExGetObjectReference (Operand[0], &ReturnDesc, WalkState); 929 if (ACPI_FAILURE (Status)) 930 { --- 148 unchanged lines hidden (view full) --- 1079 1080 /* 1081 * Create a new object that contains one element of the 1082 * buffer -- the element pointed to by the index. 1083 * 1084 * NOTE: index into a buffer is NOT a pointer to a 1085 * sub-buffer of the main buffer, it is only a pointer to a 1086 * single element (byte) of the buffer! |
1087 * 1088 * Since we are returning the value of the buffer at the 1089 * indexed location, we don't need to add an additional 1090 * reference to the buffer itself. |
|
1092 */ | 1091 */ |
1093 ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); | 1092 ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) 1093 TempDesc->Buffer.Pointer[Operand[0]->Reference.Value]); |
1094 if (!ReturnDesc) 1095 { 1096 Status = AE_NO_MEMORY; 1097 goto Cleanup; 1098 } | 1094 if (!ReturnDesc) 1095 { 1096 Status = AE_NO_MEMORY; 1097 goto Cleanup; 1098 } |
1099 1100 /* 1101 * Since we are returning the value of the buffer at the 1102 * indexed location, we don't need to add an additional 1103 * reference to the buffer itself. 1104 */ 1105 ReturnDesc->Integer.Value = 1106 TempDesc->Buffer.Pointer[Operand[0]->Reference.Value]; | |
1107 break; 1108 1109 1110 case ACPI_TYPE_PACKAGE: 1111 1112 /* 1113 * Return the referenced element of the package. We must 1114 * add another reference to the referenced object, however. --- 77 unchanged lines hidden --- | 1099 break; 1100 1101 1102 case ACPI_TYPE_PACKAGE: 1103 1104 /* 1105 * Return the referenced element of the package. We must 1106 * add another reference to the referenced object, however. --- 77 unchanged lines hidden --- |