MDEVICE(F) UNIX System V
Name
mdevice - device driver module description file
Syntax
/etc/conf/cf.d/mdevice
Description
The mdevice file is included in the directory
/etc/conf/cf.d. It includes a one-line description of each
device driver and configurable software module in the system
to be built [except for file system types, see mfsys(F)].
Each line in mdevice represents the Master file component
from a Driver Software Package (DSP) either delivered with
the base system or installed later via idinstall(ADM).
Each line contains several whitespace-separated fields; they
are described below. Each field must be supplied with a
value or a '-' (dash).
1. Device name: This field is the internal name of the
device or module, and may be up to 8 characters long.
The first character of the name must be an alphabetic
character; the others may be letters, digits, or
underscores.
2. Function list: This field is a string of characters
that identify driver functions that are present. Using
one of the characters below requires the driver to have
an entry point (function) of the type indicated. If no
functions in the following list are supplied, the field
should contain a dash.
o - open routine
c - close routine
r - read routine
w - write routine
i - ioctl routine
s - startup routine
I - init routine
h - halt routine
p - poll routine
E - enter routine
Note that if the device is a 'block' type device (see
field 3. below), a strategy routine and a print routine
are required by default.
3. Characteristics of driver: This field contains a set of
characters that indicate the characteristics of the
driver. If none of the characters below apply, the
field should contain a dash. The legal characters for
this field are:
i - The device driver is installable.
c - The device is a 'character' device.
b - The device is a 'block' device.
t - The device is a tty.
o - This device may have only one sdevice entry.
r - This device is required in all configurations
of the Kernel. This option is intended for
drivers delivered with the base system only.
Device nodes (special files in the /dev
directory), once made for this device, are
never removed. See idmknod.
S - This device driver is a STREAMS module.
H - This device driver controls hardware. This
option distinguishes drivers that support
hardware from those that are entirely software
(pseudo-devices).
G - This device does not use an interrupt though an
interrupt is specified in the sdevice entry.
This is used when you wish to associate a
device to a specific device group.
D - This option indicates that the device driver
can share its DMA channel.
O - This option indicates that the IOA range of
this device may overlap that of another device.
4. Handler prefix: This field contains the character
string prepended to all the externally-known handler
routines associated with this driver. The string may
be up to 4 characters long.
5. Block Major number: This field should be set to zero in
a DSP Master file. If the device is a 'block' type
device, a value will be assigned by idinstall during
installation.
6. Character Major number: This field should be set to
zero in a DSP Master file. If the device is a
'character' type device (or 'STREAMS' type), a value
will be assigned by idinstall during installation.
7. Minimum units: This field is an integer specifying the
minimum number of these devices that can be specified
in the sdevice file.
8. Maximum units: This field specifies the maximum number
of these devices that may be specified in the sdevice
file. It contains an integer.
9. DMA channel: This field contains an integer that
specifies the DMA channel to be used by this device.
If the device does not use DMA, place a '-1' in this
field. Note that more than one device can share a DMA
channel (previously disallowed).
Specifying STREAMS Devices and Modules
STREAMS modules and drivers are treated in a slightly
different way from other drivers in all UNIX systems, and
their configuration reflects this difference. To specify a
STREAMS device driver, its mdevice entry should contain both
an 'S' and a 'c' in the characteristics field (see 3.
above). This indicates that it is a STREAMS driver and that
it requires an entry in the UNIX kernel's cdevsw table,
where STREAMS drivers are normally configured into the
system.
A STREAMS module that is not a device driver, such as a line
discipline module, requires an 'S' in the characteristics
field of its mdevice file entry, but should not include a
'c', as a device driver does.
See Also
mfsys(F), sdevice(F), idinstall(ADM)
(printed 8/23/89) MDEVICE(F)