Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
12-70 12/01/02 Version 1.10
Description
The Mem.Read(), and Mem.Write() functions enable a driver to access controller registers in
the PCI memory 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. All the PCI write transactions generated by this function will follow the
write ordering and completion rules defined in the PCI Specification. However, if the memory-
mapped I/O region being accessed by this function has the
EFI_PCI_ATTRIBUTE_MEMORY_CACHED attribute set, then the transactions will follow the
ordering rules defined by the processor architecture.
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.