6 | | Needless to say this is just a model, meaning nothing is given a priori, the model can look differently depending on our choice. It is often not clear what is a device and what is not, where are the boundaries of a particular device, etc. Consequently, there is also no clear line between what still is a device driver and what is not. |
| 6 | Needless to say this is just a model, meaning nothing is given ''a priori'', the model can look differently depending on our choice. It is often not clear what is a device and what is not, where are the boundaries of a particular device, etc. Consequently, there is also no clear line between what still is a device driver and what is not. |
| 12 | Device drivers in HelenOS come in two flavors, ''plain drivers'' and ''DDF drivers''. Plain drivers originated before the Device Driver Framework (DDF) was created. They are simple servers which are started manually (from command line or from ''init'' task) and they reside in {{{/srv}}}. DDF drivers make use of the Device Driver Framework which takes care of starting them, attaching them to devices, etc. They reside in {{{/drv}}}. |
| 13 | |
| 14 | Both kinds of drivers export their services to clients in the same way, as services registered with the ''Location Service''. Each service has a unique name and it can be added to one or more categories. For a client it does not matter how a service is implemented, whether in a plain driver or in a DDF driver. This is an important design point. |
| 15 | |
| 16 | DDF drivers are most useful for drivers that reside on busses that support discovery and hotplug (PCI, USB). Plain drivers are useful for implementing pseudo-devices. ''file_bd'' is an example of a plain driver. It implements a file-backed block device and it is started from the command line. |