TianoCore EDK2 master
Loading...
Searching...
No Matches
IoLib.h File Reference

Go to the source code of this file.

Macros

#define IO_LIB_ADDRESS(Segment, Port)    ( ((Port) & 0xffff) | (((Segment) & 0xffff) << 16) )
 

Functions

UINT8 EFIAPI IoRead8 (IN UINTN Port)
 
UINT8 EFIAPI IoWrite8 (IN UINTN Port, IN UINT8 Value)
 
VOID EFIAPI IoReadFifo8 (IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
 
VOID EFIAPI IoWriteFifo8 (IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
 
UINT8 EFIAPI IoOr8 (IN UINTN Port, IN UINT8 OrData)
 
UINT8 EFIAPI IoAnd8 (IN UINTN Port, IN UINT8 AndData)
 
UINT8 EFIAPI IoAndThenOr8 (IN UINTN Port, IN UINT8 AndData, IN UINT8 OrData)
 
UINT8 EFIAPI IoBitFieldRead8 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit)
 
UINT8 EFIAPI IoBitFieldWrite8 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value)
 
UINT8 EFIAPI IoBitFieldOr8 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData)
 
UINT8 EFIAPI IoBitFieldAnd8 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData)
 
UINT8 EFIAPI IoBitFieldAndThenOr8 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData)
 
UINT16 EFIAPI IoRead16 (IN UINTN Port)
 
UINT16 EFIAPI IoWrite16 (IN UINTN Port, IN UINT16 Value)
 
VOID EFIAPI IoReadFifo16 (IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
 
VOID EFIAPI IoWriteFifo16 (IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
 
UINT16 EFIAPI IoOr16 (IN UINTN Port, IN UINT16 OrData)
 
UINT16 EFIAPI IoAnd16 (IN UINTN Port, IN UINT16 AndData)
 
UINT16 EFIAPI IoAndThenOr16 (IN UINTN Port, IN UINT16 AndData, IN UINT16 OrData)
 
UINT16 EFIAPI IoBitFieldRead16 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit)
 
UINT16 EFIAPI IoBitFieldWrite16 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value)
 
UINT16 EFIAPI IoBitFieldOr16 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData)
 
UINT16 EFIAPI IoBitFieldAnd16 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData)
 
UINT16 EFIAPI IoBitFieldAndThenOr16 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData)
 
UINT32 EFIAPI IoRead32 (IN UINTN Port)
 
UINT32 EFIAPI IoWrite32 (IN UINTN Port, IN UINT32 Value)
 
VOID EFIAPI IoReadFifo32 (IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
 
VOID EFIAPI IoWriteFifo32 (IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
 
UINT32 EFIAPI IoOr32 (IN UINTN Port, IN UINT32 OrData)
 
UINT32 EFIAPI IoAnd32 (IN UINTN Port, IN UINT32 AndData)
 
UINT32 EFIAPI IoAndThenOr32 (IN UINTN Port, IN UINT32 AndData, IN UINT32 OrData)
 
UINT32 EFIAPI IoBitFieldRead32 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit)
 
UINT32 EFIAPI IoBitFieldWrite32 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
 
UINT32 EFIAPI IoBitFieldOr32 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData)
 
UINT32 EFIAPI IoBitFieldAnd32 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData)
 
UINT32 EFIAPI IoBitFieldAndThenOr32 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData)
 
UINT64 EFIAPI IoRead64 (IN UINTN Port)
 
UINT64 EFIAPI IoWrite64 (IN UINTN Port, IN UINT64 Value)
 
UINT64 EFIAPI IoOr64 (IN UINTN Port, IN UINT64 OrData)
 
UINT64 EFIAPI IoAnd64 (IN UINTN Port, IN UINT64 AndData)
 
UINT64 EFIAPI IoAndThenOr64 (IN UINTN Port, IN UINT64 AndData, IN UINT64 OrData)
 
UINT64 EFIAPI IoBitFieldRead64 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit)
 
UINT64 EFIAPI IoBitFieldWrite64 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 Value)
 
UINT64 EFIAPI IoBitFieldOr64 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 OrData)
 
UINT64 EFIAPI IoBitFieldAnd64 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 AndData)
 
UINT64 EFIAPI IoBitFieldAndThenOr64 (IN UINTN Port, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 AndData, IN UINT64 OrData)
 
UINT8 EFIAPI MmioRead8 (IN UINTN Address)
 
UINT8 EFIAPI MmioWrite8 (IN UINTN Address, IN UINT8 Value)
 
UINT8 EFIAPI MmioOr8 (IN UINTN Address, IN UINT8 OrData)
 
UINT8 EFIAPI MmioAnd8 (IN UINTN Address, IN UINT8 AndData)
 
UINT8 EFIAPI MmioAndThenOr8 (IN UINTN Address, IN UINT8 AndData, IN UINT8 OrData)
 
UINT8 EFIAPI MmioBitFieldRead8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
 
UINT8 EFIAPI MmioBitFieldWrite8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value)
 
UINT8 EFIAPI MmioBitFieldOr8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData)
 
UINT8 EFIAPI MmioBitFieldAnd8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData)
 
