kernel: print spurious interrupt message with increasing interval.
[minix.git] / include / arch / i386 / interrupt.h
blobc33c62f192275603a13083260ddac5517e5bcd95
1 /* Interrupt numbers and hardware vectors. */
3 #ifndef _INTERRUPT_H
4 #define _INTERRUPT_H
6 #if (CHIP == INTEL)
8 /* 8259A interrupt controller ports. */
9 #define INT_CTL 0x20 /* I/O port for interrupt controller */
10 #define INT_CTLMASK 0x21 /* setting bits in this port disables ints */
11 #define INT2_CTL 0xA0 /* I/O port for second interrupt controller */
12 #define INT2_CTLMASK 0xA1 /* setting bits in this port disables ints */
14 /* Magic numbers for interrupt controller. */
15 #define END_OF_INT 0x20 /* code used to re-enable after an interrupt */
17 /* Interrupt vectors defined/reserved by processor. */
18 #define DIVIDE_VECTOR 0 /* divide error */
19 #define DEBUG_VECTOR 1 /* single step (trace) */
20 #define NMI_VECTOR 2 /* non-maskable interrupt */
21 #define BREAKPOINT_VECTOR 3 /* software breakpoint */
22 #define OVERFLOW_VECTOR 4 /* from INTO */
24 /* Fixed system call vector. */
25 #define KERN_CALL_VECTOR 32 /* system calls are made with int SYSVEC */
26 #define IPC_VECTOR 33 /* interrupt vector for ipc */
28 /* Suitable irq bases for hardware interrupts. Reprogram the 8259(s) from
29 * the PC BIOS defaults since the BIOS doesn't respect all the processor's
30 * reserved vectors (0 to 31).
32 #define BIOS_IRQ0_VEC 0x08 /* base of IRQ0-7 vectors used by BIOS */
33 #define BIOS_IRQ8_VEC 0x70 /* base of IRQ8-15 vectors used by BIOS */
34 #define IRQ0_VECTOR 0x50 /* nice vectors to relocate IRQ0-7 to */
35 #define IRQ8_VECTOR 0x70 /* no need to move IRQ8-15 */
37 /* Hardware interrupt numbers. */
38 #define NR_IRQ_VECTORS 16
39 #define CLOCK_IRQ 0
40 #define KEYBOARD_IRQ 1
41 #define CASCADE_IRQ 2 /* cascade enable for 2nd AT controller */
42 #define ETHER_IRQ 3 /* default ethernet interrupt vector */
43 #define SECONDARY_IRQ 3 /* RS232 interrupt vector for port 2 */
44 #define RS232_IRQ 4 /* RS232 interrupt vector for port 1 */
45 #define XT_WINI_IRQ 5 /* xt winchester */
46 #define FLOPPY_IRQ 6 /* floppy disk */
47 #define PRINTER_IRQ 7
48 #define CMOS_CLOCK_IRQ 8
49 #define KBD_AUX_IRQ 12 /* AUX (PS/2 mouse) port in kbd controller */
50 #define AT_WINI_0_IRQ 14 /* at winchester controller 0 */
51 #define AT_WINI_1_IRQ 15 /* at winchester controller 1 */
53 /* Interrupt number to hardware vector. */
54 #define BIOS_VECTOR(irq) \
55 (((irq) < 8 ? BIOS_IRQ0_VEC : BIOS_IRQ8_VEC) + ((irq) & 0x07))
56 #define VECTOR(irq) \
57 (((irq) < 8 ? IRQ0_VECTOR : IRQ8_VECTOR) + ((irq) & 0x07))
59 #endif /* (CHIP == INTEL) */
61 #endif /* _INTERRUPT_H */