ChorusOS 4.0 Device Driver Framework Guide

Device Registry

The device registry microkernel module implements a data base of driver instances servicing devices currently supported by the system. The device registry data base is populated by drivers that perform self-registration (using svDeviceRegister) at device initialization time.

The device registry data base is accessed by driver clients in order to obtain a pointer to the driver instance servicing a given (logical) device.

The device registry API is described in detail in the man pages. Note that only the svDeviceLookup, svDeviceRelease and svDeviceEntry microkernel calls should be used by driver clients. The rest of API is dedicated to device drivers.

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

svDeviceAlloc

allocates a device registry entry for a given device driver instance

svDeviceRegister

adds a given entry to the device registry

svDeviceUnregister

removes an entry from the device registry

svDeviceEvent

notifies the device registry module that a given event has occurred

svDeviceFree

releases a previously allocated device registry entry

svDeviceLookup

searches a device entry in the registry, matching given device class and logical unit.

svDeviceEntry

returns the device entry associated to a client identifier returned by svDeviceLookup

svDeviceRelease

releases the lock on a looked-up device entry