MDEVICE(4) INTERACTIVE UNIX System MDEVICE(4)
NAME
mdevice - file format
SYNOPSIS
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(4)].
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.
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 under-
scores.
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
x - exit routine
f - fork routine
e - exec routine
I - init routine
h - halt routine
Rev. Page 1
MDEVICE(4) INTERACTIVE UNIX System MDEVICE(4)
p - poll routine
E - enter routine
X - exit 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 direc-
tory), 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 dev-
ice 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
Rev. Page 2
MDEVICE(4) INTERACTIVE UNIX System MDEVICE(4)
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 'charac-
ter' 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 dif-
ferent 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 sys-
tem.
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(4), sdevice(4).
idinstall(1M) in the INTERACTIVE UNIX System User's/System
Administrator's Reference Manual.
Rev. Page 3