pcibios_find_class, pcibios_find_device - find a PCI class
index, unsigned char* bus
int pcibios_find_class(unsigned int class_code, unsigned short
unsigned short device_id , unsigned short
int pcibios_find_device(unsigned short vendor,
The pcibios_find_class function searches for a certain class
of device on the PCI bus. In this instance, class is used
to represent a few different categories of devices. Some
examples are storage, network, display, and memory classes.
The classes are defined by the PCI Specification, and the
class_code is matched with the dword in the configuration
space of the device at offset 0x08.
The pcibios_find_device function finds a device on the PCI
bus that has the matching device and vendor ids. The vendor
ids are assigned to the PCI Sig to vendors, who in turn
assign device ids to the devices they develop. The vendor
and device ids are encoded in dword 0x00 of the configura-
Both pcibios_find_class and pcibios_find_device include an
extra index parameter, which is used to select the specific
device if there are multiple matches. An index of 0 matches
the firts located board, 1 the second, and so on.
The bus and device_fn parameters are PCI specific cookies
that are passed to other pcibios functions to access the
configuration space of the located device.
On success, the functions return PCIBIOS_SUCCESSFUL. Other-
wise, one of the following error codes is returned:
There is no device that matches the search cri-
The vendor id is invalid. (0xffff is not a valid
The PCI subsystem is not available
PCI Local Bus Specification
Kirk Petersen (firstname.lastname@example.org)