diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2002-08-29 01:51:24 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2002-08-29 01:51:24 +0000 |
commit | 1824f192010fc0c0826e9889892e534075b58793 (patch) | |
tree | bbc04a2733724f3f0ab5cecb259948ac9a9723d7 /sys/contrib/dev/acpica/exprep.c | |
parent | 3f86517f16a9cf970e93e483e90066da6eb323dd (diff) | |
download | FreeBSD-src-1824f192010fc0c0826e9889892e534075b58793.zip FreeBSD-src-1824f192010fc0c0826e9889892e534075b58793.tar.gz |
Vendor import of the Intel ACPI CA 20020815 drop.
Diffstat (limited to 'sys/contrib/dev/acpica/exprep.c')
-rw-r--r-- | sys/contrib/dev/acpica/exprep.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/sys/contrib/dev/acpica/exprep.c b/sys/contrib/dev/acpica/exprep.c index f0aa081..2aeb7eed 100644 --- a/sys/contrib/dev/acpica/exprep.c +++ b/sys/contrib/dev/acpica/exprep.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: exprep - ACPI AML (p-code) execution - field prep utilities - * $Revision: 118 $ + * $Revision: 119 $ * *****************************************************************************/ @@ -303,17 +303,17 @@ AcpiExPrepCommonFieldObject ( * two pieces of information - the width of each field access and the * necessary ByteAlignment (address granularity) of the access. * - * For AnyAcc, the AccessBitWidth is the largest width that is both + * For AnyAcc, the AccessBitWidth is the largest width that is both * necessary and possible in an attempt to access the whole field in one - * I/O operation. However, for AnyAcc, the ByteAlignment is always one + * I/O operation. However, for AnyAcc, the ByteAlignment is always one * byte. * * For all Buffer Fields, the ByteAlignment is always one byte. * - * For all other access types (Byte, Word, Dword, Qword), the Bitwidth is + * For all other access types (Byte, Word, Dword, Qword), the Bitwidth is * the same (equivalent) as the ByteAlignment. */ - AccessBitWidth = AcpiExDecodeFieldAccess (ObjDesc, FieldFlags, + AccessBitWidth = AcpiExDecodeFieldAccess (ObjDesc, FieldFlags, &ByteAlignment); if (!AccessBitWidth) { @@ -322,26 +322,26 @@ AcpiExPrepCommonFieldObject ( /* Setup width (access granularity) fields */ - ObjDesc->CommonField.AccessByteWidth = (UINT8) + ObjDesc->CommonField.AccessByteWidth = (UINT8) ACPI_DIV_8 (AccessBitWidth); /* 1, 2, 4, 8 */ /* - * BaseByteOffset is the address of the start of the field within the - * region. It is the byte address of the first *datum* (field-width data - * unit) of the field. (i.e., the first datum that contains at least the + * BaseByteOffset is the address of the start of the field within the + * region. It is the byte address of the first *datum* (field-width data + * unit) of the field. (i.e., the first datum that contains at least the * first *bit* of the field.) * - * Note: ByteAlignment is always either equal to the AccessBitWidth or 8 - * (Byte access), and it defines the addressing granularity of the parent + * Note: ByteAlignment is always either equal to the AccessBitWidth or 8 + * (Byte access), and it defines the addressing granularity of the parent * region or buffer. */ - NearestByteAddress = + NearestByteAddress = ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition); - ObjDesc->CommonField.BaseByteOffset = + ObjDesc->CommonField.BaseByteOffset = ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment); /* - * StartFieldBitOffset is the offset of the first bit of the field within + * StartFieldBitOffset is the offset of the first bit of the field within * a field datum. */ ObjDesc->CommonField.StartFieldBitOffset = (UINT8) @@ -349,24 +349,24 @@ AcpiExPrepCommonFieldObject ( /* * Valid bits -- the number of bits that compose a partial datum, - * 1) At the end of the field within the region (arbitrary starting bit + * 1) At the end of the field within the region (arbitrary starting bit * offset) - * 2) At the end of a buffer used to contain the field (starting offset + * 2) At the end of a buffer used to contain the field (starting offset * always zero) */ - ObjDesc->CommonField.EndFieldValidBits = (UINT8) + ObjDesc->CommonField.EndFieldValidBits = (UINT8) ((ObjDesc->CommonField.StartFieldBitOffset + FieldBitLength) % AccessBitWidth); /* StartBufferBitOffset always = 0 */ - ObjDesc->CommonField.EndBufferValidBits = (UINT8) + ObjDesc->CommonField.EndBufferValidBits = (UINT8) (FieldBitLength % AccessBitWidth); /* - * DatumValidBits is the number of valid field bits in the first + * DatumValidBits is the number of valid field bits in the first * field datum. */ - ObjDesc->CommonField.DatumValidBits = (UINT8) + ObjDesc->CommonField.DatumValidBits = (UINT8) (AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset); /* @@ -482,11 +482,11 @@ AcpiExPrepFieldValue ( AcpiUtAddReference (ObjDesc->BankField.RegionObj); AcpiUtAddReference (ObjDesc->BankField.BankObj); - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Bank Field: BitOff=%X Off=%X Gran=%X Region %p BankReg %p\n", - ObjDesc->BankField.StartFieldBitOffset, + ObjDesc->BankField.StartFieldBitOffset, ObjDesc->BankField.BaseByteOffset, - ObjDesc->Field.AccessByteWidth, + ObjDesc->Field.AccessByteWidth, ObjDesc->BankField.RegionObj, ObjDesc->BankField.BankObj)); break; @@ -496,7 +496,7 @@ AcpiExPrepFieldValue ( ObjDesc->IndexField.IndexObj = AcpiNsGetAttachedObject (Info->RegisterNode); ObjDesc->IndexField.DataObj = AcpiNsGetAttachedObject (Info->DataRegisterNode); - ObjDesc->IndexField.Value = (UINT32) + ObjDesc->IndexField.Value = (UINT32) (Info->FieldBitPosition / ACPI_MUL_8 (ObjDesc->Field.AccessByteWidth)); if (!ObjDesc->IndexField.DataObj || !ObjDesc->IndexField.IndexObj) @@ -510,11 +510,11 @@ AcpiExPrepFieldValue ( AcpiUtAddReference (ObjDesc->IndexField.DataObj); AcpiUtAddReference (ObjDesc->IndexField.IndexObj); - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "IndexField: bitoff=%X off=%X gran=%X Index %p Data %p\n", - ObjDesc->IndexField.StartFieldBitOffset, + ObjDesc->IndexField.StartFieldBitOffset, ObjDesc->IndexField.BaseByteOffset, - ObjDesc->Field.AccessByteWidth, + ObjDesc->Field.AccessByteWidth, ObjDesc->IndexField.IndexObj, ObjDesc->IndexField.DataObj)); break; |