DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Device driver overview

Kernel functions

Device drivers call kernel functions to perform system-level functions. The kernel functions that are used for the primary driver interfaces are described in the following manual page sections:

Other interfaces supply their own D3 manual page sections to document interface-specific functions.

SVR5 systems use the versioned interface scheme to retain support for older drivers while ensuring that drivers that use new features do not also use obsoleted functionality. DDI is the primary versioned interface for SVR5. DDI 8 is the newest DDI version supported, but drivers from DDI 7 and DDI 6 can be run on SVR5. Each driver must be defined for a single DDI version, so, for example, a driver that wants to use the PCI hotplug feature that is only supported for DDI 8 and later Cannot use functions such as sleep(D3) that are supported only for earlier DDI versions. The manual pages for each kernel function, entry point routine, and kernel structure specify the interface versions in which it is supported along with any information about differences between versions.

SCO OpenServer 5 does not support a formal versioned interface scheme but for the Consolidated HDK documentation set, a pseudo-versioning scheme has been adopted to distinguish old functions that are retained for backward compatibility from new functions that are only supported in the most current versions of the operating system, and to provide a convenient notation to use for manual page sections for the MDI and STREAMS interfaces that document the interfaces for both SVR5 and SCO OpenServer 5.

Drivers can also use specialized versioned interfaces, such as MDI for network adapter drivers (Version 2.X for SVR5; pseudo-version 1 for SCO OpenServer 5), SDI version 4 for SVR5 mass storage devices, and the OSDI pseudo-version 5 for SCO OpenServer 5 mass storage devices. See ``DDI interface versioning'' for more information about the SVR5 versioned interface scheme and ``ODDI driver interface version for SCO OpenServer 5'' for more information about the SCO OpenServer 5 pseudo-versioned interface scheme.

Articles in HDK Technical Reference group functions by their use. For example, ``Spin locks (DDI)'' and ``Spin locks (ODDI)'' list all the functions available to implement spin locks and ``Memory allocation'' lists all the functions available to allocate memory for a driver on both platforms.

Each manual page includes detailed information about using that function. In addition to the Syntax, Arguments, Description, Return values, Usage, and Reference sections, man pages for kernel functions provide the following information:


Context and synchronization
Drivers execute in different contexts such as interrupt, initialization, system context, and processor context. The context may put some restraints on the activities that can be performed. For example, a driver may not block (sleep) in interrupt context. In interrupt and processor context, the driver cannot expect that the current user-level process is the one associated with the driver. See ``Context of a driver''.

Version applicability
Lists the interface versions that support this function. Each driver must be written to use only one ddi: version, plus network adapter card drivers can use one mdi: version, and storage device drivers can use one sdi: version.

For SCO OpenServer 5 systems, this information is advisory only; strict version enforcement is not implemented on SCO OpenServer 5 systems. Using pseudo interface versioning provides a convenient way to identify the operating system version where a certain function was first introduced and to mark functions that are supported only for backward compatibility but should not be used with new drivers.


Differences between versions
Lists any differences in use for the function between different versions of the same interface, and gives pointers to other functions that provide related capabilities in versions where this function is not supported.

This section also includes hints about similarities and differences between the SVR5 and SCO OpenServer 5 interfaces to assist when porting drivers between the two platforms.


Hardware applicability
A few functions rely on special hardware capabilities; those dependencies are listed here. Most functions are processor-independent, and will contain ``All'' for this section.

© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005