Lines Matching +full:reference +full:- +full:buffer
3 * Module Name: dsobject - Dispatcher object management routines
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
168 * PARAMETERS: WalkState - Current walk state
169 * Op - Parser object to be translated
170 * ObjDescPtr - Where the ACPI internal object is returned
193 if (Op->Common.AmlOpcode == AML_INT_NAMEPATH_OP) in AcpiDsBuildInternalObject()
196 * This is a named object reference. If this name was in AcpiDsBuildInternalObject()
200 if (!Op->Common.Node) in AcpiDsBuildInternalObject()
202 /* Check if we are resolving a named reference within a package */ in AcpiDsBuildInternalObject()
204 if ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) || in AcpiDsBuildInternalObject()
205 (Op->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP)) in AcpiDsBuildInternalObject()
217 Status = AcpiNsLookup (WalkState->ScopeInfo, in AcpiDsBuildInternalObject()
218 Op->Common.Value.String, in AcpiDsBuildInternalObject()
222 ACPI_NAMESPACE_NODE, &(Op->Common.Node))); in AcpiDsBuildInternalObject()
225 ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo, in AcpiDsBuildInternalObject()
226 Op->Common.Value.String, Status); in AcpiDsBuildInternalObject()
238 (AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode))->ObjectType); in AcpiDsBuildInternalObject()
245 WalkState, Op, Op->Common.AmlOpcode, &ObjDesc); in AcpiDsBuildInternalObject()
253 * Handling for unresolved package reference elements. in AcpiDsBuildInternalObject()
256 if ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) || in AcpiDsBuildInternalObject()
257 (Op->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP)) in AcpiDsBuildInternalObject()
259 ObjDesc->Reference.Resolved = TRUE; in AcpiDsBuildInternalObject()
261 if ((Op->Common.AmlOpcode == AML_INT_NAMEPATH_OP) && in AcpiDsBuildInternalObject()
262 !ObjDesc->Reference.Node) in AcpiDsBuildInternalObject()
268 ObjDesc->Reference.Node = WalkState->ScopeInfo->Scope.Node; in AcpiDsBuildInternalObject()
269 ObjDesc->Reference.Aml = Op->Common.Aml; in AcpiDsBuildInternalObject()
270 ObjDesc->Reference.Resolved = FALSE; in AcpiDsBuildInternalObject()
283 * PARAMETERS: WalkState - Current walk state
284 * Op - Parser object to be translated
285 * BufferLength - Length of the buffer
286 * ObjDescPtr - Where the ACPI internal object is returned
312 * If we are evaluating a Named buffer object "Name (xxxx, Buffer)". in AcpiDsBuildInternalBufferObj()
313 * The buffer object already exists (from the NS node), otherwise it must in AcpiDsBuildInternalBufferObj()
319 /* Create a new buffer object */ in AcpiDsBuildInternalBufferObj()
330 * Second arg is the buffer data (optional) ByteList can be either in AcpiDsBuildInternalBufferObj()
334 Arg = Op->Common.Value.Arg; /* skip first arg */ in AcpiDsBuildInternalBufferObj()
336 ByteList = Arg->Named.Next; in AcpiDsBuildInternalBufferObj()
339 if (ByteList->Common.AmlOpcode != AML_INT_BYTELIST_OP) in AcpiDsBuildInternalBufferObj()
343 ByteList->Common.AmlOpcode, ByteList)); in AcpiDsBuildInternalBufferObj()
349 ByteListLength = (UINT32) ByteList->Common.Value.Integer; in AcpiDsBuildInternalBufferObj()
353 * The buffer length (number of bytes) will be the larger of: in AcpiDsBuildInternalBufferObj()
354 * 1) The specified buffer length and in AcpiDsBuildInternalBufferObj()
357 ObjDesc->Buffer.Length = BufferLength; in AcpiDsBuildInternalBufferObj()
360 ObjDesc->Buffer.Length = ByteListLength; in AcpiDsBuildInternalBufferObj()
363 /* Allocate the buffer */ in AcpiDsBuildInternalBufferObj()
365 if (ObjDesc->Buffer.Length == 0) in AcpiDsBuildInternalBufferObj()
367 ObjDesc->Buffer.Pointer = NULL; in AcpiDsBuildInternalBufferObj()
369 "Buffer defined with zero length in AML, creating\n")); in AcpiDsBuildInternalBufferObj()
373 ObjDesc->Buffer.Pointer = in AcpiDsBuildInternalBufferObj()
374 ACPI_ALLOCATE_ZEROED (ObjDesc->Buffer.Length); in AcpiDsBuildInternalBufferObj()
375 if (!ObjDesc->Buffer.Pointer) in AcpiDsBuildInternalBufferObj()
381 /* Initialize buffer from the ByteList (if present) */ in AcpiDsBuildInternalBufferObj()
385 memcpy (ObjDesc->Buffer.Pointer, ByteList->Named.Data, in AcpiDsBuildInternalBufferObj()
390 ObjDesc->Buffer.Flags |= AOPOBJ_DATA_VALID; in AcpiDsBuildInternalBufferObj()
391 Op->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjDesc); in AcpiDsBuildInternalBufferObj()
399 * PARAMETERS: WalkState - Current walk state
400 * Node - NS Node to be initialized
401 * Op - Parser object to be translated
423 * Because of the execution pass through the non-control-method in AcpiDsCreateNode()
432 if (!Op->Common.Value.Arg) in AcpiDsCreateNode()
442 WalkState, Op->Common.Value.Arg, &ObjDesc); in AcpiDsCreateNode()
448 /* Re-type the object according to its argument */ in AcpiDsCreateNode()
450 Node->Type = ObjDesc->Common.Type; in AcpiDsCreateNode()
454 Status = AcpiNsAttachObject (Node, ObjDesc, Node->Type); in AcpiDsCreateNode()
456 /* Remove local reference to the object */ in AcpiDsCreateNode()
467 * PARAMETERS: WalkState - Current walk state
468 * Op - Parser op used to init the internal object
469 * Opcode - AML opcode associated with the object
470 * RetObjDesc - Namespace object to be initialized
497 if (OpInfo->Class == AML_CLASS_UNKNOWN) in AcpiDsInitObjectFromOp()
504 /* Perform per-object initialization */ in AcpiDsInitObjectFromOp()
506 switch (ObjDesc->Common.Type) in AcpiDsInitObjectFromOp()
510 * Defer evaluation of Buffer TermArg operand in AcpiDsInitObjectFromOp()
512 ObjDesc->Buffer.Node = ACPI_CAST_PTR ( in AcpiDsInitObjectFromOp()
513 ACPI_NAMESPACE_NODE, WalkState->Operands[0]); in AcpiDsInitObjectFromOp()
514 ObjDesc->Buffer.AmlStart = Op->Named.Data; in AcpiDsInitObjectFromOp()
515 ObjDesc->Buffer.AmlLength = Op->Named.Length; in AcpiDsInitObjectFromOp()
526 ObjDesc->Package.Node = ACPI_CAST_PTR ( in AcpiDsInitObjectFromOp()
527 ACPI_NAMESPACE_NODE, WalkState->Operands[0]); in AcpiDsInitObjectFromOp()
529 if (!Op->Named.Data) in AcpiDsInitObjectFromOp()
534 ObjDesc->Package.AmlStart = Op->Named.Data; in AcpiDsInitObjectFromOp()
535 ObjDesc->Package.AmlLength = Op->Named.Length; in AcpiDsInitObjectFromOp()
540 switch (OpInfo->Type) in AcpiDsInitObjectFromOp()
544 * Resolve AML Constants here - AND ONLY HERE! in AcpiDsInitObjectFromOp()
547 * life as a constant -- so that stores to constants will perform in AcpiDsInitObjectFromOp()
551 ObjDesc->Common.Flags = AOPOBJ_AML_CONSTANT; in AcpiDsInitObjectFromOp()
557 ObjDesc->Integer.Value = 0; in AcpiDsInitObjectFromOp()
562 ObjDesc->Integer.Value = 1; in AcpiDsInitObjectFromOp()
567 ObjDesc->Integer.Value = ACPI_UINT64_MAX; in AcpiDsInitObjectFromOp()
569 /* Truncate value if we are executing from a 32-bit ACPI table */ in AcpiDsInitObjectFromOp()
576 ObjDesc->Integer.Value = ACPI_CA_VERSION; in AcpiDsInitObjectFromOp()
590 ObjDesc->Integer.Value = Op->Common.Value.Integer; in AcpiDsInitObjectFromOp()
594 /* Warn if we found a 64-bit constant in a 32-bit table */ in AcpiDsInitObjectFromOp()
597 "Truncated 64-bit constant found in 32-bit table: %8.8X%8.8X => %8.8X", in AcpiDsInitObjectFromOp()
598 ACPI_FORMAT_UINT64 (Op->Common.Value.Integer), in AcpiDsInitObjectFromOp()
599 (UINT32) ObjDesc->Integer.Value)); in AcpiDsInitObjectFromOp()
606 OpInfo->Type)); in AcpiDsInitObjectFromOp()
614 ObjDesc->String.Pointer = Op->Common.Value.String; in AcpiDsInitObjectFromOp()
615 ObjDesc->String.Length = (UINT32) strlen (Op->Common.Value.String); in AcpiDsInitObjectFromOp()
621 ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER; in AcpiDsInitObjectFromOp()
629 switch (OpInfo->Type) in AcpiDsInitObjectFromOp()
633 /* Local ID (0-7) is (AML opcode - base AML_FIRST_LOCAL_OP) */ in AcpiDsInitObjectFromOp()
635 ObjDesc->Reference.Value = ((UINT32) Opcode) - AML_FIRST_LOCAL_OP; in AcpiDsInitObjectFromOp()
636 ObjDesc->Reference.Class = ACPI_REFCLASS_LOCAL; in AcpiDsInitObjectFromOp()
639 ObjDesc->Reference.Value, WalkState, in AcpiDsInitObjectFromOp()
641 &ObjDesc->Reference.Object)); in AcpiDsInitObjectFromOp()
646 /* Arg ID (0-6) is (AML opcode - base AML_FIRST_ARG_OP) */ in AcpiDsInitObjectFromOp()
648 ObjDesc->Reference.Value = ((UINT32) Opcode) - AML_FIRST_ARG_OP; in AcpiDsInitObjectFromOp()
649 ObjDesc->Reference.Class = ACPI_REFCLASS_ARG; in AcpiDsInitObjectFromOp()
652 ObjDesc->Reference.Value, WalkState, in AcpiDsInitObjectFromOp()
654 &ObjDesc->Reference.Object)); in AcpiDsInitObjectFromOp()
659 switch (Op->Common.AmlOpcode) in AcpiDsInitObjectFromOp()
665 ObjDesc->Reference.Node = Op->Common.Node; in AcpiDsInitObjectFromOp()
666 ObjDesc->Reference.Class = ACPI_REFCLASS_NAME; in AcpiDsInitObjectFromOp()
667 if (Op->Common.Node) in AcpiDsInitObjectFromOp()
669 ObjDesc->Reference.Object = Op->Common.Node->Object; in AcpiDsInitObjectFromOp()
675 ObjDesc->Reference.Class = ACPI_REFCLASS_DEBUG; in AcpiDsInitObjectFromOp()
681 "Unimplemented reference type for AML opcode: 0x%4.4X", Opcode)); in AcpiDsInitObjectFromOp()
691 ObjDesc->Common.Type)); in AcpiDsInitObjectFromOp()