|
|
The six different types of interrupt handling that can be used by a device driver are listed on the sdevice(F) manual page. These types can be divided into three basic groups according to the capabilities of the device being controlled and how the driver handles this:
If interrupts are used, you also need to decide on the interrupt priority level (IPL) which is determined by the type of driver; see spl(D3oddi) for more information.
The following tables show the appropriate values to be inserted in the
driver's sdevice and mdevice entry. For drivers that
register their use of interrupts using
add_intr_handler(D3oddi)
or
idistributed(D3oddi),
the appropriate value of
the type argument
and the mode
member of the
driver_info structure
(defined in <sys/ci/ciintr.h>)
are shown respectively.
Use of | IRQ installed by | sdevice | mdevice | add_intr_handler | ||
---|---|---|---|---|---|---|
interrupt | col 4 | col 5 | col 6 | col 3 | ||
by driver | IPL | type | vector | chars | type | |
Not used | Link Kit only | 0 | 0 | 0 | Not used | |
Exclusive | Link Kit only | ipl | 1,2 | irq | Not used | |
Exclusive | Link Kit + driver | ipl | 1 | irq | G | 1 |
ipl | 2 | irq | G | 2 | ||
Exclusive | Driver only | 0 | 0 | 0 | 1 | |
0 | 0 | 0 | 2 | |||
Shared | Link Kit only | ipl | 3 | irq | Not used | |
ipl | 4 | irq | Not used | |||
ipl | 5 | irq | Not used | |||
Shared | Link Kit + driver | ipl | 3 | irq | G | 3 |
ipl | 4 | irq | G | 4 | ||
ipl | 5 | irq | G | 5 | ||
Shared | Driver only | 0 | 0 | 0 | 3 | |
0 | 0 | 0 | 4 | |||
0 | 0 | 0 | 5 |
Use of | IRQ installed by | sdevice | mdevice | idistributed | ||
---|---|---|---|---|---|---|
interrupt | col 4 | col 5 | col 6 | col 3 | ||
by driver | IPL | type | vector | chars | dip->mode | |
Not used | Link Kit only | 0 | 0 | 0 | IMODE_NONE | |
Exclusive | Link Kit only | ipl | 1,2 | irq | IMODE_NONE | |
Exclusive | Link Kit + driver | ipl | 1 | irq | G | IMODE_EXCLUSIVE |
ipl | 2 | irq | G | IMODE_SHARED_DRIVER | ||
Exclusive | Driver only | 0 | 0 | 0 | IMODE_EXCLUSIVE | |
0 | 0 | 0 | IMODE_SHARED_DRIVER | |||
Shared | Link Kit only | ipl | 3 | irq | IMODE_SHARED_DRIVERIPL | |
ipl | 4 | irq | IMODE_SHARED_CDRIVERIPL | |||
ipl | 5 | irq | IMODE_SHARED_INTER | |||
Shared | Link Kit + driver | ipl | 3 | irq | G | IMODE_SHARED_DRIVERIPL |
ipl | 4 | irq | G | IMODE_SHARED_CDRIVERIPL | ||
ipl | 5 | irq | G | IMODE_SHARED_INTER | ||
Shared | Driver only | 0 | 0 | 0 | IMODE_SHARED_DRIVERIPL | |
0 | 0 | 0 | IMODE_SHARED_CDRIVERIPL | |||
0 | 0 | 0 | IMODE_SHARED_INTER |
irq is the interrupt request line (IRQ) configured for the hardware on a system. If the hardware allows the IRQ to be changed using jumpers or a setup program: