Specifications

17-1
17
Chapter 17Writing a User-Level Device Driver
This chapter provides an overview of user-level device drivers. It describes the
components that make up a user-level driver and explores the issues that are involved in
developing one. It provides an introduction to the operating system support for user-level
drivers. It explains the procedures for developing the driver routines and a configuration
program for the device controlled by the driver. It also describes some of the techniques
that you can use to debug a user-level driver.
NOTE
It is intended that this chapter be used by personnel inside and
outside Concurrent Computer Corporation. As a result, require-
ments that apply only to user-level device drivers written by Con-
current Computer Corporation personnel are noted throughout.
Understanding a User-Level Device Driver 17
The PowerUX operating system provides support for user-level device drivers. User-level
device drivers provide an alternative, low-overhead means of performing I/O operations.
This section explains what a user-level device driver is and what its advantages and disad-
vantages are. It also describes the types of devices that are candidates for a user-level
driver.
What Is a User-Level Device Driver? 17
A user-level device driver consists of a header file and a library of routines that allow a
user application program to perform I/O and control operations for a particular device
directly from user level without entering the kernel. Direct access to the device is achieved
by mapping the (H)VME addresses associated with the device’s hardware registers onto
the user’s virtual address space.
A user-level device driver might be accompanied by a device configuration program that at
boot time, performs device initialization procedures, sets up shared memory regions
required by the driver, and, if applicable, initializes a device interrupt handler. User-level
device drivers written by Concurrent Computer Corporation personnel must have a device
configuration program.