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. 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
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 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).
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.
Gp − This is a gendev (HPDD) pseudo-device. There is no associated Driver.o file. These entries are generated by kconfig.
Gt − This is a gendev (HPDD) device type. These entries are provided with the base system.
4. Handler prefix: This field contains the character string prepended to all the externally-known handler routines associated with this driver.
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 contains an integer indicating the minimum number of these devices that may be specified in the sdevice file.
8. Maximum units: This field contains an integer indicating the maximum number of these devices that may be specified in the sdevice file.
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
idinstall(1M), mfsys(4), sdevice(4).
ADDED VALUE
This entry, supplied by SunSoft, Inc., contains enhancements to UNIX System V.
\*U — Version 1.0