ECOS PCI DRIVER
These can be accessed with these functions:. When the device has been allocated memory space it can be activated. Read and change device-specific PCI information. If the call returns true , a loop is entered where the found devid is used. PCI Library reference
|Date Added:||18 October 2014|
|File Size:||57.28 Mb|
|Operating Systems:||Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X|
|Price:||Free* [*Free Regsitration Required]|
This function allows a driver to find the actual interrupt vector for a given device:.
Michael Kelly – Re: PCI Address Mapping
In that case drivers will have to access PCI memory space in segments. This is done with one of the following functions This only needs to be done once – some HALs may do it as part of the platform initialization procedure, other HALs may leave it to the application or device drivers to do it.
Only the configuration space registers that are writable are actually written. Specific config information This is provided by two APIs. Write a value to the PCI configuration space of the appropriate size at an address composed from the busdevfn and offset.
The number will be incremented as new busses are discovered.
These should not generally be used by any code other than the PCI library, and are present in the HAL to allow low level initialization of the PCI bus and devices to take place if necessary. The 2GB available on many systems should suffice though. If the platform acts as a host on a single PCI bus, then devices may be configured individually from the relevant device driver. The following function will do the initialization only once, so it’s safe to call from multiple drivers:.
Scan the PCI bus for specific pi or devices of a certain class. Initializing the bus Initialize the PCI library and establish contact with the hardware.
When the device has pxi allocated memory space it can be activated. The pci1 test prints out some of this information:. Doing this will be platform specific and is currently beyond the scope of the HAL. But if the application is looking for a device of a given device class e. Normally these base addresses will be set to default values based on the platform.
Re: PCI Address Mapping
It is possible for an application to override these using the following functions:. Types and data structures The PCI bus needs to be initialized before it can be used. Activation cannot happen until after device configuration. These routines allow these to be changed by application code if necessary. This is comprised of the bus number, device number and functional unit numbers packed into a single word. The list of vendor and device codes is not complete: Before devices on the bus can be used, they must be configured.
These macros define offsets to be added to the PCI base addresses to translate PCI bus addresses into physical memory addresses that can be used to access the allocated memory or IO space. The environment in which a platform operates will dictate if and how eCos should configure devices on the PCI bus.
Nick Garnett – Re: PCI Address Mapping
The 64 bit type is used to allow handling 64 bit devices in the future, should it be necessary, without changing the library’s API. This is because all devices on the secondary side of a bridge must be evaluated for their IO and memory space requirements before the eccos can be configured.
Returns true if another device is found and false if not.
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. For 32 bit PCI memory regions, each 32 bit word will be an actual pxi that can be used immediately by the driver: