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

3  * Module Name: exoparg2 - AML execution - opcodes with 2 arguments
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
175 * xA - ARGUMENTS: The number of arguments (input operands) that are
177 * yT - TARGETS: The number of targets (output operands) that are required
179 * zR - RETURN VALUE: Indicates whether this opcode type returns a value
191 * PARAMETERS: WalkState - Current walk state
206 ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; in AcpiExOpcode_2A_0T_0R()
213 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_2A_0T_0R()
218 switch (WalkState->Opcode) in AcpiExOpcode_2A_0T_0R()
228 Value = (UINT32) Operand[1]->Integer.Value; in AcpiExOpcode_2A_0T_0R()
236 AcpiUtGetTypeName (Node->Type))); in AcpiExOpcode_2A_0T_0R()
246 * from this thread -- because handlers may in turn run other in AcpiExOpcode_2A_0T_0R()
255 WalkState->Opcode)); in AcpiExOpcode_2A_0T_0R()
267 * PARAMETERS: WalkState - Current walk state
280 ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; in AcpiExOpcode_2A_2T_1R()
287 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_2A_2T_1R()
292 switch (WalkState->Opcode) in AcpiExOpcode_2A_2T_1R()
315 Operand[0]->Integer.Value, in AcpiExOpcode_2A_2T_1R()
316 Operand[1]->Integer.Value, in AcpiExOpcode_2A_2T_1R()
317 &ReturnDesc1->Integer.Value, in AcpiExOpcode_2A_2T_1R()
318 &ReturnDesc2->Integer.Value); in AcpiExOpcode_2A_2T_1R()
328 WalkState->Opcode)); in AcpiExOpcode_2A_2T_1R()
334 /* Store the results to the target reference operands */ in AcpiExOpcode_2A_2T_1R()
350 * Since the remainder is not returned indirectly, remove a reference to in AcpiExOpcode_2A_2T_1R()
366 WalkState->ResultObj = ReturnDesc1; in AcpiExOpcode_2A_2T_1R()
377 * PARAMETERS: WalkState - Current walk state
390 ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; in AcpiExOpcode_2A_1T_1R()
398 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_2A_1T_1R()
403 if (WalkState->OpInfo->Flags & AML_MATH) in AcpiExOpcode_2A_1T_1R()
414 ReturnDesc->Integer.Value = AcpiExDoMathOp ( in AcpiExOpcode_2A_1T_1R()
415 WalkState->Opcode, in AcpiExOpcode_2A_1T_1R()
416 Operand[0]->Integer.Value, in AcpiExOpcode_2A_1T_1R()
417 Operand[1]->Integer.Value); in AcpiExOpcode_2A_1T_1R()
421 switch (WalkState->Opcode) in AcpiExOpcode_2A_1T_1R()
435 Operand[0]->Integer.Value, in AcpiExOpcode_2A_1T_1R()
436 Operand[1]->Integer.Value, in AcpiExOpcode_2A_1T_1R()
438 &ReturnDesc->Integer.Value); in AcpiExOpcode_2A_1T_1R()
447 case AML_TO_STRING_OP: /* ToString (Buffer, Length, Result) (ACPI 2.0) */ in AcpiExOpcode_2A_1T_1R()
449 * Input object is guaranteed to be a buffer at this point (it may have in AcpiExOpcode_2A_1T_1R()
450 * been converted.) Copy the raw buffer data to a new object of in AcpiExOpcode_2A_1T_1R()
456 * 1) Length of the input buffer in AcpiExOpcode_2A_1T_1R()
458 * 3) Length of input buffer up to a zero byte (null terminator) in AcpiExOpcode_2A_1T_1R()
460 * NOTE: A length of zero is ok, and will create a zero-length, null in AcpiExOpcode_2A_1T_1R()
463 while ((Length < Operand[0]->Buffer.Length) && /* Length of input buffer */ in AcpiExOpcode_2A_1T_1R()
464 (Length < Operand[1]->Integer.Value) && /* Length operand */ in AcpiExOpcode_2A_1T_1R()
465 (Operand[0]->Buffer.Pointer[Length])) /* Null terminator */ in AcpiExOpcode_2A_1T_1R()
480 * Copy the raw buffer data with no transform. in AcpiExOpcode_2A_1T_1R()
483 memcpy (ReturnDesc->String.Pointer, in AcpiExOpcode_2A_1T_1R()
484 Operand[0]->Buffer.Pointer, Length); in AcpiExOpcode_2A_1T_1R()
489 /* ConcatenateResTemplate (Buffer, Buffer, Result) (ACPI 2.0) */ in AcpiExOpcode_2A_1T_1R()
506 /* Initialize the Index reference object */ in AcpiExOpcode_2A_1T_1R()
508 Index = Operand[1]->Integer.Value; in AcpiExOpcode_2A_1T_1R()
509 ReturnDesc->Reference.Value = (UINT32) Index; in AcpiExOpcode_2A_1T_1R()
510 ReturnDesc->Reference.Class = ACPI_REFCLASS_INDEX; in AcpiExOpcode_2A_1T_1R()
513 * At this point, the Source operand is a String, Buffer, or Package. in AcpiExOpcode_2A_1T_1R()
516 switch ((Operand[0])->Common.Type) in AcpiExOpcode_2A_1T_1R()
520 if (Index >= Operand[0]->String.Length) in AcpiExOpcode_2A_1T_1R()
522 Length = Operand[0]->String.Length; in AcpiExOpcode_2A_1T_1R()
526 ReturnDesc->Reference.TargetType = ACPI_TYPE_BUFFER_FIELD; in AcpiExOpcode_2A_1T_1R()
527 ReturnDesc->Reference.IndexPointer = in AcpiExOpcode_2A_1T_1R()
528 &(Operand[0]->Buffer.Pointer [Index]); in AcpiExOpcode_2A_1T_1R()
533 if (Index >= Operand[0]->Buffer.Length) in AcpiExOpcode_2A_1T_1R()
535 Length = Operand[0]->Buffer.Length; in AcpiExOpcode_2A_1T_1R()
539 ReturnDesc->Reference.TargetType = ACPI_TYPE_BUFFER_FIELD; in AcpiExOpcode_2A_1T_1R()
540 ReturnDesc->Reference.IndexPointer = in AcpiExOpcode_2A_1T_1R()
541 &(Operand[0]->Buffer.Pointer [Index]); in AcpiExOpcode_2A_1T_1R()
546 if (Index >= Operand[0]->Package.Count) in AcpiExOpcode_2A_1T_1R()
548 Length = Operand[0]->Package.Count; in AcpiExOpcode_2A_1T_1R()
552 ReturnDesc->Reference.TargetType = ACPI_TYPE_PACKAGE; in AcpiExOpcode_2A_1T_1R()
553 ReturnDesc->Reference.Where = in AcpiExOpcode_2A_1T_1R()
554 &Operand[0]->Package.Elements [Index]; in AcpiExOpcode_2A_1T_1R()
560 "Invalid object type: %X", (Operand[0])->Common.Type)); in AcpiExOpcode_2A_1T_1R()
576 * Save the target object and add a reference to it for the life in AcpiExOpcode_2A_1T_1R()
579 ReturnDesc->Reference.Object = Operand[0]; in AcpiExOpcode_2A_1T_1R()
582 /* Store the reference to the Target */ in AcpiExOpcode_2A_1T_1R()
586 /* Return the reference */ in AcpiExOpcode_2A_1T_1R()
588 WalkState->ResultObj = ReturnDesc; in AcpiExOpcode_2A_1T_1R()
594 WalkState->Opcode)); in AcpiExOpcode_2A_1T_1R()
614 if (!WalkState->ResultObj) in AcpiExOpcode_2A_1T_1R()
616 WalkState->ResultObj = ReturnDesc; in AcpiExOpcode_2A_1T_1R()
628 WalkState->ResultObj = NULL; in AcpiExOpcode_2A_1T_1R()
639 * PARAMETERS: WalkState - Current walk state
651 ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; in AcpiExOpcode_2A_0T_1R()
658 AcpiPsGetOpcodeName (WalkState->Opcode)); in AcpiExOpcode_2A_0T_1R()
672 if (WalkState->OpInfo->Flags & AML_LOGICAL_NUMERIC) in AcpiExOpcode_2A_0T_1R()
676 Status = AcpiExDoLogicalNumericOp (WalkState->Opcode, in AcpiExOpcode_2A_0T_1R()
677 Operand[0]->Integer.Value, Operand[1]->Integer.Value, in AcpiExOpcode_2A_0T_1R()
681 else if (WalkState->OpInfo->Flags & AML_LOGICAL) in AcpiExOpcode_2A_0T_1R()
685 Status = AcpiExDoLogicalOp (WalkState->Opcode, Operand[0], in AcpiExOpcode_2A_0T_1R()
690 switch (WalkState->Opcode) in AcpiExOpcode_2A_0T_1R()
716 WalkState->Opcode)); in AcpiExOpcode_2A_0T_1R()
730 ReturnDesc->Integer.Value = ACPI_UINT64_MAX; in AcpiExOpcode_2A_0T_1R()
746 WalkState->ResultObj = ReturnDesc; in AcpiExOpcode_2A_0T_1R()