1 #ifndef __HW_INTR_X86_H__
2 #define __HW_INTR_X86_H__
4 #include "kernel/kernel.h"
5 void irq_8259_unmask(int irq
);
6 void irq_8259_mask(int irq
);
7 void irq_8259_eoi(int irq
);
8 void irq_handle(int irq
);
9 void i8259_disable(void);
10 void eoi_8259_master(void);
11 void eoi_8259_slave(void);
14 * we don't use IO APIC if not configured for SMP as we cannot read any info
15 * about it unless we use MPS which is not present on all single CPU
16 * configurations. ACPI would be another option, however we don't support it
20 #include "arch/i386/apic.h"
22 #define hw_intr_mask(irq) ioapic_mask_irq(irq)
23 #define hw_intr_unmask(irq) ioapic_unmask_irq(irq)
24 #define hw_intr_ack(irq) ioapic_eoi(irq)
25 #define hw_intr_used(irq) do { \
27 ioapic_set_irq(irq); \
29 #define hw_intr_not_used(irq) do { \
31 ioapic_unset_irq(irq); \
33 #define hw_intr_disable_all() do { \
34 ioapic_disable_all(); \
39 #define ipi_ack apic_eoi
45 #define hw_intr_mask(irq) irq_8259_mask(irq)
46 #define hw_intr_unmask(irq) irq_8259_unmask(irq)
47 #define hw_intr_ack(irq) irq_8259_eoi(irq)
48 #define hw_intr_used(irq)
49 #define hw_intr_not_used(irq)
50 #define hw_intr_disable_all()
54 #endif /* __HW_INTR_X86_H__ */