14#define IRQ_PIC_CUTOFF 8
40#define OCW3_READ_IRR 0x02
41#define OCW3_READ_ISR 0x03
42#define ICR_EOI_NON_SPECIFIC 0x20
43#define ICR_EOI_NOP 0x40
44#define ICR_EOI_SPECIFIC 0x60
45#define ICR_EOI_SET_PRIORITY 0xc0
48#define IMR_REG(x) ( (x) < IRQ_PIC_CUTOFF ? PIC1_IMR : PIC2_IMR )
49#define IMR_BIT(x) ( 1 << ( (x) % IRQ_PIC_CUTOFF ) )
52#define ICR_REG( irq ) ( (irq) < IRQ_PIC_CUTOFF ? PIC1_ICR : PIC2_ICR )
53#define ICR_VALUE( irq ) ( (irq) % IRQ_PIC_CUTOFF )
57#define IRQ_INT( irq ) ( ( ( (irq) - IRQ_PIC_CUTOFF ) ^ 0x70 ) & 0x7f )
70irq_enabled (
unsigned int irq ) {
74 return ( (
imr & mask ) == 0 );
84enable_irq (
unsigned int irq ) {
89 return ( (
imr & mask ) == 0 );
99disable_irq (
unsigned int irq ) {
104 return ( (
imr & mask ) == 0 );
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define outb(data, io_addr)
void send_eoi(unsigned int irq)
Send End-Of-Interrupt to the PIC.