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

Page 511

Advertising
background image

Protocols

— PCI Bus Support

Version 1.10

12/01/02

12-93

Description

The

SetBarAttributes()

function sets the attributes specified in

Attributes

for the PCI

controller on the resource range specified by

BarIndex

,

Offset

, and

Length

. Since the

granularity of setting these attributes may vary from resource type to resource type, and from
platform to platform, the actual resource range and the one passed in by the caller may differ. As a
result, this function may set the attributes specified by

Attributes

on a larger resource range

than the caller requested. The actual range is returned in

Offset

and

Length

. The caller is

responsible for verifying that the actual range for which the attributes were set is acceptable.

If the attributes are set on the PCI controller, then the actual resource range is returned in

Offset

and

Length

, and

EFI_SUCCESS

is returned. Many of the attribute types also require that the

state of the PCI Host Bus Controller and the state of any PCI to PCI bridges between the PCI Host
Bus Controller and the PCI Controller to be modified. This function will only return

EFI_SUCCESS

is all of these state changes are made. The PCI Controller may support a

combination of attributes, but unless the PCI Host Bus Controller and the PCI to PCI bridges also
support that same combination of attributes, then this call will return an error.

If the attributes specified by

Attributes

, or the resource range specified by

BarIndex

,

Offset

, and

Length

are not supported by the PCI controller, then

EFI_UNSUPPORTED

is

returned. The set of supported attributes for the PCI controller can be found by calling

GetBarAttributes()

.

If either

Offset

or

Length

is

NULL

then

EFI_INVALID_PARAMETER

is returned.

If there are not enough resources available to set the attributes, then

EFI_OUT_OF_RESOURCES

is returned.

Status Codes Returned

EFI_SUCCESS

The set of attributes specified by

Attributes

for the resource

range specified by

BarIndex

,

Offset

, and

Length

were

set on the PCI controller, and the actual resource range is returned
in

Offset

and

Length

.

EFI_UNSUPPORTED

The set of attributes specified by

Attributes

is not supported

by the PCI controller for the resource range specified by

BarIndex

,

Offset

, and

Length

.

EFI_INVALID_PARAMETER

Offset

is

NULL

.

EFI_INVALID_PARAMETER

Length

is

NULL

.

EFI_OUT_OF_RESOURCES

There are not enough resources to set the attributes on the
resource range specified by

BarIndex

,

Offset

, and

Length

.

Advertising