Identification of Devices

Each device on one of the PCI buses of the system is identified by a set of three numbers.

□ The bus number is the number of the bus to which the device is assigned; numbering starts at 0 as usual. The PCI specification permits a maximum of 255 buses per system.

□ The device number is a unique identifying number within a bus. A maximum of 32 devices can be attached to a bus. Devices on different buses may have the same device number.

□ The function number is used to implement devices with more than one expansion device (in the classical sense) on a single plug-in card. For example, two network cards can be housed on a plug-in card for reasons of space, in which case the individual interfaces are designated by different function numbers. Much used in laptops are multifunction chipsets, which are attached to the PCI and integrate a whole range of expansions (IDE controller, USB controller, modem, network, etc.) in a minimum of space; these expansions must also be kept apart by means of the function number. The PCI standard defines the maximum number of function units on a device as eight.

Each device is uniquely identified by a 16-bit number, where 8 bits are reserved for the bus number, 5 for the device number, and 3 for the function number. Drivers need not bother with this extremely compact notation because the kernel builds a network of data structures that contains the same information but is much easier to handle from a C point of view.

Continue reading here: Address Spaces

Was this article helpful?

0 0