Description, Status codes returned – Intel Extensible Firmware Interface User Manual
Page 490

Extensible Firmware Interface Specification
12-72
12/01/02
Version 1.10
Description
The
Io.Read()
, and
Io.Write()
functions enable a driver to access PCI controller registers in
PCI I/O space.
The I/O operations are carried out exactly as requested. The caller is responsible for any alignment
and I/O width issues which the bus, device, platform, or type of I/O might require. For example on
some platforms, width requests of
EfiPciIoWidthUint64
do not work.
If
Width
is
EfiPciIoWidthUint8
,
EfiPciIoWidthUint16
,
EfiPciIoWidthUint32
,
or
EfiPciIoWidthUint64
, then both
Address
and
Buffer
are incremented for each of the
Count
operations performed.
If
Width
is
EfiPciIoWidthFifoUint8
,
EfiPciIoWidthFifoUint16
,
EfiPciIoWidthFifoUint32
, or
EfiPciIoWidthFifoUint64
, then only
Buffer
is
incremented for each of the
Count
operations performed. The read or write operation is
performed
Count
times on the same
Address
.
If
Width
is
EfiPciIoWidthFillUint8
,
EfiPciIoWidthFillUint16
,
EfiPciIoWidthFillUint32
, or
EfiPciIoWidthFillUint64
, then only
Address
is
incremented for each of the
Count
operations performed. The read or write operation is
performed
Count
times from the first element of
Buffer
.
All the PCI transactions generated by this function are guaranteed to be completed before this
function returns.
Status Codes Returned
EFI_SUCCESS
The data was read from or written to the PCI controller
.
EFI_INVALID_PARAMETER
Width
is invalid.
EFI_INVALID_PARAMETER
Buffer
is
NULL
.
EFI_UNSUPPORTED
BarIndex
not valid for this PCI controller.
EFI_UNSUPPORTED
The address range specified by
Offset
,
Width
, and
Count
is not
valid for the PCI BAR specified by
BarIndex
.
EFI_OUT_OF_RESOURCES
The request could not be completed due to a lack of resources.