Functions | |
UINTN EFIAPI | InternalBaseLibBitFieldReadUint (IN UINTN Operand, IN UINTN StartBit, IN UINTN EndBit) |
UINTN EFIAPI | InternalBaseLibBitFieldOrUint (IN UINTN Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINTN OrData) |
UINTN EFIAPI | InternalBaseLibBitFieldAndUint (IN UINTN Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINTN AndData) |
UINT8 EFIAPI | BitFieldRead8 (IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit) |
UINT8 EFIAPI | BitFieldWrite8 (IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value) |
UINT8 EFIAPI | BitFieldOr8 (IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData) |
UINT8 EFIAPI | BitFieldAnd8 (IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData) |
UINT8 EFIAPI | BitFieldAndThenOr8 (IN UINT8 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData) |
UINT16 EFIAPI | BitFieldRead16 (IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit) |
UINT16 EFIAPI | BitFieldWrite16 (IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value) |
UINT16 EFIAPI | BitFieldOr16 (IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData) |
UINT16 EFIAPI | BitFieldAnd16 (IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData) |
UINT16 EFIAPI | BitFieldAndThenOr16 (IN UINT16 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData) |
UINT32 EFIAPI | BitFieldRead32 (IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit) |
UINT32 EFIAPI | BitFieldWrite32 (IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value) |
UINT32 EFIAPI | BitFieldOr32 (IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData) |
UINT32 EFIAPI | BitFieldAnd32 (IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData) |
UINT32 EFIAPI | BitFieldAndThenOr32 (IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData) |
UINT64 EFIAPI | BitFieldRead64 (IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit) |
UINT64 EFIAPI | BitFieldWrite64 (IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 Value) |
UINT64 EFIAPI | BitFieldOr64 (IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 OrData) |
UINT64 EFIAPI | BitFieldAnd64 (IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 AndData) |
UINT64 EFIAPI | BitFieldAndThenOr64 (IN UINT64 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 AndData, IN UINT64 OrData) |
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
UINT16 EFIAPI BitFieldAnd16 | ( | IN UINT16 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT16 | AndData | |||
) |
Reads a bit field from a 16-bit value, performs a bitwise AND, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData. All other bits in Operand are preserved. The new 16-bit value is returned.
If 16-bit operations are not supported, then ASSERT(). If StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..15. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..15. | |
AndData | The value to AND with the read value from the value. |
References ASSERT, and InternalBaseLibBitFieldAndUint().
Referenced by BitFieldAndThenOr16(), IoBitFieldAnd16(), MmioBitFieldAnd16(), PciBitFieldAnd16(), and PciSegmentBitFieldAnd16().
UINT32 EFIAPI BitFieldAnd32 | ( | IN UINT32 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT32 | AndData | |||
) |
Reads a bit field from a 32-bit value, performs a bitwise AND, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData. All other bits in Operand are preserved. The new 32-bit value is returned.
If 32-bit operations are not supported, then ASSERT(). If StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..31. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..31. | |
AndData | The value to AND with the read value from the value. |
References ASSERT, and InternalBaseLibBitFieldAndUint().
Referenced by BitFieldAndThenOr32(), IoBitFieldAnd32(), MmioBitFieldAnd32(), PciBitFieldAnd32(), and PciSegmentBitFieldAnd32().
UINT64 EFIAPI BitFieldAnd64 | ( | IN UINT64 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT64 | AndData | |||
) |
Reads a bit field from a 64-bit value, performs a bitwise AND, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData. All other bits in Operand are preserved. The new 64-bit value is returned.
If 64-bit operations are not supported, then ASSERT(). If StartBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..63. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..63. | |
AndData | The value to AND with the read value from the value. |
References ASSERT, LShiftU64(), and RShiftU64().
Referenced by AsmMsrBitFieldAnd64(), BitFieldAndThenOr64(), IoBitFieldAnd64(), and MmioBitFieldAnd64().
UINT8 EFIAPI BitFieldAnd8 | ( | IN UINT8 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT8 | AndData | |||
) |
Reads a bit field from an 8-bit value, performs a bitwise AND, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData. All other bits in Operand are preserved. The new 8-bit value is returned.
If 8-bit operations are not supported, then ASSERT(). If StartBit is greater than 7, then ASSERT(). If EndBit is greater than 7, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..7. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..7. | |
AndData | The value to AND with the read value from the value. |
References ASSERT, and InternalBaseLibBitFieldAndUint().
Referenced by BitFieldAndThenOr8(), IoBitFieldAnd8(), MmioBitFieldAnd8(), PciBitFieldAnd8(), and PciSegmentBitFieldAnd8().
UINT16 EFIAPI BitFieldAndThenOr16 | ( | IN UINT16 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT16 | AndData, | |||
IN UINT16 | OrData | |||
) |
Reads a bit field from a 16-bit value, performs a bitwise AND followed by a bitwise OR, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData, followed by a bitwise OR with value specified by OrData. All other bits in Operand are preserved. The new 16-bit value is returned.
If 16-bit operations are not supported, then ASSERT(). If StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT(). If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..15. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..15. | |
AndData | The value to AND with the read value from the value. | |
OrData | The value to OR with the result of the AND operation. |
References ASSERT, BitFieldAnd16(), and BitFieldOr16().
Referenced by BitFieldWrite16(), IoBitFieldAndThenOr16(), MmioBitFieldAndThenOr16(), PciBitFieldAndThenOr16(), and PciSegmentBitFieldAndThenOr16().
UINT32 EFIAPI BitFieldAndThenOr32 | ( | IN UINT32 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT32 | AndData, | |||
IN UINT32 | OrData | |||
) |
Reads a bit field from a 32-bit value, performs a bitwise AND followed by a bitwise OR, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData, followed by a bitwise OR with value specified by OrData. All other bits in Operand are preserved. The new 32-bit value is returned.
If 32-bit operations are not supported, then ASSERT(). If StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT(). If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..31. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..31. | |
AndData | The value to AND with the read value from the value. | |
OrData | The value to OR with the result of the AND operation. |
References ASSERT, BitFieldAnd32(), and BitFieldOr32().
Referenced by BitFieldWrite32(), IoBitFieldAndThenOr32(), MmioBitFieldAndThenOr32(), PciBitFieldAndThenOr32(), and PciSegmentBitFieldAndThenOr32().
UINT64 EFIAPI BitFieldAndThenOr64 | ( | IN UINT64 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT64 | AndData, | |||
IN UINT64 | OrData | |||
) |
Reads a bit field from a 64-bit value, performs a bitwise AND followed by a bitwise OR, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData, followed by a bitwise OR with value specified by OrData. All other bits in Operand are preserved. The new 64-bit value is returned.
If 64-bit operations are not supported, then ASSERT(). If StartBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT(). If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..63. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..63. | |
AndData | The value to AND with the read value from the value. | |
OrData | The value to OR with the result of the AND operation. |
References ASSERT, BitFieldAnd64(), and BitFieldOr64().
Referenced by AsmMsrBitFieldAndThenOr64(), BitFieldWrite64(), IoBitFieldAndThenOr64(), and MmioBitFieldAndThenOr64().
UINT8 EFIAPI BitFieldAndThenOr8 | ( | IN UINT8 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT8 | AndData, | |||
IN UINT8 | OrData | |||
) |
Reads a bit field from an 8-bit value, performs a bitwise AND followed by a bitwise OR, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData, followed by a bitwise OR with value specified by OrData. All other bits in Operand are preserved. The new 8-bit value is returned.
If 8-bit operations are not supported, then ASSERT(). If StartBit is greater than 7, then ASSERT(). If EndBit is greater than 7, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT(). If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..7. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..7. | |
AndData | The value to AND with the read value from the value. | |
OrData | The value to OR with the result of the AND operation. |
References ASSERT, BitFieldAnd8(), and BitFieldOr8().
Referenced by BitFieldWrite8(), IoBitFieldAndThenOr8(), MmioBitFieldAndThenOr8(), PciBitFieldAndThenOr8(), and PciSegmentBitFieldAndThenOr8().
UINT16 EFIAPI BitFieldOr16 | ( | IN UINT16 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT16 | OrData | |||
) |
Reads a bit field from a 16-bit value, performs a bitwise OR, and returns the result.
Performs a bitwise OR between the bit field specified by StartBit and EndBit in Operand and the value specified by OrData. All other bits in Operand are preserved. The new 16-bit value is returned.
If 16-bit operations are not supported, then ASSERT(). If StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..15. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..15. | |
OrData | The value to OR with the read value from the value. |
References ASSERT, and InternalBaseLibBitFieldOrUint().
Referenced by BitFieldAndThenOr16(), IoBitFieldOr16(), MmioBitFieldOr16(), PciBitFieldOr16(), and PciSegmentBitFieldOr16().
UINT32 EFIAPI BitFieldOr32 | ( | IN UINT32 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT32 | OrData | |||
) |
Reads a bit field from a 32-bit value, performs a bitwise OR, and returns the result.
Performs a bitwise OR between the bit field specified by StartBit and EndBit in Operand and the value specified by OrData. All other bits in Operand are preserved. The new 32-bit value is returned.
If 32-bit operations are not supported, then ASSERT(). If StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..31. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..31. | |
OrData | The value to OR with the read value from the value. |
References ASSERT, and InternalBaseLibBitFieldOrUint().
Referenced by BitFieldAndThenOr32(), IoBitFieldOr32(), MmioBitFieldOr32(), PciBitFieldOr32(), and PciSegmentBitFieldOr32().
UINT64 EFIAPI BitFieldOr64 | ( | IN UINT64 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT64 | OrData | |||
) |
Reads a bit field from a 64-bit value, performs a bitwise OR, and returns the result.
Performs a bitwise OR between the bit field specified by StartBit and EndBit in Operand and the value specified by OrData. All other bits in Operand are preserved. The new 64-bit value is returned.
If 64-bit operations are not supported, then ASSERT(). If StartBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..63. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..63. | |
OrData | The value to OR with the read value from the value |
References ASSERT, LShiftU64(), and RShiftU64().
Referenced by AsmMsrBitFieldOr64(), BitFieldAndThenOr64(), IoBitFieldOr64(), and MmioBitFieldOr64().
Reads a bit field from an 8-bit value, performs a bitwise OR, and returns the result.
Performs a bitwise OR between the bit field specified by StartBit and EndBit in Operand and the value specified by OrData. All other bits in Operand are preserved. The new 8-bit value is returned.
If 8-bit operations are not supported, then ASSERT(). If StartBit is greater than 7, then ASSERT(). If EndBit is greater than 7, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..7. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..7. | |
OrData | The value to OR with the read value from the value. |
References ASSERT, and InternalBaseLibBitFieldOrUint().
Referenced by BitFieldAndThenOr8(), IoBitFieldOr8(), MmioBitFieldOr8(), PciBitFieldOr8(), and PciSegmentBitFieldOr8().
Returns a bit field from a 16-bit value.
Returns the bitfield specified by the StartBit and the EndBit from Operand.
If 16-bit operations are not supported, then ASSERT(). If StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..15. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..15. |
References ASSERT, and InternalBaseLibBitFieldReadUint().
Referenced by IoBitFieldRead16(), MmioBitFieldRead16(), PciBitFieldRead16(), and PciSegmentBitFieldRead16().
Returns a bit field from a 32-bit value.
Returns the bitfield specified by the StartBit and the EndBit from Operand.
If 32-bit operations are not supported, then ASSERT(). If StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..31. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..31. |
References ASSERT, and InternalBaseLibBitFieldReadUint().
Referenced by AsmMsrBitFieldRead32(), IoBitFieldRead32(), MmioBitFieldRead32(), PciBitFieldRead32(), and PciSegmentBitFieldRead32().
Returns a bit field from a 64-bit value.
Returns the bitfield specified by the StartBit and the EndBit from Operand.
If 64-bit operations are not supported, then ASSERT(). If StartBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..63. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..63. |
References ASSERT, LShiftU64(), and RShiftU64().
Referenced by AsmMsrBitFieldRead64(), InternalGetPciCfg2Ppi(), IoBitFieldRead64(), MmioBitFieldRead64(), and PciSegmentLibSearchForRootBridge().
Returns a bit field from an 8-bit value.
Returns the bitfield specified by the StartBit and the EndBit from Operand.
If 8-bit operations are not supported, then ASSERT(). If StartBit is greater than 7, then ASSERT(). If EndBit is greater than 7, then ASSERT(). If EndBit is less than StartBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..7. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..7. |
References ASSERT, and InternalBaseLibBitFieldReadUint().
Referenced by IoBitFieldRead8(), MmioBitFieldRead8(), PciBitFieldRead8(), and PciSegmentBitFieldRead8().
UINT16 EFIAPI BitFieldWrite16 | ( | IN UINT16 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT16 | Value | |||
) |
Writes a bit field to a 16-bit value, and returns the result.
Writes Value to the bit field specified by the StartBit and the EndBit in Operand. All other bits in Operand are preserved. The new 16-bit value is returned.
If 16-bit operations are not supported, then ASSERT(). If StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..15. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..15. | |
Value | The new value of the bit field. |
References ASSERT, and BitFieldAndThenOr16().
Referenced by IoBitFieldWrite16(), MmioBitFieldWrite16(), PciBitFieldWrite16(), and PciSegmentBitFieldWrite16().
UINT32 EFIAPI BitFieldWrite32 | ( | IN UINT32 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT32 | Value | |||
) |
Writes a bit field to a 32-bit value, and returns the result.
Writes Value to the bit field specified by the StartBit and the EndBit in Operand. All other bits in Operand are preserved. The new 32-bit value is returned.
If 32-bit operations are not supported, then ASSERT(). If StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..31. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..31. | |
Value | The new value of the bit field. |
References ASSERT, and BitFieldAndThenOr32().
Referenced by IoBitFieldWrite32(), MmioBitFieldWrite32(), PciBitFieldWrite32(), PciSegmentBitFieldWrite32(), and WriteUnaligned24().
UINT64 EFIAPI BitFieldWrite64 | ( | IN UINT64 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT64 | Value | |||
) |
Writes a bit field to a 64-bit value, and returns the result.
Writes Value to the bit field specified by the StartBit and the EndBit in Operand. All other bits in Operand are preserved. The new 64-bit value is returned.
If 64-bit operations are not supported, then ASSERT(). If StartBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..63. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..63. | |
Value | The new value of the bit field. |
References ASSERT, and BitFieldAndThenOr64().
Referenced by AsmMsrBitFieldWrite64(), IoBitFieldWrite64(), and MmioBitFieldWrite64().
UINT8 EFIAPI BitFieldWrite8 | ( | IN UINT8 | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINT8 | Value | |||
) |
Writes a bit field to an 8-bit value, and returns the result.
Writes Value to the bit field specified by the StartBit and the EndBit in Operand. All other bits in Operand are preserved. The new 8-bit value is returned.
If 8-bit operations are not supported, then ASSERT(). If StartBit is greater than 7, then ASSERT(). If EndBit is greater than 7, then ASSERT(). If EndBit is less than StartBit, then ASSERT(). If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. Range 0..7. | |
EndBit | The ordinal of the most significant bit in the bit field. Range 0..7. | |
Value | The new value of the bit field. |
References ASSERT, and BitFieldAndThenOr8().
Referenced by IoBitFieldWrite8(), MmioBitFieldWrite8(), PciBitFieldWrite8(), and PciSegmentBitFieldWrite8().
UINTN EFIAPI InternalBaseLibBitFieldAndUint | ( | IN UINTN | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINTN | AndData | |||
) |
Worker function that reads a bit field from Operand, performs a bitwise AND, and returns the result.
Performs a bitwise AND between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData. All other bits in Operand are preserved. The new value is returned.
If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. | |
EndBit | The ordinal of the most significant bit in the bit field. | |
AndData | The value to And with the read value from the value. |
References ASSERT.
Referenced by BitFieldAnd16(), BitFieldAnd32(), and BitFieldAnd8().
UINTN EFIAPI InternalBaseLibBitFieldOrUint | ( | IN UINTN | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit, | |||
IN UINTN | OrData | |||
) |
Worker function that reads a bit field from Operand, performs a bitwise OR, and returns the result.
Performs a bitwise OR between the bit field specified by StartBit and EndBit in Operand and the value specified by AndData. All other bits in Operand are preserved. The new value is returned.
If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. | |
EndBit | The ordinal of the most significant bit in the bit field. | |
OrData | The value to OR with the read value from the value. |
References ASSERT.
Referenced by BitFieldOr16(), BitFieldOr32(), and BitFieldOr8().
UINTN EFIAPI InternalBaseLibBitFieldReadUint | ( | IN UINTN | Operand, | |
IN UINTN | StartBit, | |||
IN UINTN | EndBit | |||
) |
Worker function that returns a bit field from Operand.
Returns the bitfield specified by the StartBit and the EndBit from Operand.
Operand | Operand on which to perform the bitfield operation. | |
StartBit | The ordinal of the least significant bit in the bit field. | |
EndBit | The ordinal of the most significant bit in the bit field. |
Referenced by BitFieldRead16(), BitFieldRead32(), and BitFieldRead8().