| VxBus Initialisation |
|
To get the best from VxBus, it's worth knowing about how the driver model fits into VxWorks, and how VxWorks initialises it. This article aims to shed light on the initialisation VxBus that will allow developers to understand it better. Driver ParticularsStructuresEvery VxBus driver contains multiple initialisation functions. These are typically named driverNameInstInit, driverNameInstInit2 and driverNameInstConnect, and collectively are wrapped into a drvBusFuncs structure called driverNameFuncs. A vxbPlbRegister structure contains the VxBus registration details for the Processor Local Bus (PLB) (and another for PCI vxbPciRegister if PCI used, although not all targets have PCI). The structure contains:
InitialisationThe 5 phases for VxBus driver initialisation are:
Each phase of initialisation is executed for all VxBus devices before moving onto the next phase. The execution order between devices is not specified, and therefore no driver should assume that another driver will or wont have already processed that stage. The exception to this is for parent bus controllers that are required to be initialised before other drivers can access the hardware. MethodsOnce the driver has been initialised, the VxWorks kernel will access the internal functions of the driver via a list of registered function calls. These function calls are searched when some part of the kernel calls vxbDevIterate to perform a specific action for each device. It is possible to dynamically add and remove drivers from VxBus. Please contact us if you would like to discuss this functionality. |