UINT8 EFIAPI MmioBitFieldAndThenOr8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData)
 
UINT16 EFIAPI MmioRead16 (IN UINTN Address)
 
UINT16 EFIAPI MmioWrite16 (IN UINTN Address, IN UINT16 Value)
 
UINT16 EFIAPI MmioOr16 (IN UINTN Address, IN UINT16 OrData)
 
UINT16 EFIAPI MmioAnd16 (IN UINTN Address, IN UINT16 AndData)
 
UINT16 EFIAPI MmioAndThenOr16 (IN UINTN Address, IN UINT16 AndData, IN UINT16 OrData)
 
UINT16 EFIAPI MmioBitFieldRead16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
 
UINT16 EFIAPI MmioBitFieldWrite16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value)
 
UINT16 EFIAPI MmioBitFieldOr16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData)
 
UINT16 EFIAPI MmioBitFieldAnd16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData)
 
UINT16 EFIAPI MmioBitFieldAndThenOr16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData)
 
UINT32 EFIAPI MmioRead32 (IN UINTN Address)
 
UINT32 EFIAPI MmioWrite32 (IN UINTN Address, IN UINT32 Value)
 
UINT32 EFIAPI MmioOr32 (IN UINTN Address, IN UINT32 OrData)
 
UINT32 EFIAPI MmioAnd32 (IN UINTN Address, IN UINT32 AndData)
 
UINT32 EFIAPI MmioAndThenOr32 (IN UINTN Address, IN UINT32 AndData, IN UINT32 OrData)
 
UINT32 EFIAPI MmioBitFieldRead32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
 
UINT32 EFIAPI MmioBitFieldWrite32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
 
UINT32 EFIAPI MmioBitFieldOr32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData)
 
UINT32 EFIAPI MmioBitFieldAnd32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData)
 
UINT32 EFIAPI MmioBitFieldAndThenOr32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData)
 
UINT64 EFIAPI MmioRead64 (IN UINTN Address)
 
UINT64 EFIAPI MmioWrite64 (IN UINTN Address, IN UINT64 Value)
 
UINT64 EFIAPI MmioOr64 (IN UINTN Address, IN UINT64 OrData)
 
UINT64 EFIAPI MmioAnd64 (IN UINTN Address, IN UINT64 AndData)
 
UINT64 EFIAPI MmioAndThenOr64 (IN UINTN Address, IN UINT64 AndData, IN UINT64 OrData)
 
UINT64 EFIAPI MmioBitFieldRead64 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
 
UINT64 EFIAPI MmioBitFieldWrite64 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 Value)
 
UINT64 EFIAPI MmioBitFieldOr64 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 OrData)
 
UINT64 EFIAPI MmioBitFieldAnd64 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 AndData)
 
UINT64 EFIAPI MmioBitFieldAndThenOr64 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT64 AndData, IN UINT64 OrData)
 
UINT8 *EFIAPI MmioReadBuffer8 (IN UINTN StartAddress, IN UINTN Length, OUT UINT8 *Buffer)
 
UINT16 *EFIAPI MmioReadBuffer16 (IN UINTN StartAddress, IN UINTN Length, OUT UINT16 *Buffer)
 
UINT32 *EFIAPI MmioReadBuffer32 (IN UINTN StartAddress, IN UINTN Length, OUT UINT32 *Buffer)
 
UINT64 *EFIAPI MmioReadBuffer64 (IN UINTN StartAddress, IN UINTN Length, OUT UINT64 *Buffer)
 
UINT8 *EFIAPI MmioWriteBuffer8 (IN UINTN StartAddress, IN UINTN Length, IN CONST UINT8 *Buffer)
 
UINT16 *EFIAPI MmioWriteBuffer16 (IN UINTN StartAddress, IN UINTN Length, IN CONST UINT16 *Buffer)
 
UINT32 *EFIAPI MmioWriteBuffer32 (IN UINTN StartAddress, IN UINTN Length, IN CONST UINT32 *Buffer)
 
UINT64 *EFIAPI MmioWriteBuffer64 (IN UINTN StartAddress, IN UINTN Length, IN CONST UINT64 *Buffer)
 

Detailed Description

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

Definition in file IoLib.h.

Macro Definition Documentation

◆ IO_LIB_ADDRESS

#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.

Parameters
SegmentPCI Segment number. Range 0..65535.
PortI/O Port number. Range 0..65535.
Returns
An address that the I/o Library functions need.

Definition at line 29 of file IoLib.h.

Function Documentation

◆ IoAnd16()

UINT16 EFIAPI IoAnd16 ( IN UINTN  Port,
IN UINT16  AndData 
)

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 354 of file IoHighLevel.c.

◆ IoAnd32()

UINT32 EFIAPI IoAnd32 ( IN UINTN  Port,
IN UINT32  AndData 
)

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to 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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 647 of file IoHighLevel.c.

◆ IoAnd64()

UINT64 EFIAPI IoAnd64 ( IN UINTN  Port,
IN UINT64  AndData 
)

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to 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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 940 of file IoHighLevel.c.

◆ IoAnd8()

