MdePkg[all]
1.08
|
Macros | |
#define | IO_LIB_ADDRESS(Segment, Port) ( ((Port) & 0xffff) | (((Segment) & 0xffff) << 16) ) |
Provide services to access I/O Ports and MMIO registers.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
#define IO_LIB_ADDRESS | ( | Segment, | |
Port | |||
) | ( ((Port) & 0xffff) | (((Segment) & 0xffff) << 16) ) |
Macro that converts PCI Segment and I/O Port to an address that can be passed to the I/O Library functions.
Computes an address that is compatible with the I/O Library functions. The unused upper bits of Segment, and Port are stripped prior to the generation of the address.
Segment | PCI Segment number. Range 0..65535. |
Port | I/O Port number. Range 0..65535. |
Reads a 16-bit I/O port, performs a bitwise AND, and writes the result back to the 16-bit I/O port.
Reads the 16-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 16-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, then ASSERT().
Port | The I/O port to write. |
AndData | The value to AND with the read value from the I/O port. |
Reads a 32-bit I/O port, performs a bitwise AND, and writes the result back to the 32-bit I/O port.
Reads the 32-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 32-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, then ASSERT().
Port | The I/O port to write. |
AndData | The value to AND with the read value from the I/O port. |
Reads a 64-bit I/O port, performs a bitwise AND, and writes the result back to the 64-bit I/O port.
Reads the 64-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 64-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, then ASSERT().
Port | The I/O port to write. |
AndData | The value to AND with the read value from the I/O port. |
Reads an 8-bit I/O port, performs a bitwise AND, and writes the result back to the 8-bit I/O port.
Reads the 8-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 8-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to write. |
AndData | The value to AND with the read value from the I/O port. |
Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 16-bit I/O port.
Reads the 16-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, performs a bitwise OR between the result of the AND operation and the value specified by OrData, and writes the result to the 16-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, then ASSERT().
Port | The I/O port to write. |
AndData | The value to AND with the read value from the I/O port. |
OrData | The value to OR with the result of the AND operation. |
Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 32-bit I/O port.
Reads the 32-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, performs a bitwise OR between the result of the AND operation and the value specified by OrData, and writes the result to the 32-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, then ASSERT().
Port | The I/O port to write. |
AndData | The value to AND with the read value from the I/O port. |
OrData | The value to OR with the result of the AND operation. |
Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 64-bit I/O port.
Reads the 64-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, performs a bitwise OR between the result of the AND operation and the value specified by OrData, and writes the result to the 64-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, then ASSERT().
Port | The I/O port to write. |
AndData | The value to AND with the read value from the I/O port. |
OrData | The value to OR with the result of the AND operation. |
Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 8-bit I/O port.
Reads the 8-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, performs a bitwise OR between the result of the AND operation and the value specified by OrData, and writes the result to the 8-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to write. |
AndData | The value to AND with the read value from the I/O port. |
OrData | The value to OR with the result of the AND operation. |
UINT16 EFIAPI IoBitFieldAnd16 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | AndData | ||
) |
Reads a bit field in a 16-bit port, performs a bitwise AND, and writes the result back to the bit field in the 16-bit port.
Reads the 16-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 16-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in AndData are stripped.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
UINT32 EFIAPI IoBitFieldAnd32 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | AndData | ||
) |
Reads a bit field in a 32-bit port, performs a bitwise AND, and writes the result back to the bit field in the 32-bit port.
Reads the 32-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 32-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in AndData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
UINT64 EFIAPI IoBitFieldAnd64 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT64 | AndData | ||
) |
Reads a bit field in a 64-bit port, performs a bitwise AND, and writes the result back to the bit field in the 64-bit port.
Reads the 64-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 64-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in AndData are stripped.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
Reads a bit field in an 8-bit port, performs a bitwise AND, and writes the result back to the bit field in the 8-bit port.
Reads the 8-bit I/O port specified by Port, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 8-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in AndData are stripped.
If 8-bit I/O port 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().
Port | The I/O port to write. |
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 I/O port. |
UINT16 EFIAPI IoBitFieldAndThenOr16 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | AndData, | ||
IN UINT16 | OrData | ||
) |
Reads a bit field in a 16-bit port, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the 16-bit port.
Reads the 16-bit I/O port specified by Port, performs a bitwise AND followed by a bitwise OR between the read result and the value specified by AndData, and writes the result to the 16-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in both AndData and OrData are stripped.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
OrData | The value to OR with the result of the AND operation. |
UINT32 EFIAPI IoBitFieldAndThenOr32 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | AndData, | ||
IN UINT32 | OrData | ||
) |
Reads a bit field in a 32-bit port, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the 32-bit port.
Reads the 32-bit I/O port specified by Port, performs a bitwise AND followed by a bitwise OR between the read result and the value specified by AndData, and writes the result to the 32-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in both AndData and OrData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
OrData | The value to OR with the result of the AND operation. |
UINT64 EFIAPI IoBitFieldAndThenOr64 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT64 | AndData, | ||
IN UINT64 | OrData | ||
) |
Reads a bit field in a 64-bit port, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the 64-bit port.
Reads the 64-bit I/O port specified by Port, performs a bitwise AND followed by a bitwise OR between the read result and the value specified by AndData, and writes the result to the 64-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in both AndData and OrData are stripped.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
OrData | The value to OR with the result of the AND operation. |
UINT8 EFIAPI IoBitFieldAndThenOr8 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | AndData, | ||
IN UINT8 | OrData | ||
) |
Reads a bit field in an 8-bit port, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the 8-bit port.
Reads the 8-bit I/O port specified by Port, performs a bitwise AND followed by a bitwise OR between the read result and the value specified by AndData, and writes the result to the 8-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in both AndData and OrData are stripped.
If 8-bit I/O port 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().
Port | The I/O port to write. |
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 I/O port. |
OrData | The value to OR with the result of the AND operation. |
UINT16 EFIAPI IoBitFieldOr16 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | OrData | ||
) |
Reads a bit field in a 16-bit port, performs a bitwise OR, and writes the result back to the bit field in the 16-bit port.
Reads the 16-bit I/O port specified by Port, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 16-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in OrData are stripped.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
UINT32 EFIAPI IoBitFieldOr32 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | OrData | ||
) |
Reads a bit field in a 32-bit port, performs a bitwise OR, and writes the result back to the bit field in the 32-bit port.
Reads the 32-bit I/O port specified by Port, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 32-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in OrData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
UINT64 EFIAPI IoBitFieldOr64 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT64 | OrData | ||
) |
Reads a bit field in a 64-bit port, performs a bitwise OR, and writes the result back to the bit field in the 64-bit port.
Reads the 64-bit I/O port specified by Port, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 64-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in OrData are stripped.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, 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().
Port | The I/O port to write. |
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 I/O port. |
Reads a bit field in an 8-bit port, performs a bitwise OR, and writes the result back to the bit field in the 8-bit port.
Reads the 8-bit I/O port specified by Port, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 8-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized. Extra left bits in OrData are stripped.
If 8-bit I/O port 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().
Port | The I/O port to write. |
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 I/O port. |
Reads a bit field of an I/O register.
Reads the bit field in a 16-bit I/O register. The bit field is specified by the StartBit and the EndBit. The value of the bit field is returned.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, 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().
Port | The I/O port to read. |
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. |
Reads a bit field of an I/O register.
Reads the bit field in a 32-bit I/O register. The bit field is specified by the StartBit and the EndBit. The value of the bit field is returned.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, 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().
Port | The I/O port to read. |
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. |
Reads a bit field of an I/O register.
Reads the bit field in a 64-bit I/O register. The bit field is specified by the StartBit and the EndBit. The value of the bit field is returned.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, 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().
Port | The I/O port to read. |
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. |
Reads a bit field of an I/O register.
Reads the bit field in an 8-bit I/O register. The bit field is specified by the StartBit and the EndBit. The value of the bit field is returned.
If 8-bit I/O port 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().
Port | The I/O port to read. |
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. |
UINT16 EFIAPI IoBitFieldWrite16 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | Value | ||
) |
Writes a bit field to an I/O register.
Writes Value to the bit field of the I/O register. The bit field is specified by the StartBit and the EndBit. All other bits in the destination I/O register are preserved. The value written to the I/O port is returned. Extra left bits in Value are stripped.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, 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().
Port | The I/O port to write. |
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 | New value of the bit field. |
UINT32 EFIAPI IoBitFieldWrite32 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | Value | ||
) |
Writes a bit field to an I/O register.
Writes Value to the bit field of the I/O register. The bit field is specified by the StartBit and the EndBit. All other bits in the destination I/O register are preserved. The value written to the I/O port is returned. Extra left bits in Value are stripped.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, 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().
Port | The I/O port to write. |
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 | New value of the bit field. |
UINT64 EFIAPI IoBitFieldWrite64 | ( | IN UINTN | Port, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT64 | Value | ||
) |
Writes a bit field to an I/O register.
Writes Value to the bit field of the I/O register. The bit field is specified by the StartBit and the EndBit. All other bits in the destination I/O register are preserved. The value written to the I/O port is returned. Extra left bits in Value are stripped.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, 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().
Port | The I/O port to write. |
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 | New value of the bit field. |
Writes a bit field to an I/O register.
Writes Value to the bit field of the I/O register. The bit field is specified by the StartBit and the EndBit. All other bits in the destination I/O register are preserved. The value written to the I/O port is returned.
If 8-bit I/O port 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().
Port | The I/O port to write. |
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 | New value of the bit field. |
Reads a 16-bit I/O port, performs a bitwise OR, and writes the result back to the 16-bit I/O port.
Reads the 16-bit I/O port specified by Port, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 16-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, then ASSERT().
Port | The I/O port to write. |
OrData | The value to OR with the read value from the I/O port. |
Reads a 32-bit I/O port, performs a bitwise OR, and writes the result back to the 32-bit I/O port.
Reads the 32-bit I/O port specified by Port, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 32-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, then ASSERT().
Port | The I/O port to write. |
OrData | The value to OR with the read value from the I/O port. |
Reads a 64-bit I/O port, performs a bitwise OR, and writes the result back to the 64-bit I/O port.
Reads the 64-bit I/O port specified by Port, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 64-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, then ASSERT().
Port | The I/O port to write. |
OrData | The value to OR with the read value from the I/O port. |
Reads an 8-bit I/O port, performs a bitwise OR, and writes the result back to the 8-bit I/O port.
Reads the 8-bit I/O port specified by Port, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 8-bit I/O port specified by Port. The value written to the I/O port is returned. This function must guarantee that all I/O read and write operations are serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to write. |
OrData | The value to OR with the read value from the I/O port. |
Reads a 16-bit I/O port.
Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, then ASSERT().
Port | The I/O port to read. |
Reads a 32-bit I/O port.
Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, then ASSERT().
Port | The I/O port to read. |
Reads a 64-bit I/O port.
Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, then ASSERT().
Port | The I/O port to read. |
Reads an 8-bit I/O port.
Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to read. |
Reads a 16-bit I/O port fifo into a block of memory.
Reads the 16-bit I/O fifo port specified by Port. The port is read Count times, and the read data is stored in the provided Buffer.
This function must guarantee that all I/O read and write operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to read. |
Count | The number of times to read I/O port. |
Buffer | The buffer to store the read data into. |
Reads a 32-bit I/O port fifo into a block of memory.
Reads the 32-bit I/O fifo port specified by Port. The port is read Count times, and the read data is stored in the provided Buffer.
This function must guarantee that all I/O read and write operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to read. |
Count | The number of times to read I/O port. |
Buffer | The buffer to store the read data into. |
Reads an 8-bit I/O port fifo into a block of memory.
Reads the 8-bit I/O fifo port specified by Port. The port is read Count times, and the read data is stored in the provided Buffer.
This function must guarantee that all I/O read and write operations are serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to read. |
Count | The number of times to read I/O port. |
Buffer | The buffer to store the read data into. |
Writes a 16-bit I/O port.
Writes the 16-bit I/O port specified by Port with the value specified by Value and returns Value. This function must guarantee that all I/O read and write operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 16-bit boundary, then ASSERT().
Port | The I/O port to write. |
Value | The value to write to the I/O port. |
Writes a 32-bit I/O port.
Writes the 32-bit I/O port specified by Port with the value specified by Value and returns Value. This function must guarantee that all I/O read and write operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 32-bit boundary, then ASSERT().
Port | The I/O port to write. |
Value | The value to write to the I/O port. |
Writes a 64-bit I/O port.
Writes the 64-bit I/O port specified by Port with the value specified by Value and returns Value. This function must guarantee that all I/O read and write operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT(). If Port is not aligned on a 64-bit boundary, then ASSERT().
Port | The I/O port to write. |
Value | The value to write to the I/O port. |
Writes an 8-bit I/O port.
Writes the 8-bit I/O port specified by Port with the value specified by Value and returns Value. This function must guarantee that all I/O read and write operations are serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to write. |
Value | The value to write to the I/O port. |
Writes a block of memory into a 16-bit I/O port fifo.
Writes the 16-bit I/O fifo port specified by Port. The port is written Count times, and the write data is retrieved from the provided Buffer.
This function must guarantee that all I/O write and write operations are serialized.
If 16-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to write. |
Count | The number of times to write I/O port. |
Buffer | The buffer to retrieve the write data from. |
Writes a block of memory into a 32-bit I/O port fifo.
Writes the 32-bit I/O fifo port specified by Port. The port is written Count times, and the write data is retrieved from the provided Buffer.
This function must guarantee that all I/O write and write operations are serialized.
If 32-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to write. |
Count | The number of times to write I/O port. |
Buffer | The buffer to retrieve the write data from. |
Writes a block of memory into an 8-bit I/O port fifo.
Writes the 8-bit I/O fifo port specified by Port. The port is written Count times, and the write data is retrieved from the provided Buffer.
This function must guarantee that all I/O write and write operations are serialized.
If 8-bit I/O port operations are not supported, then ASSERT().
Port | The I/O port to write. |
Count | The number of times to write I/O port. |
Buffer | The buffer to retrieve the write data from. |
Reads a 16-bit MMIO register, performs a bitwise AND, and writes the result back to the 16-bit MMIO register.
Reads the 16-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 16-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, then ASSERT().
Address | The MMIO register to write. |
AndData | The value to AND with the read value from the MMIO register. |
Reads a 32-bit MMIO register, performs a bitwise AND, and writes the result back to the 32-bit MMIO register.
Reads the 32-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 32-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT().
Address | The MMIO register to write. |
AndData | The value to AND with the read value from the MMIO register. |
Reads a 64-bit MMIO register, performs a bitwise AND, and writes the result back to the 64-bit MMIO register.
Reads the 64-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 64-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, then ASSERT().
Address | The MMIO register to write. |
AndData | The value to AND with the read value from the MMIO register. |
Reads an 8-bit MMIO register, performs a bitwise AND, and writes the result back to the 8-bit MMIO register.
Reads the 8-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 8-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 8-bit MMIO register operations are not supported, then ASSERT().
Address | The MMIO register to write. |
AndData | The value to AND with the read value from the MMIO register. |
Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 16-bit MMIO register.
Reads the 16-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, performs a bitwise OR between the result of the AND operation and the value specified by OrData, and writes the result to the 16-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, then ASSERT().
Address | The MMIO register to write. |
AndData | The value to AND with the read value from the MMIO register. |
OrData | The value to OR with the result of the AND operation. |
Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 32-bit MMIO register.
Reads the 32-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, performs a bitwise OR between the result of the AND operation and the value specified by OrData, and writes the result to the 32-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT().
Address | The MMIO register to write. |
AndData | The value to AND with the read value from the MMIO register. |
OrData | The value to OR with the result of the AND operation. |
Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 64-bit MMIO register.
Reads the 64-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, performs a bitwise OR between the result of the AND operation and the value specified by OrData, and writes the result to the 64-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, then ASSERT().
Address | The MMIO register to write. |
AndData | The value to AND with the read value from the MMIO register. |
OrData | The value to OR with the result of the AND operation. |
Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 8-bit MMIO register.
Reads the 8-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, performs a bitwise OR between the result of the AND operation and the value specified by OrData, and writes the result to the 8-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 8-bit MMIO register operations are not supported, then ASSERT().
Address | The MMIO register to write. |
AndData | The value to AND with the read value from the MMIO register. |
OrData | The value to OR with the result of the AND operation. |
UINT16 EFIAPI MmioBitFieldAnd16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | AndData | ||
) |
Reads a bit field in a 16-bit MMIO register, performs a bitwise AND, and writes the result back to the bit field in the 16-bit MMIO register.
Reads the 16-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 16-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in AndData are stripped.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
UINT32 EFIAPI MmioBitFieldAnd32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | AndData | ||
) |
Reads a bit field in a 32-bit MMIO register, performs a bitwise AND, and writes the result back to the bit field in the 32-bit MMIO register.
Reads the 32-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 32-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in AndData are stripped.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
UINT64 EFIAPI MmioBitFieldAnd64 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT64 | AndData | ||
) |
Reads a bit field in a 64-bit MMIO register, performs a bitwise AND, and writes the result back to the bit field in the 64-bit MMIO register.
Reads the 64-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 64-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in AndData are stripped.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
UINT8 EFIAPI MmioBitFieldAnd8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | AndData | ||
) |
Reads a bit field in an 8-bit MMIO register, performs a bitwise AND, and writes the result back to the bit field in the 8-bit MMIO register.
Reads the 8-bit MMIO register specified by Address, performs a bitwise AND between the read result and the value specified by AndData, and writes the result to the 8-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in AndData are stripped.
If 8-bit MMIO register 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
UINT16 EFIAPI MmioBitFieldAndThenOr16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | AndData, | ||
IN UINT16 | OrData | ||
) |
Reads a bit field in a 16-bit MMIO register, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the 16-bit MMIO register.
Reads the 16-bit MMIO register specified by Address, performs a bitwise AND followed by a bitwise OR between the read result and the value specified by AndData, and writes the result to the 16-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in both AndData and OrData are stripped.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
OrData | The value to OR with the result of the AND operation. |
UINT32 EFIAPI MmioBitFieldAndThenOr32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | AndData, | ||
IN UINT32 | OrData | ||
) |
Reads a bit field in a 32-bit MMIO register, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the 32-bit MMIO register.
Reads the 32-bit MMIO register specified by Address, performs a bitwise AND followed by a bitwise OR between the read result and the value specified by AndData, and writes the result to the 32-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in both AndData and OrData are stripped.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
OrData | The value to OR with the result of the AND operation. |
UINT64 EFIAPI MmioBitFieldAndThenOr64 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT64 | AndData, | ||
IN UINT64 | OrData | ||
) |
Reads a bit field in a 64-bit MMIO register, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the 64-bit MMIO register.
Reads the 64-bit MMIO register specified by Address, performs a bitwise AND followed by a bitwise OR between the read result and the value specified by AndData, and writes the result to the 64-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in both AndData and OrData are stripped.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
OrData | The value to OR with the result of the AND operation. |
UINT8 EFIAPI MmioBitFieldAndThenOr8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | AndData, | ||
IN UINT8 | OrData | ||
) |
Reads a bit field in an 8-bit MMIO register, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the 8-bit MMIO register.
Reads the 8-bit MMIO register specified by Address, performs a bitwise AND followed by a bitwise OR between the read result and the value specified by AndData, and writes the result to the 8-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in both AndData and OrData are stripped.
If 8-bit MMIO register 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
OrData | The value to OR with the result of the AND operation. |
UINT16 EFIAPI MmioBitFieldOr16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | OrData | ||
) |
Reads a bit field in a 16-bit MMIO register, performs a bitwise OR, and writes the result back to the bit field in the 16-bit MMIO register.
Reads the 16-bit MMIO register specified by Address, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 16-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in OrData are stripped.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
UINT32 EFIAPI MmioBitFieldOr32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | OrData | ||
) |
Reads a bit field in a 32-bit MMIO register, performs a bitwise OR, and writes the result back to the bit field in the 32-bit MMIO register.
Reads the 32-bit MMIO register specified by Address, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 32-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in OrData are stripped.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
UINT64 EFIAPI MmioBitFieldOr64 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT64 | OrData | ||
) |
Reads a bit field in a 64-bit MMIO register, performs a bitwise OR, and writes the result back to the bit field in the 64-bit MMIO register.
Reads the 64-bit MMIO register specified by Address, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 64-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in OrData are stripped.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
UINT8 EFIAPI MmioBitFieldOr8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | OrData | ||
) |
Reads a bit field in an 8-bit MMIO register, performs a bitwise OR, and writes the result back to the bit field in the 8-bit MMIO register.
Reads the 8-bit MMIO register specified by Address, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 8-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized. Extra left bits in OrData are stripped.
If 8-bit MMIO register 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().
Address | MMIO register to write. |
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 read value from the MMIO register. |
Reads a bit field of a MMIO register.
Reads the bit field in a 16-bit MMIO register. The bit field is specified by the StartBit and the EndBit. The value of the bit field is returned.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, 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().
Address | MMIO register to read. |
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. |
Reads a bit field of a MMIO register.
Reads the bit field in a 32-bit MMIO register. The bit field is specified by the StartBit and the EndBit. The value of the bit field is returned.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, 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().
Address | MMIO register to read. |
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. |
Reads a bit field of a MMIO register.
Reads the bit field in a 64-bit MMIO register. The bit field is specified by the StartBit and the EndBit. The value of the bit field is returned.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, 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().
Address | MMIO register to read. |
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. |
Reads a bit field of a MMIO register.
Reads the bit field in an 8-bit MMIO register. The bit field is specified by the StartBit and the EndBit. The value of the bit field is returned.
If 8-bit MMIO register 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().
Address | MMIO register to read. |
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. |
UINT16 EFIAPI MmioBitFieldWrite16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | Value | ||
) |
Writes a bit field to a MMIO register.
Writes Value to the bit field of the MMIO register. The bit field is specified by the StartBit and the EndBit. All other bits in the destination MMIO register are preserved. The new value of the 16-bit register is returned.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, 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().
Address | MMIO register to write. |
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 | New value of the bit field. |
UINT32 EFIAPI MmioBitFieldWrite32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | Value | ||
) |
Writes a bit field to a MMIO register.
Writes Value to the bit field of the MMIO register. The bit field is specified by the StartBit and the EndBit. All other bits in the destination MMIO register are preserved. The new value of the 32-bit register is returned.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, 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().
Address | MMIO register to write. |
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 | New value of the bit field. |
UINT64 EFIAPI MmioBitFieldWrite64 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT64 | Value | ||
) |
Writes a bit field to a MMIO register.
Writes Value to the bit field of the MMIO register. The bit field is specified by the StartBit and the EndBit. All other bits in the destination MMIO register are preserved. The new value of the 64-bit register is returned.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, 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().
Address | MMIO register to write. |
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 | New value of the bit field. |
UINT8 EFIAPI MmioBitFieldWrite8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | Value | ||
) |
Writes a bit field to a MMIO register.
Writes Value to the bit field of the MMIO register. The bit field is specified by the StartBit and the EndBit. All other bits in the destination MMIO register are preserved. The new value of the 8-bit register is returned.
If 8-bit MMIO register 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().
Address | MMIO register to write. |
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 | New value of the bit field. |
Reads a 16-bit MMIO register, performs a bitwise OR, and writes the result back to the 16-bit MMIO register.
Reads the 16-bit MMIO register specified by Address, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 16-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, then ASSERT().
Address | The MMIO register to write. |
OrData | The value to OR with the read value from the MMIO register. |
Reads a 32-bit MMIO register, performs a bitwise OR, and writes the result back to the 32-bit MMIO register.
Reads the 32-bit MMIO register specified by Address, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 32-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT().
Address | The MMIO register to write. |
OrData | The value to OR with the read value from the MMIO register. |
Reads a 64-bit MMIO register, performs a bitwise OR, and writes the result back to the 64-bit MMIO register.
Reads the 64-bit MMIO register specified by Address, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 64-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, then ASSERT().
Address | The MMIO register to write. |
OrData | The value to OR with the read value from the MMIO register. |
Reads an 8-bit MMIO register, performs a bitwise OR, and writes the result back to the 8-bit MMIO register.
Reads the 8-bit MMIO register specified by Address, performs a bitwise OR between the read result and the value specified by OrData, and writes the result to the 8-bit MMIO register specified by Address. The value written to the MMIO register is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 8-bit MMIO register operations are not supported, then ASSERT().
Address | The MMIO register to write. |
OrData | The value to OR with the read value from the MMIO register. |
Reads a 16-bit MMIO register.
Reads the 16-bit MMIO register specified by Address. The 16-bit read value is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, then ASSERT().
Address | The MMIO register to read. |
Reads a 32-bit MMIO register.
Reads the 32-bit MMIO register specified by Address. The 32-bit read value is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT().
Address | The MMIO register to read. |
Reads a 64-bit MMIO register.
Reads the 64-bit MMIO register specified by Address. The 64-bit read value is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, then ASSERT().
Address | The MMIO register to read. |
Reads an 8-bit MMIO register.
Reads the 8-bit MMIO register specified by Address. The 8-bit read value is returned. This function must guarantee that all MMIO read and write operations are serialized.
If 8-bit MMIO register operations are not supported, then ASSERT().
Address | The MMIO register to read. |
Copy data from MMIO region to system memory by using 16-bit access.
Copy data from MMIO region specified by starting address StartAddress to system memory specified by Buffer by using 16-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.
If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT(). If Buffer is not aligned on a 16-bit boundary, then ASSERT().
StartAddress | Starting address for the MMIO region to be copied from. |
Length | The size, in bytes, of Buffer. |
Buffer | Pointer to a system memory buffer receiving the data read. |
Copy data from MMIO region to system memory by using 32-bit access.
Copy data from MMIO region specified by starting address StartAddress to system memory specified by Buffer by using 32-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.
If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT(). If Buffer is not aligned on a 32-bit boundary, then ASSERT().
StartAddress | Starting address for the MMIO region to be copied from. |
Length | The size, in bytes, of Buffer. |
Buffer | Pointer to a system memory buffer receiving the data read. |
Copy data from MMIO region to system memory by using 64-bit access.
Copy data from MMIO region specified by starting address StartAddress to system memory specified by Buffer by using 64-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.
If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT(). If Buffer is not aligned on a 64-bit boundary, then ASSERT().
StartAddress | Starting address for the MMIO region to be copied from. |
Length | The size, in bytes, of Buffer. |
Buffer | Pointer to a system memory buffer receiving the data read. |
Copy data from MMIO region to system memory by using 8-bit access.
Copy data from MMIO region specified by starting address StartAddress to system memory specified by Buffer by using 8-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
StartAddress | Starting address for the MMIO region to be copied from. |
Length | The size, in bytes, of Buffer. |
Buffer | Pointer to a system memory buffer receiving the data read. |
Writes a 16-bit MMIO register.
Writes the 16-bit MMIO register specified by Address with the value specified by Value and returns Value. This function must guarantee that all MMIO read and write operations are serialized.
If 16-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 16-bit boundary, then ASSERT().
Address | The MMIO register to write. |
Value | The value to write to the MMIO register. |
Writes a 32-bit MMIO register.
Writes the 32-bit MMIO register specified by Address with the value specified by Value and returns Value. This function must guarantee that all MMIO read and write operations are serialized.
If 32-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 32-bit boundary, then ASSERT().
Address | The MMIO register to write. |
Value | The value to write to the MMIO register. |
Writes a 64-bit MMIO register.
Writes the 64-bit MMIO register specified by Address with the value specified by Value and returns Value. This function must guarantee that all MMIO read and write operations are serialized.
If 64-bit MMIO register operations are not supported, then ASSERT(). If Address is not aligned on a 64-bit boundary, then ASSERT().
Address | The MMIO register to write. |
Value | The value to write to the MMIO register. |
Writes an 8-bit MMIO register.
Writes the 8-bit MMIO register specified by Address with the value specified by Value and returns Value. This function must guarantee that all MMIO read and write operations are serialized.
If 8-bit MMIO register operations are not supported, then ASSERT().
Address | The MMIO register to write. |
Value | The value to write to the MMIO register. |
UINT16* EFIAPI MmioWriteBuffer16 | ( | IN UINTN | StartAddress, |
IN UINTN | Length, | ||
IN CONST UINT16 * | Buffer | ||
) |
Copy data from system memory to MMIO region by using 16-bit access.
Copy data from system memory specified by Buffer to MMIO region specified by starting address StartAddress by using 16-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.
If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
If Length is not aligned on a 16-bit boundary, then ASSERT().
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
StartAddress | Starting address for the MMIO region to be copied to. |
Length | The size, in bytes, of Buffer. |
Buffer | Pointer to a system memory buffer containing the data to write. |
UINT32* EFIAPI MmioWriteBuffer32 | ( | IN UINTN | StartAddress, |
IN UINTN | Length, | ||
IN CONST UINT32 * | Buffer | ||
) |
Copy data from system memory to MMIO region by using 32-bit access.
Copy data from system memory specified by Buffer to MMIO region specified by starting address StartAddress by using 32-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.
If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
If Length is not aligned on a 32-bit boundary, then ASSERT().
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
StartAddress | Starting address for the MMIO region to be copied to. |
Length | The size, in bytes, of Buffer. |
Buffer | Pointer to a system memory buffer containing the data to write. |
UINT64* EFIAPI MmioWriteBuffer64 | ( | IN UINTN | StartAddress, |
IN UINTN | Length, | ||
IN CONST UINT64 * | Buffer | ||
) |
Copy data from system memory to MMIO region by using 64-bit access.
Copy data from system memory specified by Buffer to MMIO region specified by starting address StartAddress by using 64-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.
If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
If Length is not aligned on a 64-bit boundary, then ASSERT().
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
StartAddress | Starting address for the MMIO region to be copied to. |
Length | The size, in bytes, of Buffer. |
Buffer | Pointer to a system memory buffer containing the data to write. |
Copy data from system memory to MMIO region by using 8-bit access.
Copy data from system memory specified by Buffer to MMIO region specified by starting address StartAddress by using 8-bit access. The total number of byte to be copied is specified by Length. Buffer is returned.
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
StartAddress | Starting address for the MMIO region to be copied to. |
Length | The size, in bytes, of Buffer. |
Buffer | Pointer to a system memory buffer containing the data to write. |