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

Page 486

Advertising
background image

Extensible Firmware Interface Specification

12-68

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 I/O location. A PCI I/O read operation is
performed at the PCI I/O address specified by

BarIndex

and

Offset

for the width specified by

Width

. The result of this PCI I/O read operation is stored in

Result

. This PCI I/O 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 I/O 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 I/O operations are carried out exactly as requested. The caller is responsible satisfying any
alignment and I/O width restrictions that the 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.

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 PCI BAR specified by

BarIndex

.

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