COHERENT manpages

This page displays the COHERENT manpage for mdevice [Describe drivers that can be linked into kernel].

List of available manpages
Index


mdevice -- System Administration

Describe drivers that can be linked into kernel
/etc/conf/mdevice

File  mdevice describes  each device  driver  that can  be linked  into the
COHERENT kernel.   The command  idmkcoh uses  the information in  this file
when it builds and configures a new kernel.

mdevice contains one  line for each driver or kernel  component that can be
linked into the  kernel.  Each line, in turn, consists  of ten fields.  The
following describes the ten fields in order, from left to right:

1. Name
     This field gives the name of  the driver or component.  Each name must
     uniquely  identify the  driver or component  within the  kernel.  This
     field cannot be longer than eight characters.

2. Function Flags
     This  field holds  a flag  for  each function  (that is,  entry point)
     within the driver or component.  This field is used only by drivers or
     components that  use the STREAMS  or DDI/DKI interfaces;  drivers that
     use the  internal-kernel interface should  place a hyphen  `-' in this
     field.  The legal flags are as follows:

         o   Open
         c   Close
         r   Read
         w   Write
         i   Ioctl
         s   Startup
         x   Exit
         I   Init
         h   Halt
         p   Poll -- that is, chpoll()

3. Miscellaneous Flags
     These flags  give information about the device.  They  are set by most
     varieties of driver; the only exception is a STREAMS driver, for which
     only the flag S matters.  The legal flags are as follows:

         c   Character device
         b   Block device
         f   Driver conforms to the DDI/DKI
         o   Driver has only one entry in /etc/conf/sdevice
         r   Driver is required in all configurations of the kernel
         S   STREAMS module; or STREAMS device when used with the `c' flag
         H   Device driver controls hardware
         C   Driver uses interal-kernel (CON) interface

     Note that the `C' flag is unique to COHERENT, and cannot be used under
     other operating systems.

4. Code Prefix
     This gives  the ``magic  prefix'' by  which the kernel  identifies the
     entry-point  routines for  this driver.   In  most instances,  this is
     identical with the driver's name.

5. Block Major-Device Number
     This gives the major-device number  of this driver when it is accessed
     in block  mode.  In most  instances, this and the  following field are
     identical.

6. Character Major-Device Number
     This gives the major-device number  of this driver when it is accessed
     in character  (raw) mode.  In  most instances, this  and the preceding
     field are identical.

7. Minor Device Numbers, Minimum
     This  gives the  smallest number  that can be  held by  a minor-device
     number under  this driver.  Most drivers set this  field to the lowest
     legal value, which is zero.

8. Minor Device Numbers, Maximum
     This  gives the  largest number  that  can be  held by  a minor-device
     number under this driver.  Most  drivers set this field to the highest
     legal value, which is 255.

9. DMA Channel
     This gives  the DMA  channel by which  the device is  accessed.  Under
     COHERENT, this is always set to -1.

10. CPU ID
     This gives  the CPU  that controls this  driver, should the  driver be
     running  in  a  multiprocessor  environment  and  be  dedicated  to  a
     particular processor.  Under COHERENT, this is always set to -1.

For an example of modifying this file, see the entry for device drivers.

Example

The following gives some example entries from mdevice:

1   2   3   4   5   6   7   8   9   10
###
# Example of an kernel components:  floating-point emulator and STREAMS
###
em87    -   -   em87    0   0   0   0-1 -1
streams I   -   streams 0   0   0   0-1 -1

###
# Example of a STREAMS driver:  note flags `c' and `S' both set in field 3
###
echo    -   cSf echo    0   33  0   255-1 -1

###
# Example DDI/DKI character driver:  Note that field 2 is initialized.
###
trace   ocriI   cfo tr  0   34  0   255-1 -1

###
# Example IK driver:  Note flag `C' in field 3
###
at  -   CGHo    at  11  11  0   255 -1-1

See Also

Administering COHERENT,
device drivers,
idmkcoh,
mtune,
sdevice,
stune