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

Page 484

Advertising
background image

Extensible Firmware Interface Specification

12-66

12/01/02

Version 1.10

Value

The comparison value used for the polling exit criteria.

Delay

The number of 100 ns units to poll. Note that timer available may
be of poorer granularity.

Result

Pointer to the last value read from the memory location.

Description

This function provides a standard way to poll a PCI memory location. A PCI memory read
operation is performed at the PCI memory address specified by

BarIndex

and

Offset

for the

width specified by

Width

. The result of this PCI memory read operation is stored in

Result

.

This PCI memory read operation is repeated until either a timeout of

Delay

100 ns units has

expired, or (

Result

&

Mask)

is equal to

Value

.

This function will always perform at least one memory access no matter how small

Delay

may be.

If

Delay

is 0, then

Result

will be returned with a status of

EFI_SUCCESS

even if

Result

does not match the exit criteria. If

Delay

expires, then

EFI_TIMEOUT

is returned.

If

Width

is not

EfiPciIoWidthUint8

,

EfiPciIoWidthUint16

,

EfiPciIoWidthUint32

, or

EfiPciIoWidthUint64

, then

EFI_INVALID_PARAMETER

is returned.

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

EfiPciIoWidthUint64

do not work.

All the PCI transactions generated by this function are guaranteed to be completed before this
function returns. 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 last data returned from the access matched the poll exit criteria.

EFI_INVALID_PARAMETER

Width

is invalid.

EFI_INVALID_PARAMETER

Result

is

NULL

.

EFI_UNSUPPORTED

BarIndex

not valid for this PCI controller.

EFI_UNSUPPORTED

Offset

is not valid for the

BarIndex

of this PCI controller.

EFI_TIMEOUT

Delay

expired before a match occurred.

EFI_OUT_OF_RESOURCES

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

Advertising