UINT8 EFIAPI IoAnd8 ( IN UINTN  Port,
IN UINT8  AndData 
)

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 68 of file IoHighLevel.c.

◆ IoAndThenOr16()

UINT16 EFIAPI IoAndThenOr16 ( IN UINTN  Port,
IN UINT16  AndData,
IN UINT16  OrData 
)

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise inclusive 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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Definition at line 385 of file IoHighLevel.c.

◆ IoAndThenOr32()

UINT32 EFIAPI IoAndThenOr32 ( IN UINTN  Port,
IN UINT32  AndData,
IN UINT32  OrData 
)

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise inclusive 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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Definition at line 678 of file IoHighLevel.c.

◆ IoAndThenOr64()

UINT64 EFIAPI IoAndThenOr64 ( IN UINTN  Port,
IN UINT64  AndData,
IN UINT64  OrData 
)

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise inclusive 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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Definition at line 971 of file IoHighLevel.c.

◆ IoAndThenOr8()

UINT8 EFIAPI IoAndThenOr8 ( IN UINTN  Port,
IN UINT8  AndData,
IN UINT8  OrData 
)

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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise inclusive 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().

Parameters
PortThe I/O port to write.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Definition at line 98 of file IoHighLevel.c.

◆ IoBitFieldAnd16()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 537 of file IoHighLevel.c.

◆ IoBitFieldAnd32()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 830 of file IoHighLevel.c.

◆ IoBitFieldAnd64()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 1123 of file IoHighLevel.c.

◆ IoBitFieldAnd8()

UINT8 EFIAPI IoBitFieldAnd8 ( IN UINTN  Port,
IN UINTN  StartBit,
IN UINTN  EndBit,
IN UINT8  AndData 
)

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to 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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 245 of file IoHighLevel.c.

◆ IoBitFieldAndThenOr16()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Definition at line 583 of file IoHighLevel.c.

◆ IoBitFieldAndThenOr32()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Definition at line 876 of file IoHighLevel.c.

◆ IoBitFieldAndThenOr64()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Definition at line 1169 of file IoHighLevel.c.

◆ IoBitFieldAndThenOr8()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with the read value from the I/O port.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the I/O port.

Definition at line 290 of file IoHighLevel.c.

◆ IoBitFieldOr16()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 495 of file IoHighLevel.c.

◆ IoBitFieldOr32()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 788 of file IoHighLevel.c.

◆ IoBitFieldOr64()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 1081 of file IoHighLevel.c.

◆ IoBitFieldOr8()

UINT8 EFIAPI IoBitFieldOr8 ( IN UINTN  Port,
IN UINTN  StartBit,
IN UINTN  EndBit,
IN UINT8  OrData 
)

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to 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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 204 of file IoHighLevel.c.

◆ IoBitFieldRead16()

UINT16 EFIAPI IoBitFieldRead16 ( IN UINTN  Port,
IN UINTN  StartBit,
IN UINTN  EndBit 
)

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().

Parameters
PortThe I/O port to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
Returns
The value read.

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 StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT().

Parameters
PortThe I/O port to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
Returns
The value read.

Definition at line 417 of file IoHighLevel.c.

◆ IoBitFieldRead32()

UINT32 EFIAPI IoBitFieldRead32 ( IN UINTN  Port,
IN UINTN  StartBit,
IN UINTN  EndBit 
)

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().

Parameters
PortThe I/O port to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
Returns
The value read.

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 StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT().

Parameters
PortThe I/O port to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
Returns
The value read.

Definition at line 710 of file IoHighLevel.c.

◆ IoBitFieldRead64()

UINT64 EFIAPI IoBitFieldRead64 ( IN UINTN  Port,
IN UINTN  StartBit,
IN UINTN  EndBit 
)

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().

Parameters
PortThe I/O port to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
Returns
The value read.

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 StartBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT(). If EndBit is less than StartBit, then ASSERT().

Parameters
PortThe I/O port to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
Returns
The value read.

Definition at line 1003 of file IoHighLevel.c.

◆ IoBitFieldRead8()

UINT8 EFIAPI IoBitFieldRead8 ( IN UINTN  Port,
IN UINTN  StartBit,
IN UINTN  EndBit 
)

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().

Parameters
PortThe I/O port to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
Returns
The value read.

Definition at line 129 of file IoHighLevel.c.

◆ IoBitFieldWrite16()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
ValueNew value of the bit field.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

Definition at line 453 of file IoHighLevel.c.

◆ IoBitFieldWrite32()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
ValueNew value of the bit field.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

Definition at line 746 of file IoHighLevel.c.

◆ IoBitFieldWrite64()

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
ValueNew value of the bit field.
Returns
The value written back to the I/O port.

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 bits left 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

Definition at line 1039 of file IoHighLevel.c.

◆ IoBitFieldWrite8()

