sdevice" -- System Administration" "

Configure drivers included within kernel

/etc/conf/sdevice

File sdevice configures the drivers that can be included within the COHERENT kernel. Command idmkcoh reads this file when it builds a new COHERENT kernel, and uses the information within it to configure the suite of drivers it links into the kernel.

There is one line within the file for each type of hardware device; if a driver manipulates more than one type of device, then it has one entry for each type of device it manipulates. A driver's entry within file /etc/conf/mdevice indicates how many entries a driver can have with sdevice: if field 3 contains flag `o', the device can have only one entry; whereas if field 3 does not contain this flag, it can have more than one entry (although it is not required to do so). An entry that begins with a pound sign `#' is a comment, and is ignored by idmkcoh.

Each entry within sdevice consists of ten fields, as follows:

11.. _N_a_m_e
This gives the name of driver, and must match the name given in mdevice. It cannot exceed eight characters.

22.. _I_n_c_l_u_d_e_d _i_n _K_e_r_n_e_l_?
This field indicates whether the driver is to be linked into the kernel: `Y' indicates that it is, `N' that it is not.

33.. _N_u_m_b_e_r _o_f _U_n_i_t_s
The number of the hardware units that this driver can manipulate. Under COHERENT, this is always set to zero.

44.. _I_n_t_e_r_r_u_p_t _P_r_i_o_r_i_t_y
The device's interrupt priority. This must be a value between 0 and 8: zero indicates that this device is not interrupt driven, whereas a value from 1 to 8 gives the interrupt priority.

55.. _I_n_t_e_r_r_u_p_t _T_y_p_e
The type of interrupt for this device. The legal values are as follows:

00
This device is not interrupt driven.

11
The device is interrupt driven. If the driver controls more than one device, each requires a separate interrupt.

22
The device is interrupt driven. If the driver supports more than one device, all share the same interrupt.

33
The device requires an interrupt line. If the driver supports more than one device, all share the same interrupt. Multiple device drivers that the same interrupt priority can share this interrupt; however, this requires special hardware support.

66.. _I_n_t_e_r_r_u_p_t _V_e_c_t_o_r
The interrupt vector used by the device. If field 5 is set to zero, this must be also.

77.. _L_o_w _I_/_O _A_d_d_r_e_s_s
The low I/O address through which the driver communicates with the device. Set this field to zero if it is not used.

88.. _H_i_g_h _I_/_O _A_d_d_r_e_s_s
The high I/O address through which the driver communicates with the device. Set this field to zero if it is not used.

99.. _L_o_w _M_e_m_o_r_y _A_d_d_r_e_s_s
The low address of memory within the controller of the device being manipulated. Set this field to zero if it is not used.

1100.. _H_i_g_h _M_e_m_o_r_y _A_d_d_r_e_s_s
The high address of memory within the controller of the device being manipulated. Set this field to zero if it is not used.

Note that all COHERENT drivers current set fields 7 through 10 to zero.

For examples of settings for this, read the file itself. For an example of modifying this file to add a new driver, see the Lexicon entry for device drivers.

See Also