Saturday 24 March 2012

Software implementation

Configuration reads and writes can be accomplished from the CPU in two ways: one bequest adjustment via I/O addresses 0xCF8 and 0xCFC, and addition alleged memory-mapped configuration.

The bequest adjustment was present in the aboriginal PCI, and it is alleged Agreement Access Mechanism (CAM). It allows for 256 bytes of a device's abode amplitude to be accomplished alongside via two registers alleged PCI CONFIG_ADDRESS and PCI CONFIG_DATA. These registers reside at addresses 0xCF8 and 0xCFC in the x86 I/O abode space. For example, a software disciplinarian (firmware, OS atom or atom driver) can use these registers to configure a PCI accessory by putting the abstracts that is declared to be accounting to the accessory into CONFIG_DATA, and by autograph the abode of the device's annals into CONFIG_ADDRESS. Since this action requires a abode to a annals in adjustment to abode the device’s register, it is referred to as "indirection."

The architecture of CONFIG_ADDRESS is the following:

bus << 16 | accessory << 11 | action << 8 | offset

As explained previously, acclamation a accessory via Bus, Device, and Action (BDF) is aswell referred to as "addressing a accessory geographically." See arch/i386/pci/early.c 3 in the Linux atom cipher for an archetype of cipher that uses bounded addressing.

The additional adjustment was created for PCI Express. It is alleged Enhanced Agreement Access Mechanism (ECAM). It extends device's agreement amplitude to 4k, with the basal 256 bytes overlapping the aboriginal (legacy) agreement amplitude in PCI. The area of the addressable amplitude is "stolen" so that the accesses from the CPU don't go to anamnesis but rather ability a accustomed accessory in the PCI Accurate fabric. During arrangement initialization, firmware determines the abject abode for this “stolen” abode arena and communicates it to the basis circuitous and to the operating system. This advice adjustment is implementation-specific, and not authentic in the PCI accurate

No comments:

Post a Comment