Lines Matching +full:reference +full:- +full:buffer

3  * Module Name: exoparg1 - AML execution - opcodes with 1 argument
11 * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
108 * any of its subsidiaries will export/re-export any technical data, process,
130 * 3. Neither the names of the above-listed copyright holders nor the names
176 * xA - ARGUMENTS: The number of arguments (input operands) that are
178 * yT - TARGETS: The number of targets (output operands) that are required
180 * zR - RETURN VALUE: Indicates whether this opcode type returns a value
191 * PARAMETERS: WalkState - Current state (contains AML opcode)
208 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_0A_0T_1R()
213 switch (WalkState->Opcode) in AcpiExOpcode_0A_0T_1R()
230 WalkState->Opcode)); in AcpiExOpcode_0A_0T_1R()
239 if ((ACPI_FAILURE (Status)) || WalkState->ResultObj) in AcpiExOpcode_0A_0T_1R()
242 WalkState->ResultObj = NULL; in AcpiExOpcode_0A_0T_1R()
248 WalkState->ResultObj = ReturnDesc; in AcpiExOpcode_0A_0T_1R()
259 * PARAMETERS: WalkState - Current state (contains AML opcode)
272 ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; in AcpiExOpcode_1A_0T_0R()
277 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_1A_0T_0R()
282 switch (WalkState->Opcode) in AcpiExOpcode_1A_0T_0R()
301 Status = AcpiExSystemDoSleep (Operand[0]->Integer.Value); in AcpiExOpcode_1A_0T_0R()
306 Status = AcpiExSystemDoStall ((UINT32) Operand[0]->Integer.Value); in AcpiExOpcode_1A_0T_0R()
317 WalkState->Opcode)); in AcpiExOpcode_1A_0T_0R()
331 * PARAMETERS: WalkState - Current state (contains AML opcode)
345 ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; in AcpiExOpcode_1A_1T_0R()
349 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_1A_1T_0R()
354 switch (WalkState->Opcode) in AcpiExOpcode_1A_1T_0R()
366 WalkState->Opcode)); in AcpiExOpcode_1A_1T_0R()
382 * PARAMETERS: WalkState - Current state (contains AML opcode)
398 ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; in AcpiExOpcode_1A_1T_1R()
408 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_1A_1T_1R()
413 switch (WalkState->Opcode) in AcpiExOpcode_1A_1T_1R()
432 switch (WalkState->Opcode) in AcpiExOpcode_1A_1T_1R()
436 ReturnDesc->Integer.Value = ~Operand[0]->Integer.Value; in AcpiExOpcode_1A_1T_1R()
441 ReturnDesc->Integer.Value = Operand[0]->Integer.Value; in AcpiExOpcode_1A_1T_1R()
447 for (Temp32 = 0; ReturnDesc->Integer.Value && in AcpiExOpcode_1A_1T_1R()
450 ReturnDesc->Integer.Value >>= 1; in AcpiExOpcode_1A_1T_1R()
453 ReturnDesc->Integer.Value = Temp32; in AcpiExOpcode_1A_1T_1R()
458 ReturnDesc->Integer.Value = Operand[0]->Integer.Value; in AcpiExOpcode_1A_1T_1R()
464 for (Temp32 = 0; ReturnDesc->Integer.Value && in AcpiExOpcode_1A_1T_1R()
467 ReturnDesc->Integer.Value <<= 1; in AcpiExOpcode_1A_1T_1R()
470 /* Since the bit position is one-based, subtract from 33 (65) */ in AcpiExOpcode_1A_1T_1R()
472 ReturnDesc->Integer.Value = in AcpiExOpcode_1A_1T_1R()
473 Temp32 == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - Temp32; in AcpiExOpcode_1A_1T_1R()
478 * The 64-bit ACPI integer can hold 16 4-bit BCD characters in AcpiExOpcode_1A_1T_1R()
479 * (if table is 32-bit, integer can hold 8 BCD characters) in AcpiExOpcode_1A_1T_1R()
480 * Convert each 4-bit BCD value in AcpiExOpcode_1A_1T_1R()
483 ReturnDesc->Integer.Value = 0; in AcpiExOpcode_1A_1T_1R()
484 Digit = Operand[0]->Integer.Value; in AcpiExOpcode_1A_1T_1R()
490 /* Get the least significant 4-bit BCD digit */ in AcpiExOpcode_1A_1T_1R()
508 ReturnDesc->Integer.Value += in AcpiExOpcode_1A_1T_1R()
523 ReturnDesc->Integer.Value = 0; in AcpiExOpcode_1A_1T_1R()
527 /* Return -1 (non-zero) indicates success */ in AcpiExOpcode_1A_1T_1R()
529 ReturnDesc->Integer.Value = 0xFFFFFFFFFFFFFFFF; in AcpiExOpcode_1A_1T_1R()
535 ReturnDesc->Integer.Value = 0; in AcpiExOpcode_1A_1T_1R()
536 Digit = Operand[0]->Integer.Value; in AcpiExOpcode_1A_1T_1R()
548 ReturnDesc->Integer.Value |= in AcpiExOpcode_1A_1T_1R()
558 ACPI_FORMAT_UINT64 (Operand[0]->Integer.Value))); in AcpiExOpcode_1A_1T_1R()
576 ReturnDesc->Integer.Value = 0; in AcpiExOpcode_1A_1T_1R()
580 /* Get the object reference, store it, and remove our reference */ in AcpiExOpcode_1A_1T_1R()
594 ReturnDesc->Integer.Value = ACPI_UINT64_MAX; in AcpiExOpcode_1A_1T_1R()
608 * A store operand is typically a number, string, buffer or lvalue in AcpiExOpcode_1A_1T_1R()
620 if (!WalkState->ResultObj) in AcpiExOpcode_1A_1T_1R()
623 * Normally, we would remove a reference on the Operand[0] in AcpiExOpcode_1A_1T_1R()
628 WalkState->ResultObj = Operand[0]; in AcpiExOpcode_1A_1T_1R()
629 WalkState->Operands[0] = NULL; /* Prevent deletion */ in AcpiExOpcode_1A_1T_1R()
697 AcpiPsGetOpcodeName (WalkState->Opcode))); in AcpiExOpcode_1A_1T_1R()
704 WalkState->Opcode)); in AcpiExOpcode_1A_1T_1R()
728 else if (!WalkState->ResultObj) in AcpiExOpcode_1A_1T_1R()
730 WalkState->ResultObj = ReturnDesc; in AcpiExOpcode_1A_1T_1R()
741 * PARAMETERS: WalkState - Current state (contains AML opcode)
753 ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; in AcpiExOpcode_1A_0T_1R()
762 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_1A_0T_1R()
767 switch (WalkState->Opcode) in AcpiExOpcode_1A_0T_1R()
780 * ReturnDesc->Integer.Value is initially == 0 (FALSE) from above. in AcpiExOpcode_1A_0T_1R()
782 if (!Operand[0]->Integer.Value) in AcpiExOpcode_1A_0T_1R()
784 ReturnDesc->Integer.Value = ACPI_UINT64_MAX; in AcpiExOpcode_1A_0T_1R()
802 * Since we are expecting a Reference operand, it can be either a in AcpiExOpcode_1A_0T_1R()
808 /* Internal reference object - prevent deletion */ in AcpiExOpcode_1A_0T_1R()
814 * Convert the Reference operand to an Integer (This removes a in AcpiExOpcode_1A_0T_1R()
815 * reference on the Operand[0] object) in AcpiExOpcode_1A_0T_1R()
818 * reference operand to an actual integer. in AcpiExOpcode_1A_0T_1R()
826 AcpiPsGetOpcodeName (WalkState->Opcode))); in AcpiExOpcode_1A_0T_1R()
832 * TempDesc is now guaranteed to be an Integer object -- in AcpiExOpcode_1A_0T_1R()
835 if (WalkState->Opcode == AML_INCREMENT_OP) in AcpiExOpcode_1A_0T_1R()
837 ReturnDesc->Integer.Value = TempDesc->Integer.Value + 1; in AcpiExOpcode_1A_0T_1R()
841 ReturnDesc->Integer.Value = TempDesc->Integer.Value - 1; in AcpiExOpcode_1A_0T_1R()
850 * Reference object in AcpiExOpcode_1A_0T_1R()
897 * The type of the base object must be integer, buffer, string, or in AcpiExOpcode_1A_0T_1R()
914 Value = TempDesc->String.Length; in AcpiExOpcode_1A_0T_1R()
919 /* Buffer arguments may not be evaluated at this point */ in AcpiExOpcode_1A_0T_1R()
922 Value = TempDesc->Buffer.Length; in AcpiExOpcode_1A_0T_1R()
930 Value = TempDesc->Package.Count; in AcpiExOpcode_1A_0T_1R()
936 "Operand must be Buffer/Integer/String/Package" in AcpiExOpcode_1A_0T_1R()
937 " - found type %s", in AcpiExOpcode_1A_0T_1R()
982 ((TempDesc->Common.Type == ACPI_TYPE_STRING) || in AcpiExOpcode_1A_0T_1R()
983 (TempDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE))) in AcpiExOpcode_1A_0T_1R()
996 switch ((Operand[0])->Common.Type) in AcpiExOpcode_1A_0T_1R()
1002 * Must resolve/dereference the local/arg reference first in AcpiExOpcode_1A_0T_1R()
1004 switch (Operand[0]->Reference.Class) in AcpiExOpcode_1A_0T_1R()
1012 Operand[0]->Reference.Class, in AcpiExOpcode_1A_0T_1R()
1013 Operand[0]->Reference.Value, in AcpiExOpcode_1A_0T_1R()
1021 * Delete our reference to the input object and in AcpiExOpcode_1A_0T_1R()
1030 /* Get the object to which the reference refers */ in AcpiExOpcode_1A_0T_1R()
1032 TempDesc = Operand[0]->Reference.Object; in AcpiExOpcode_1A_0T_1R()
1039 /* Must be an Index op - handled below */ in AcpiExOpcode_1A_0T_1R()
1057 if ((Operand[0])->Common.Type == ACPI_TYPE_STRING) in AcpiExOpcode_1A_0T_1R()
1060 * This is a DerefOf (String). The string is a reference in AcpiExOpcode_1A_0T_1R()
1067 Status = AcpiNsGetNodeUnlocked (WalkState->ScopeInfo->Scope.Node, in AcpiExOpcode_1A_0T_1R()
1068 Operand[0]->String.Pointer, in AcpiExOpcode_1A_0T_1R()
1096 switch (((ACPI_NAMESPACE_NODE *) Operand[0])->Type) in AcpiExOpcode_1A_0T_1R()
1118 * This must be a reference object produced by either the in AcpiExOpcode_1A_0T_1R()
1121 switch (Operand[0]->Reference.Class) in AcpiExOpcode_1A_0T_1R()
1126 * either a Buffer or a Package in AcpiExOpcode_1A_0T_1R()
1128 switch (Operand[0]->Reference.TargetType) in AcpiExOpcode_1A_0T_1R()
1132 TempDesc = Operand[0]->Reference.Object; in AcpiExOpcode_1A_0T_1R()
1136 * buffer -- the element pointed to by the index. in AcpiExOpcode_1A_0T_1R()
1138 * NOTE: index into a buffer is NOT a pointer to a in AcpiExOpcode_1A_0T_1R()
1139 * sub-buffer of the main buffer, it is only a pointer to a in AcpiExOpcode_1A_0T_1R()
1140 * single element (byte) of the buffer! in AcpiExOpcode_1A_0T_1R()
1142 * Since we are returning the value of the buffer at the in AcpiExOpcode_1A_0T_1R()
1144 * reference to the buffer itself. in AcpiExOpcode_1A_0T_1R()
1147 TempDesc->Buffer.Pointer[Operand[0]->Reference.Value]); in AcpiExOpcode_1A_0T_1R()
1158 * add another reference to the referenced object, however. in AcpiExOpcode_1A_0T_1R()
1160 ReturnDesc = *(Operand[0]->Reference.Where); in AcpiExOpcode_1A_0T_1R()
1177 "Unknown Index TargetType 0x%X in reference object %p", in AcpiExOpcode_1A_0T_1R()
1178 Operand[0]->Reference.TargetType, Operand[0])); in AcpiExOpcode_1A_0T_1R()
1187 ReturnDesc = Operand[0]->Reference.Object; in AcpiExOpcode_1A_0T_1R()
1203 switch (ReturnDesc->Common.Type) in AcpiExOpcode_1A_0T_1R()
1222 /* Add another reference to the object */ in AcpiExOpcode_1A_0T_1R()
1233 "Unknown class in reference(%p) - 0x%2.2X", in AcpiExOpcode_1A_0T_1R()
1234 Operand[0], Operand[0]->Reference.Class)); in AcpiExOpcode_1A_0T_1R()
1245 WalkState->Opcode)); in AcpiExOpcode_1A_0T_1R()
1265 WalkState->ResultObj = ReturnDesc; in AcpiExOpcode_1A_0T_1R()