UINT8 EFIAPI IoBitFieldWrite8 ( IN UINTN  Port,
IN UINTN  StartBit,
IN UINTN  EndBit,
IN UINT8  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.

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
ValueNew value of the bit field.
Returns
The value written back to the I/O port.

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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

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 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().

Parameters
PortThe I/O port to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
ValueThe new value of the bit field.
Returns
The value written back to the I/O port.

Definition at line 163 of file IoHighLevel.c.

◆ IoOr16()

UINT16 EFIAPI IoOr16 ( IN UINTN  Port,
IN UINT16  OrData 
)

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().

Parameters
PortThe I/O port to write.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

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().

Parameters
PortThe I/O port to write.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 325 of file IoHighLevel.c.

◆ IoOr32()

UINT32 EFIAPI IoOr32 ( IN UINTN  Port,
IN UINT32  OrData 
)

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().

Parameters
PortThe I/O port to write.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to 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().

Parameters
PortThe I/O port to write.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 618 of file IoHighLevel.c.

◆ IoOr64()

UINT64 EFIAPI IoOr64 ( IN UINTN  Port,
IN UINT64  OrData 
)

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().

Parameters
PortThe I/O port to write.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to 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().

Parameters
PortThe I/O port to write.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 911 of file IoHighLevel.c.

◆ IoOr8()

UINT8 EFIAPI IoOr8 ( IN UINTN  Port,
IN UINT8  OrData 
)

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().

Parameters
PortThe I/O port to write.
OrDataThe value to OR with the read value from the I/O port.
Returns
The value written back to the I/O port.

Definition at line 40 of file IoHighLevel.c.

◆ IoRead16()

UINT16 EFIAPI IoRead16 ( IN UINTN  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().

Parameters
PortThe I/O port to read.
Returns
The value read.

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().

Parameters
PortThe I/O port to read.
Returns
The value read.

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().

For Td guest TDVMCALL_IO is invoked to read I/O port.

Parameters
PortThe I/O port to read.
Returns
The value read.

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 Port is not aligned on a 16-bit boundary, then ASSERT().

If 16-bit I/O port operations are not supported, then ASSERT().

Parameters
PortThe I/O port to read.
Returns
The value read.

Definition at line 225 of file IoLibArmVirt.c.

◆ IoRead32()

UINT32 EFIAPI IoRead32 ( IN UINTN  Port)

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().

Parameters
PortThe I/O port to read.
Returns
The value 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().

Parameters
PortThe I/O port to read.
Returns
The value 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().

For Td guest TDVMCALL_IO is invoked to read I/O port.

Parameters
PortThe I/O port to read.
Returns
The value 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 Port is not aligned on a 32-bit boundary, then ASSERT().

If 32-bit I/O port operations are not supported, then ASSERT().

Parameters
PortThe I/O port to read.
Returns
The value read.

Definition at line 275 of file IoLibArmVirt.c.

◆ IoRead64()

UINT64 EFIAPI IoRead64 ( IN UINTN  Port)

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().

Parameters
PortThe I/O port to read.
Returns
The value 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 Port is not aligned on a 64-bit boundary, then ASSERT().

If 64-bit I/O port operations are not supported, then ASSERT().

Parameters
PortThe I/O port to read.
Returns
The value read.

Definition at line 29 of file IoLib.c.

◆ IoRead8()

UINT8 EFIAPI IoRead8 ( IN UINTN  Port)

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().

Parameters
PortThe I/O port to read.
Returns
The value 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()

For Td guest TDVMCALL_IO is invoked to read I/O port.

Parameters
PortThe I/O port to read.
Returns
The value 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().

For Td guest TDVMCALL_IO is invoked to read I/O port.

Parameters
PortThe I/O port to read.
Returns
The value read.

Definition at line 175 of file IoLibArmVirt.c.

◆ IoReadFifo16()

VOID EFIAPI IoReadFifo16 ( IN UINTN  Port,
IN UINTN  Count,
OUT VOID *  Buffer 
)

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().

Parameters
PortThe I/O port to read.
CountThe number of times to read I/O port.
BufferThe buffer to store the read data into.

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().

In TDX a serial of TdIoRead16 is invoked to read data from the I/O port.

Parameters
PortThe I/O port to read.
CountThe number of times to read I/O port.
BufferThe buffer to store the read data into.

Definition at line 436 of file IoLibArmVirt.c.

◆ IoReadFifo32()

VOID EFIAPI IoReadFifo32 ( IN UINTN  Port,
IN UINTN  Count,
OUT VOID *  Buffer 
)

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().

Parameters
PortThe I/O port to read.
CountThe number of times to read I/O port.
BufferThe 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().

In TDX a serial of TdIoRead32 is invoked to read data from the I/O port.

Parameters
PortThe I/O port to read.
CountThe number of times to read I/O port.
BufferThe buffer to store the read data into.

Definition at line 492 of file IoLibArmVirt.c.

◆ IoReadFifo8()

VOID EFIAPI IoReadFifo8 ( IN UINTN  Port,
IN UINTN  Count,
OUT VOID *  Buffer 
)

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().

Parameters
PortThe I/O port to read.
CountThe number of times to read I/O port.
BufferThe 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().

In TDX a serial of TdIoRead8 is invoked to read the I/O port fifo.

Parameters
PortThe I/O port to read.
CountThe number of times to read I/O port.
BufferThe buffer to store the read data into.

Definition at line 380 of file IoLibArmVirt.c.

◆ IoWrite16()

UINT16 EFIAPI IoWrite16 ( IN UINTN  Port,
IN UINT16  Value 
)

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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written the I/O port.

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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written the I/O port.

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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written to the I/O port.

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().

For Td guest TDVMCALL_IO is invoked to write I/O port.

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written the I/O port.

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().

For Td guest TDVMCALL_IO is invoked to write I/O port.

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written to the I/O port.

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 Port is not aligned on a 16-bit boundary, then ASSERT().

If 16-bit I/O port operations are not supported, then ASSERT().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written the I/O port.

Definition at line 250 of file IoLibArmVirt.c.

◆ IoWrite32()

UINT32 EFIAPI IoWrite32 ( IN UINTN  Port,
IN UINT32  Value 
)

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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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().

For Td guest TDVMCALL_IO is invoked to write I/O port.

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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().

For Td guest TDVMCALL_IO is invoked to write I/O port.

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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 Port is not aligned on a 32-bit boundary, then ASSERT().

If 32-bit I/O port operations are not supported, then ASSERT().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written the I/O port.

Definition at line 300 of file IoLibArmVirt.c.

◆ IoWrite64()

UINT64 EFIAPI IoWrite64 ( IN UINTN  Port,
IN UINT64  Value 
)

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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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 Port is not aligned on a 64-bit boundary, then ASSERT().

If 64-bit I/O port operations are not supported, then ASSERT().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written the I/O port.

Definition at line 55 of file IoLib.c.

◆ IoWrite8()

UINT8 EFIAPI IoWrite8 ( IN UINTN  Port,
IN UINT8  Value 
)

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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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().

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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().

For Td guest TDVMCALL_IO is invoked to write I/O port.

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written 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().

For Td guest TDVMCALL_IO is invoked to write I/O port.

Parameters
PortThe I/O port to write.
ValueThe value to write to the I/O port.
Returns
The value written to the I/O port.

Definition at line 200 of file IoLibArmVirt.c.

◆ IoWriteFifo16()

VOID EFIAPI IoWriteFifo16 ( IN UINTN  Port,
IN UINTN  Count,
IN VOID *  Buffer 
)

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().

Parameters
PortThe I/O port to write.
CountThe number of times to write I/O port.
BufferThe buffer to retrieve the write data from.

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().

In TDX a serial of TdIoWrite16 is invoked to write data to the I/O port.

Parameters
PortThe I/O port to write.
CountThe number of times to write I/O port.
BufferThe buffer to retrieve the write data from.

Definition at line 464 of file IoLibArmVirt.c.

◆ IoWriteFifo32()

VOID EFIAPI IoWriteFifo32 ( IN UINTN  Port,
IN UINTN  Count,
IN VOID *  Buffer 
)

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().

Parameters
PortThe I/O port to write.
CountThe number of times to write I/O port.
BufferThe 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().

In TDX a serial of TdIoWrite32 is invoked to write data to the I/O port.

Parameters
PortThe I/O port to write.
CountThe number of times to write I/O port.
BufferThe buffer to retrieve the write data from.

Definition at line 520 of file IoLibArmVirt.c.

◆ IoWriteFifo8()

VOID EFIAPI IoWriteFifo8 ( IN UINTN  Port,
IN UINTN  Count,
IN VOID *  Buffer 
)

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().

Parameters
PortThe I/O port to write.
CountThe number of times to write I/O port.
BufferThe 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().

In TDX a serial of TdIoWrite8 is invoked to write data to the I/O port.

Parameters
PortThe I/O port to write.
CountThe number of times to write I/O port.
BufferThe buffer to retrieve the write data from.

Definition at line 408 of file IoLibArmVirt.c.

◆ MmioAnd16()

UINT16 EFIAPI MmioAnd16 ( IN UINTN  Address,
IN UINT16  AndData 
)

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1520 of file IoHighLevel.c.

◆ MmioAnd32()

UINT32 EFIAPI MmioAnd32 ( IN UINTN  Address,
IN UINT32  AndData 
)

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
Returns
The value written back to 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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1814 of file IoHighLevel.c.

◆ MmioAnd64()

UINT64 EFIAPI MmioAnd64 ( IN UINTN  Address,
IN UINT64  AndData 
)

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
Returns
The value written back to 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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 2108 of file IoHighLevel.c.

◆ MmioAnd8()

UINT8 EFIAPI MmioAnd8 ( IN UINTN  Address,
IN UINT8  AndData 
)

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1231 of file IoHighLevel.c.

◆ MmioAndThenOr16()

UINT16 EFIAPI MmioAndThenOr16 ( IN UINTN  Address,
IN UINT16  AndData,
IN UINT16  OrData 
)

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise inclusive 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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Definition at line 1551 of file IoHighLevel.c.

◆ MmioAndThenOr32()

UINT32 EFIAPI MmioAndThenOr32 ( IN UINTN  Address,
IN UINT32  AndData,
IN UINT32  OrData 
)

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise inclusive 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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Definition at line 1845 of file IoHighLevel.c.

◆ MmioAndThenOr64()

UINT64 EFIAPI MmioAndThenOr64 ( IN UINTN  Address,
IN UINT64  AndData,
IN UINT64  OrData 
)

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise inclusive 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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Definition at line 2139 of file IoHighLevel.c.

◆ MmioAndThenOr8()

UINT8 EFIAPI MmioAndThenOr8 ( IN UINTN  Address,
IN UINT8  AndData,
IN UINT8  OrData 
)

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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise inclusive 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().

Parameters
AddressThe MMIO register to write.
AndDataThe value to AND with the read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Definition at line 1262 of file IoHighLevel.c.

◆ MmioBitFieldAnd16()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1704 of file IoHighLevel.c.

◆ MmioBitFieldAnd32()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1998 of file IoHighLevel.c.

◆ MmioBitFieldAnd64()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 2292 of file IoHighLevel.c.

◆ MmioBitFieldAnd8()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1411 of file IoHighLevel.c.

◆ MmioBitFieldAndThenOr16()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Definition at line 1750 of file IoHighLevel.c.

◆ MmioBitFieldAndThenOr32()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Definition at line 2044 of file IoHighLevel.c.

◆ MmioBitFieldAndThenOr64()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Definition at line 2338 of file IoHighLevel.c.

◆ MmioBitFieldAndThenOr8()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
AndDataThe value to AND with read value from the MMIO register.
OrDataThe value to OR with the result of the AND operation.
Returns
The value written back to the MMIO register.

Definition at line 1456 of file IoHighLevel.c.

◆ MmioBitFieldOr16()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 inclusive 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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1661 of file IoHighLevel.c.

◆ MmioBitFieldOr32()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 inclusive 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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1955 of file IoHighLevel.c.

◆ MmioBitFieldOr64()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 inclusive 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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 2249 of file IoHighLevel.c.

◆ MmioBitFieldOr8()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 bits left 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 inclusive 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
OrDataThe value to OR with read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1369 of file IoHighLevel.c.

◆ MmioBitFieldRead16()

UINT16 EFIAPI MmioBitFieldRead16 ( IN UINTN  Address,
IN UINTN  StartBit,
IN UINTN  EndBit 
)

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().

Parameters
AddressMMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
Returns
The value read.

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().

Parameters
AddressThe MMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
Returns
The value read.

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 StartBit is greater than 15, then ASSERT(). If EndBit is greater than 15, then ASSERT(). If EndBit is less than StartBit, then ASSERT().

Parameters
AddressThe MMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
Returns
The value read.

Definition at line 1583 of file IoHighLevel.c.

◆ MmioBitFieldRead32()

UINT32 EFIAPI MmioBitFieldRead32 ( IN UINTN  Address,
IN UINTN  StartBit,
IN UINTN  EndBit 
)

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().

Parameters
AddressMMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
Returns
The value read.

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().

Parameters
AddressThe MMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
Returns
The value read.

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 StartBit is greater than 31, then ASSERT(). If EndBit is greater than 31, then ASSERT(). If EndBit is less than StartBit, then ASSERT().

Parameters
AddressThe MMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
Returns
The value read.

Definition at line 1877 of file IoHighLevel.c.

◆ MmioBitFieldRead64()

UINT64 EFIAPI MmioBitFieldRead64 ( IN UINTN  Address,
IN UINTN  StartBit,
IN UINTN  EndBit 
)

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().

Parameters
AddressMMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
Returns
The value read.

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().

Parameters
AddressThe MMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
Returns
The value read.

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 StartBit is greater than 63, then ASSERT(). If EndBit is greater than 63, then ASSERT(). If EndBit is less than StartBit, then ASSERT().

Parameters
AddressThe MMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
Returns
The value read.

Definition at line 2171 of file IoHighLevel.c.

◆ MmioBitFieldRead8()

UINT8 EFIAPI MmioBitFieldRead8 ( IN UINTN  Address,
IN UINTN  StartBit,
IN UINTN  EndBit 
)

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().

Parameters
AddressMMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
Returns
The value read.

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().

Parameters
AddressThe MMIO register to read.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
Returns
The value read.

Definition at line 1293 of file IoHighLevel.c.

◆ MmioBitFieldWrite16()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
ValueNew value of the bit field.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
ValueThe new value of the bit field.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..15.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..15.
ValueThe new value of the bit field.
Returns
The value written back to the MMIO register.

Definition at line 1618 of file IoHighLevel.c.

◆ MmioBitFieldWrite32()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
ValueNew value of the bit field.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
ValueThe new value of the bit field.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..31.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..31.
ValueThe new value of the bit field.
Returns
The value written back to the MMIO register.

Definition at line 1912 of file IoHighLevel.c.

◆ MmioBitFieldWrite64()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
ValueNew value of the bit field.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
ValueThe new value of the bit field.
Returns
The value written back to the MMIO register.

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 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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..63.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..63.
ValueThe new value of the bit field.
Returns
The value written back to the MMIO register.

Definition at line 2206 of file IoHighLevel.c.

◆ MmioBitFieldWrite8()

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().

Parameters
AddressMMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
ValueNew value of the bit field.
Returns
The value written back to the MMIO register.

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().

Parameters
AddressThe MMIO register to write.
StartBitThe ordinal of the least significant bit in the bit field. Range 0..7.
EndBitThe ordinal of the most significant bit in the bit field. Range 0..7.
ValueThe new value of the bit field.
Returns
The value written back to the MMIO register.

Definition at line 1327 of file IoHighLevel.c.

◆ MmioOr16()

UINT16 EFIAPI MmioOr16 ( IN UINTN  Address,
IN UINT16  OrData 
)

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().

Parameters
AddressThe MMIO register to write.
OrDataThe value to OR with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

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 inclusive 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().

Parameters
AddressThe MMIO register to write.
OrDataThe value to OR with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1491 of file IoHighLevel.c.

◆ MmioOr32()

UINT32 EFIAPI MmioOr32 ( IN UINTN  Address,
IN UINT32  OrData 
)

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().

Parameters
AddressThe MMIO register to write.
OrDataThe value to OR with the read value from the MMIO register.
Returns
The value written back to 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 inclusive 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().

Parameters
AddressThe MMIO register to write.
OrDataThe value to OR with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1785 of file IoHighLevel.c.

◆ MmioOr64()

UINT64 EFIAPI MmioOr64 ( IN UINTN  Address,
IN UINT64  OrData 
)

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().

Parameters
AddressThe MMIO register to write.
OrDataThe value to OR with the read value from the MMIO register.
Returns
The value written back to 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 inclusive 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().

Parameters
AddressThe MMIO register to write.
OrDataThe value to OR with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 2079 of file IoHighLevel.c.

◆ MmioOr8()

UINT8 EFIAPI MmioOr8 ( IN UINTN  Address,
IN UINT8  OrData 
)

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().

Parameters
AddressThe MMIO register to write.
OrDataThe value to OR with the read value from the MMIO register.
Returns
The value written back to 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 inclusive 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().

Parameters
AddressThe MMIO register to write.
OrDataThe value to OR with the read value from the MMIO register.
Returns
The value written back to the MMIO register.

Definition at line 1203 of file IoHighLevel.c.

◆ MmioRead16()

UINT16 EFIAPI MmioRead16 ( IN UINTN  Address)

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().

Parameters
AddressThe MMIO register to read.
Returns
The value read.

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().

For Td guest TDVMCALL_MMIO is invoked to read MMIO registers.

Parameters
AddressThe MMIO register to read.
Returns
The value read.

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().

Parameters
AddressThe MMIO register to read.
Returns
The value read.

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 Address is not aligned on a 16-bit boundary, then ASSERT().

If 16-bit MMIO register operations are not supported, then ASSERT().

Parameters
AddressThe MMIO register to read.
Returns
The value read.

Definition at line 170 of file IoLib.c.

◆ MmioRead32()

UINT32 EFIAPI MmioRead32 ( IN UINTN  Address)

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().

Parameters
AddressThe MMIO register to read.
Returns
The value 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().

For Td guest TDVMCALL_MMIO is invoked to read MMIO registers.

Parameters
AddressThe MMIO register to read.
Returns
The value 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().

Parameters
AddressThe MMIO register to read.
Returns
The value 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 Address is not aligned on a 32-bit boundary, then ASSERT().

If 32-bit MMIO register operations are not supported, then ASSERT().

Parameters
AddressThe MMIO register to read.
Returns
The value read.

Definition at line 262 of file IoLib.c.

◆ MmioRead64()

UINT64 EFIAPI MmioRead64 ( IN UINTN  Address)

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().

Parameters
AddressThe MMIO register to read.
Returns
The value 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().

For Td guest TDVMCALL_MMIO is invoked to read MMIO registers.

Parameters
AddressThe MMIO register to read.
Returns
The value 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().

Parameters
AddressThe MMIO register to read.
Returns
The value 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 Address is not aligned on a 64-bit boundary, then ASSERT().

If 64-bit MMIO register operations are not supported, then ASSERT().

Parameters
AddressThe MMIO register to read.
Returns
The value read.

Definition at line 355 of file IoLib.c.

◆ MmioRead8()

UINT8 EFIAPI MmioRead8 ( IN UINTN  Address)

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().

Parameters
AddressThe MMIO register to read.
Returns
The value 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().

For Td guest TDVMCALL_MMIO is invoked to read MMIO registers.

Parameters
AddressThe MMIO register to read.
Returns
The value read.

Definition at line 82 of file IoLib.c.

◆ MmioReadBuffer16()

UINT16 *EFIAPI MmioReadBuffer16 ( IN UINTN  StartAddress,
IN UINTN  Length,
OUT UINT16 *  Buffer 
)

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().

Parameters
StartAddressStarting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferPointer to a system memory buffer receiving the data read.
Returns
Buffer

Copy data from the MMIO region to system memory by using 16-bit access.

Copy data from the 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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer.

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

Definition at line 75 of file IoLibMmioBuffer.c.

◆ MmioReadBuffer32()

UINT32 *EFIAPI MmioReadBuffer32 ( IN UINTN  StartAddress,
IN UINTN  Length,
OUT UINT32 *  Buffer 
)

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().

Parameters
StartAddressStarting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferPointer to a system memory buffer receiving the data read.
Returns
Buffer

Copy data from the MMIO region to system memory by using 32-bit access.

Copy data from the 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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer.

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

Definition at line 126 of file IoLibMmioBuffer.c.

◆ MmioReadBuffer64()

UINT64 *EFIAPI MmioReadBuffer64 ( IN UINTN  StartAddress,
IN UINTN  Length,
OUT UINT64 *  Buffer 
)

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().

Parameters
StartAddressStarting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferPointer to a system memory buffer receiving the data read.
Returns
Buffer

Copy data from the MMIO region to system memory by using 64-bit access.

Copy data from the 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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer.

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

Definition at line 177 of file IoLibMmioBuffer.c.

◆ MmioReadBuffer8()

UINT8 *EFIAPI MmioReadBuffer8 ( IN UINTN  StartAddress,
IN UINTN  Length,
OUT UINT8 *  Buffer 
)

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().

Parameters
StartAddressStarting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferPointer to a system memory buffer receiving the data read.
Returns
Buffer

Copy data from the MMIO region to system memory by using 8-bit access.

Copy data from the 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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied from.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer receiving the data read.
Returns
Buffer

Definition at line 31 of file IoLibMmioBuffer.c.

◆ MmioWrite16()

UINT16 EFIAPI MmioWrite16 ( IN UINTN  Address,
IN UINT16  Value 
)

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().

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.
Returns
Value.

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().

For Td guest TDVMCALL_MMIO is invoked to write MMIO registers.

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.
Returns
Value.

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().

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.

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 Address is not aligned on a 16-bit boundary, then ASSERT().

If 16-bit MMIO register operations are not supported, then ASSERT().

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.

Definition at line 216 of file IoLib.c.

◆ MmioWrite32()

UINT32 EFIAPI MmioWrite32 ( IN UINTN  Address,
IN UINT32  Value 
)

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().

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.
Returns
Value.

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().

For Td guest TDVMCALL_MMIO is invoked to write MMIO registers.

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.
Returns
Value.

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().

Parameters
AddressThe MMIO register to write.
ValueThe 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 Address is not aligned on a 32-bit boundary, then ASSERT().

If 32-bit MMIO register operations are not supported, then ASSERT().

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.

Definition at line 309 of file IoLib.c.

◆ MmioWrite64()

UINT64 EFIAPI MmioWrite64 ( IN UINTN  Address,
IN UINT64  Value 
)

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().

Parameters
AddressThe MMIO register to write.
ValueThe 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().

For Td guest TDVMCALL_MMIO is invoked to write MMIO registers.

Parameters
AddressThe MMIO register to write.
ValueThe 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().

Parameters
AddressThe MMIO register to write.
ValueThe 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 Address is not aligned on a 64-bit boundary, then ASSERT().

If 64-bit MMIO register operations are not supported, then ASSERT().

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.

Definition at line 400 of file IoLib.c.

◆ MmioWrite8()

UINT8 EFIAPI MmioWrite8 ( IN UINTN  Address,
IN UINT8  Value 
)

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().

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.
Returns
Value.

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().

For Td guest TDVMCALL_MMIO is invoked to write MMIO registers.

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.
Returns
Value.

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().

Parameters
AddressThe MMIO register to write.
ValueThe value to write to the MMIO register.

Definition at line 126 of file IoLib.c.

◆ MmioWriteBuffer16()

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().

Parameters
StartAddressStarting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferPointer to a system memory buffer containing the data to write.
Returns
Buffer

Copy data from system memory to the MMIO region by using 16-bit access.

Copy data from system memory specified by Buffer to the 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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
Buffer

Definition at line 269 of file IoLibMmioBuffer.c.

◆ MmioWriteBuffer32()

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().

Parameters
StartAddressStarting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferPointer to a system memory buffer containing the data to write.
Returns
Buffer

Copy data from system memory to the MMIO region by using 32-bit access.

Copy data from system memory specified by Buffer to the 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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
Buffer

Definition at line 322 of file IoLibMmioBuffer.c.

◆ MmioWriteBuffer64()

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().

Parameters
StartAddressStarting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferPointer to a system memory buffer containing the data to write.
Returns
Buffer

Copy data from system memory to the MMIO region by using 64-bit access.

Copy data from system memory specified by Buffer to the 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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
Buffer

Definition at line 375 of file IoLibMmioBuffer.c.

◆ MmioWriteBuffer8()

UINT8 *EFIAPI MmioWriteBuffer8 ( IN UINTN  StartAddress,
IN UINTN  Length,
IN CONST UINT8 *  Buffer 
)

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().

Parameters
StartAddressStarting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferPointer to a system memory buffer containing the data to write.
Returns
Buffer

Copy data from system memory to the MMIO region by using 8-bit access.

Copy data from system memory specified by Buffer to the 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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
Buffer.

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size, in bytes, of Buffer.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
Buffer

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().

Parameters
StartAddressThe starting address for the MMIO region to be copied to.
LengthThe size in bytes of the copy.
BufferThe pointer to a system memory buffer containing the data to write.
Returns
Buffer

Definition at line 224 of file IoLibMmioBuffer.c.