mmddeevviiccee -- System Administration

Describe drivers that can be linked into kernel
/eettcc/ccoonnff/mmddeevviiccee

File  mmddeevviiccee describes  each device  driver  that can  be linked  into the
COHERENT kernel.   The command  iiddmmkkccoohh uses  the information in  this file
when it builds and configures a new kernel.

mmddeevviiccee 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1. _N_a_m_e
     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2. _F_u_n_c_t_i_o_n _F_l_a_g_s
     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o   Open
         cc   Close
         rr   Read
         ww   Write
         ii   Ioctl
         ss   Startup
         xx   Exit
         II   Init
         hh   Halt
         pp   Poll -- that is, cchhppoollll()

33. _M_i_s_c_e_l_l_a_n_e_o_u_s _F_l_a_g_s
     These flags give information about  the device.  They are set by every
     varieties of  driver, regardless of the interface  it uses.  The legal
     flags are as follows:

         cc   Character device
         bb   Block device
         ff   Driver conforms to the DDI/DKI
         oo   Driver has only one entry in /eettcc/ccoonnff/ssddeevviiccee
         rr   Driver is required in all configurations of the kernel
         SS   STREAMS module; or STREAMS device when used with the `c' flag
         HH   Device driver controls hardware
         CC   Driver uses interal-kernel (CCOONN) interface

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

44. _C_o_d_e _P_r_e_f_i_x
     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5. _B_l_o_c_k _M_a_j_o_r-_D_e_v_i_c_e _N_u_m_b_e_r
     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6. _C_h_a_r_a_c_t_e_r _M_a_j_o_r-_D_e_v_i_c_e _N_u_m_b_e_r
     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7. _M_i_n_o_r _D_e_v_i_c_e _N_u_m_b_e_r_s, _M_i_n_i_m_u_m
     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8. _M_i_n_o_r _D_e_v_i_c_e _N_u_m_b_e_r_s, _M_a_x_i_m_u_m
     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9. _D_M_A _C_h_a_n_n_e_l
     This gives  the DMA  channel by which  the device is  accessed.  Under
     COHERENT, this is always set to -1.

1100. _C_P_U _I_D
     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 ddeevviiccee ddrriivveerrss.

_E_x_a_m_p_l_e
The following gives some example entries from mmddeevviiccee:

_1   _2   _3   _4   _5   _6   _7   _8   _9   _1_0
###
# 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

_S_e_e _A_l_s_o
AAddmmiinniisstteerriinngg CCOOHHEERREENNTT, ddeevviiccee ddrriivveerrss, iiddmmkkccoohh, mmttuunnee, ssddeevviiccee, ssttuunnee
