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

Page 492

Advertising
background image

Extensible Firmware Interface Specification

12-74

12/01/02

Version 1.10

Description

The

Pci.Read()

and

Pci.Write()

functions enable a driver to access PCI configuration

registers for the PCI controller.

The PCI Configuration 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

The address range specified by

Offset

,

Width

, and

Count

is not

valid for the PCI configuration header of the PCI controller.

EFI_OUT_OF_RESOURCES

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

Advertising