These functions read registers of the appropriate size from the configuration space of the given device. Table of Contents Generic config information Configuration means telling the device where it should map its IO and memory resources. Only the configuration space registers that are writable are actually written. The PCI bus supports several address spaces:
|Date Added:||14 March 2017|
|File Size:||22.20 Mb|
|Operating Systems:||Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X|
|Price:||Free* [*Free Regsitration Required]|
These functions read a register of the appropriate size from lci PCI configuration space at an address composed from the busdevfn and offset arguments.
After the bus has been initialized, it is possible to scan it fcos devices. Before devices on the bus can be used, they must be configured.
It is possible for an application to override these using the following functions:. These can be accessed with these functions:. Because of the nature of bridge devices, all devices on the secondary side of a bridge must be allocated memory and IO space before the memory and IO windows on the bridge device can be properly configured.
When the device has been allocated memory space it can be activated. As an example, see the pci1 test which edos be configured to enable the devices it finds. If successful, true is returned. The number will be incremented as new busses are discovered. The 2GB available on many systems should suffice though. The vendordeviceand class are from the device configuration space. Doing this will be platform specific and is currently beyond the scope of the HAL.
The PCI standard supports up to busses with each bus oci up to 32 devices and each device having up to 8 functions. If a PCI-PCI bridge is found on busthis function will call itself recursively in order to configure the bus on the other side of the bridge.
This may also depend on which slot the device occupies. This is not done by the library since a driver may have to initialize more state on the device before it can be safely activated.
The low level API is used by the PCI library itself to access the hardware in a platform-specific manner, and may also be used by device drivers to access the PCI configuration space directly. Returns true if another device is found and false if not. This macro, if defined, may be used to limit the devices which are found by the bus scanning functions.
Activating a device The PCI library is an optional part of eCos, and is only applicable to some platforms. The devid will be updated with the ID of the next device found. Read a value from the PCI configuration space of the appropriate size at an address composed from the busdevfn and pic.
Chapter The eCos PCI Library
The PCI bus supports several address spaces: Initialize the PCI hardware so that ecis configuration space may be accessed.
These functions write a register of the appropriate size to the PCI configuration space at an address composed from the busdevfn and offset arguments. This is done using the function:.
Generic config information Write a value to the PCI configuration space of the appropriate size at an address composed from the busdevfn and ecs. If the function returns false, no interrupts will be generated by the device.
Re: PCI Address Mapping
Otherwise, false is returned. They should mainly be used to access registers that are device specific.
Searches the Wcos bus configuration space for a device with the given vendor and device ids. Read and change device-specific PCI information. These functions allow a device driver to set up its own mappings if it wants.