Intel Extensible Firmware Interface User Manual

Page 439

Advertising
background image

Protocols

— PCI Bus Support

Version 1.10

12/01/02

12-21

Description

The

Mem.Read()

, and

Mem.Write()

functions enable a driver to access PCI controller

registers in the PCI root bridge memory space.

The memory operations are carried out exactly as requested. The caller is responsible for satisfying
any alignment and memory width restrictions that a PCI Root Bridge on a platform might require.
For example on some platforms, width requests of

EfiPciWidthUint64

do not work.

If

Width

is

EfiPciWidthUint8

,

EfiPciWidthUint16

,

EfiPciWidthUint32

, or

EfiPciWidthUint64

, then both

Address

and

Buffer

are incremented for each of the

Count

operations performed.

If

Width

is

EfiPciWidthFifoUint8

,

EfiPciWidthFifoUint16

,

EfiPciWidthFifoUint32

, or

EfiPciWidthFifoUint64

, 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

EfiPciWidthFillUint8

,

EfiPciWidthFillUint16

,

EfiPciWidthFillUint32

, or

EfiPciWidthFillUint64

, 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 read 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 root bridge

.

EFI_INVALID_PARAMETER

Width

is invalid for this PCI root bridge.

EFI_INVALID_PARAMETER

Buffer

is

NULL

.

EFI_OUT_OF_RESOURCES

The request could not be completed due to a lack of resources.

Advertising