Saturday 24 March 2012

Bus enumeration

In adjustment to abode a PCI accessory it accept to be mapped into the I/O anchorage abode amplitude or the memory-mapped abode amplitude of the system. The system's firmware/device drivers or the operating arrangement will affairs the Base Abode Registers (commonly alleged BARs) to acquaint the accessory of its abode mapping by autograph agreement commands to the PCI controller. Because all PCI accessories are in an abeyant accompaniment aloft arrangement reset, they will not accept any addresses assigned to them by which the operating arrangement or accessory drivers can acquaint with them. Either the BIOS or the operating arrangement geographically addresses the PCI slots (e.g. the aboriginal PCI slot, the additional PCI slot, or the third PCI slot, etc., on the motherboard) through the PCI ambassador application the per aperture IDSEL (Initialization Accessory Select) signals.

Since there is no absolute adjustment for the BIOS or OS to actuate which PCI slots accept accessories installed (nor the functions the accessory implements) the PCI bus(es) accept to be enumerated. Bus archive is performed by attempting to apprehend the Vendor- and Accessory ID annals for anniversary aggregate of bus amount and accessory number, at the device's action #0.

If there is no accessory that accouterments the action aught (i.e., bell-ringer and accessory ID registers), the bus adept performs an arrest and allotment all 1s in bifold (hexadecimal FFFFFFFF). All ones is an invalid VID/DID value, appropriately a accessory disciplinarian can acquaint that the defined aggregate bus/device/function (B/D/F) does not exist. So, if a apprehend to a action ID of aught for accustomed bus/device causes the adept (initiator) to abort, it accept to afresh be accepted that no alive accessory exists on that bus because accessories are appropriate to apparatus action amount zero. In this case, reads to the actual functions numbers (1–7) are not all-important as they aswell will not exist.

When a apprehend to a defined BDF aggregate bell-ringer ID annals succeeds, the BIOS or OS knows it exists, and can afresh affairs the anamnesis mapped and I/O anchorage addresses the action will acknowledge to into the devices' BAR agreement register. These addresses break accurate as continued as the arrangement charcoal angry on. On ability off, all these settings are absent and on the next arrangement boot, the agreement action is afresh all over again. Since this absolute action is absolutely automated, the computer user is absolved the assignment of configuring any anew added accouterments manually by modifying settings of DIP switches on the cards themselves. This is how bung and play is implemented.

If a PCI-to-PCI arch is found, the arrangement accept to accredit the accessory PCI bus above the arch a bus amount added than 0, and afresh enumerate the accessories on that accessory bus.

Each non-bridge PCI accessory can apparatus up to 6 BARs, anniversary of which can acknowledge to altered addresses in I/O anchorage and memory-mapped abode space. Anniversary BAR describes a arena 12:

No comments:

Post a Comment