ChorusOS 4.0 Device Driver Framework Guide

Driver Registry

The driver registry module implements a data base of drivers registered in the ChorusOS operating system. The driver registry data base is populated by drivers which perform self-registration (using svDriverRegister) at driver initialization time.

The bus/nexus drivers perform a search in the driver registry data base to find a driver they are interested in. Typically, there are two kinds of searches used by the bus/nexus drivers. The first one is done at device enumeration/probing time when the bus/nexus driver is interested in all drivers matching the bus/nexus class (specified as the parent device class). The second is at device instance creation time, when the bus/nexus driver looks for a driver which must be started for a particular device node.

Driver Registry related services are described below. See the man pages for complete descriptions of the commands listed:

svDriverRegister

adds a driver entry to the driver registry

svDriverLookupFirst

returns the id of the first driver entity

svDriverLookupNext

returns the id of the next driver entity

svDriverRelease

releases the lock of a driver

svDriverEntry

returns a pointer to the driver entry structure (using an id)

svDriverCap

returns a pointer to the driver actor capability (using an id)

svDriverUnregister

removes a driver entry from the registry