## Physical Device Driver Reference

[prev][next][parent][TOC]

### Interrupt Level Sharing

SYSTEM TIMER RULE

The system timer interrupt level (IRQ 0) cannot be shared.

ILL-BEHAVED DEVICE RULE

An interrupt handler for a device that is not well-behaved must not share an interrupt level. This is because a device that is not well-behaved generates interrupts before its interrupt handler is installed or cannot be told to stop generating interrupts.

Well-behaved devices do not power-up with interrupts pending and do not remain active after their handlers have terminated. Also, well-behaved devices do not usually generate spurious interrupts.

SET IRQ RULE

The physical device driver must use the DevHlp_SetIRQ to indicate whether it will share the interrupt level. The physical device driver should use the DevHlp_RegisterStackUsage for each Devhlp_Set IRQ call. See Limiting the Number of Nested Interrupts.

IRQ ENFORCEMENT RULE

If a physical device driver signs up for a hardware interrupt indicating that it will not share the hardware interrupt, then a subsequent SetIRQ request to share that hardware interrupt will be refused. Conversely, if a physical device driver signs up for a hardware interrupt indicating that it will share the hardware interrupt, then a subsequent SetIRQ request to exclusively own the hardware interrupt will be refused.

IRQ MASK RULE

The operating system owns the masking of the hardware interrupt at the 8259 interrupt controller, and enables the hardware interrupt when the first interrupt handler signs up for the hardware interrupt. This permits the handler to communicate with its device during initialization.