52#define _COMPONENT ACPI_EXECUTER
61 UINT32 *ReturnByteAlignment);
64#ifdef ACPI_UNDER_DEVELOPMENT
103 UINT32 FieldByteEndOffset;
107 UINT32 MinimumAccessWidth = 0xFFFFFFFF;
108 UINT32 MinimumAccesses = 0xFFFFFFFF;
123 FieldByteLength = FieldByteEndOffset - FieldByteOffset;
126 "Bit length %u, Bit offset %u\n",
127 FieldBitLength, FieldBitOffset));
130 "Byte Length %u, Byte Offset %u, End Offset %u\n",
131 FieldByteLength, FieldByteOffset, FieldByteEndOffset));
139 for (AccessByteWidth = 1; AccessByteWidth <= 8; AccessByteWidth <<= 1)
157 AccessByteWidth) / AccessByteWidth;
159 Accesses = FieldEndOffset - FieldStartOffset;
162 "AccessWidth %u end is within region\n", AccessByteWidth));
165 "Field Start %u, Field End %u -- requires %u accesses\n",
166 FieldStartOffset, FieldEndOffset, Accesses));
173 "Entire field can be accessed "
174 "with one operation of size %u\n",
183 if (Accesses < MinimumAccesses)
185 MinimumAccesses = Accesses;
186 MinimumAccessWidth = AccessByteWidth;
192 "AccessWidth %u end is NOT within region\n",
194 if (AccessByteWidth == 1)
197 "Field goes beyond end-of-region!\n"));
209 "Backing off to previous optimal access width of %u\n",
210 MinimumAccessWidth));
220 "Cannot access field in one operation, using width 8\n"));
246 UINT32 *ReturnByteAlignment)
262#ifdef ACPI_UNDER_DEVELOPMENT
264 AcpiExGenerateAccess (ObjDesc->
CommonField.StartFieldBitOffset,
267 BitLength = ByteAlignment * 8;
304 "Unknown field access type 0x%X",
320 *ReturnByteAlignment = ByteAlignment;
350 UINT8 FieldAttribute,
356 UINT32 NearestByteAddress;
387 ObjDesc, FieldFlags, &ByteAlignment);
455 if (!
Info->RegionNode)
484 Info->FieldBitPosition,
Info->FieldBitLength);
493 switch (
Info->FieldType)
501 ObjDesc->
Field.AccessLength =
Info->AccessLength;
503 if (
Info->ConnectionNode)
505 SecondDesc =
Info->ConnectionNode->Object;
517 SecondDesc->
Buffer.Pointer;
521 else if (
Info->ResourceBuffer)
539 if (AccessByteWidth < 256)
542 (
UINT8) AccessByteWidth;
547 "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
548 ObjDesc->
Field.StartFieldBitOffset,
549 ObjDesc->
Field.BaseByteOffset,
550 ObjDesc->
Field.AccessByteWidth,
568 "Bank Field: BitOff %X, Off %X, Gran %X, Region %p, BankReg %p\n",
571 ObjDesc->
Field.AccessByteWidth,
580 SecondDesc = ObjDesc->
Common.NextObject;
582 Info->DataRegisterNode)->Named.Data;
584 Info->DataRegisterNode)->Named.Length;
631 "IndexField: BitOff %X, Off %X, Value %X, "
632 "Gran %X, Index %p, Data %p\n",
636 ObjDesc->
Field.AccessByteWidth,
656 "Set NamedObj %p [%4.4s], ObjDesc %p\n",
#define AE_AML_NO_OPERAND
#define AE_AML_OPERAND_VALUE
#define AE_AML_OPERAND_TYPE
#define ACPI_ROUND_DOWN(value, boundary)
#define ACPI_ROUND_UP(value, boundary)
#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a)
#define ACPI_ROUND_BITS_UP_TO_BYTES(a)
ACPI_OPERAND_OBJECT * AcpiNsGetAttachedObject(ACPI_NAMESPACE_NODE *Node)
ACPI_OBJECT_TYPE AcpiNsGetType(ACPI_NAMESPACE_NODE *Node)
ACPI_STATUS AcpiNsAttachObject(ACPI_NAMESPACE_NODE *Node, ACPI_OPERAND_OBJECT *Object, ACPI_OBJECT_TYPE Type)
#define AOPOBJ_DATA_VALID
#define ACPI_DEBUG_PRINT(pl)
#define ACPI_MODULE_NAME(Name)
#define return_ACPI_STATUS(s)
#define ACPI_FUNCTION_TRACE(a)
#define ACPI_ERROR(plist)
#define ACPI_ADR_SPACE_EC
#define ACPI_TYPE_BUFFER_FIELD
#define ACPI_TYPE_LOCAL_BANK_FIELD
#define ACPI_TYPE_LOCAL_REGION_FIELD
#define ACPI_CAST_PTR(t, p)
#define ACPI_TYPE_LOCAL_INDEX_FIELD
#define AcpiUtCreateInternalObject(t)
const char * AcpiUtGetTypeName(ACPI_OBJECT_TYPE Type)
const char * AcpiUtGetNodeName(void *Object)
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
void AcpiUtDeleteObjectDesc(ACPI_OPERAND_OBJECT *Object)
void AcpiUtAddReference(ACPI_OPERAND_OBJECT *Object)
#define AML_FIELD_ACCESS_TYPE_MASK
@ AML_FIELD_ACCESS_BUFFER
ACPI_STATUS AcpiDsGetBufferArguments(ACPI_OPERAND_OBJECT *ObjDesc)
static UINT32 AcpiExDecodeFieldAccess(ACPI_OPERAND_OBJECT *ObjDesc, UINT8 FieldFlags, UINT32 *ReturnByteAlignment)
ACPI_STATUS AcpiExPrepFieldValue(ACPI_CREATE_FIELD_INFO *Info)
ACPI_STATUS AcpiExPrepCommonFieldObject(ACPI_OPERAND_OBJECT *ObjDesc, UINT8 FieldFlags, UINT8 FieldAttribute, UINT32 FieldBitPosition, UINT32 FieldBitLength)
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object * RegionObj
union acpi_operand_object * BankObj
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object * IndexObj
union acpi_operand_object * DataObj
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO UINT16 ResourceLength
union acpi_operand_object * RegionObj
ACPI_OBJECT_COMMON_HEADER UINT8 SpaceId
ACPI_OBJECT_REGION_FIELD Field
ACPI_OBJECT_BANK_FIELD BankField
ACPI_OBJECT_REGION Region
ACPI_OBJECT_INDEX_FIELD IndexField
ACPI_OBJECT_COMMON Common
ACPI_OBJECT_FIELD_COMMON CommonField
ACPI_OBJECT_BUFFER Buffer
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info