00001 /* Interrupt numbers and hardware vectors. */ 00002 00003 #ifndef _INTERRUPT_H 00004 #define _INTERRUPT_H 00005 00006 #if (CHIP == INTEL) 00007 00008 /* 8259A interrupt controller ports. */ 00009 #define INT_CTL 0x20 /* I/O port for interrupt controller */ 00010 #define INT_CTLMASK 0x21 /* setting bits in this port disables ints */ 00011 #define INT2_CTL 0xA0 /* I/O port for second interrupt controller */ 00012 #define INT2_CTLMASK 0xA1 /* setting bits in this port disables ints */ 00013 00014 /* Magic numbers for interrupt controller. */ 00015 #define END_OF_INT 0x20 /* code used to re-enable after an interrupt */ 00016 00017 /* Interrupt vectors defined/reserved by processor. */ 00018 #define DIVIDE_VECTOR 0 /* divide error */ 00019 #define DEBUG_VECTOR 1 /* single step (trace) */ 00020 #define NMI_VECTOR 2 /* non-maskable interrupt */ 00021 #define BREAKPOINT_VECTOR 3 /* software breakpoint */ 00022 #define OVERFLOW_VECTOR 4 /* from INTO */ 00023 00024 /* Fixed system call vector. */ 00025 #define SYS_VECTOR 32 /* system calls are made with int SYSVEC */ 00026 #define SYS386_VECTOR 33 /* except 386 system calls use this */ 00027 #define LEVEL0_VECTOR 34 /* for execution of a function at level 0 */ 00028 00029 /* Suitable irq bases for hardware interrupts. Reprogram the 8259(s) from 00030 * the PC BIOS defaults since the BIOS doesn't respect all the processor's 00031 * reserved vectors (0 to 31). 00032 */ 00033 #define BIOS_IRQ0_VEC 0x08 /* base of IRQ0-7 vectors used by BIOS */ 00034 #define BIOS_IRQ8_VEC 0x70 /* base of IRQ8-15 vectors used by BIOS */ 00035 #define IRQ0_VECTOR 0x50 /* nice vectors to relocate IRQ0-7 to */ 00036 #define IRQ8_VECTOR 0x70 /* no need to move IRQ8-15 */ 00037 00038 /* Hardware interrupt numbers. */ 00039 #define NR_IRQ_VECTORS 16 00040 #define CLOCK_IRQ 0 00041 #define KEYBOARD_IRQ 1 00042 #define CASCADE_IRQ 2 /* cascade enable for 2nd AT controller */ 00043 #define ETHER_IRQ 3 /* default ethernet interrupt vector */ 00044 #define SECONDARY_IRQ 3 /* RS232 interrupt vector for port 2 */ 00045 #define RS232_IRQ 4 /* RS232 interrupt vector for port 1 */ 00046 #define XT_WINI_IRQ 5 /* xt winchester */ 00047 #define FLOPPY_IRQ 6 /* floppy disk */ 00048 #define PRINTER_IRQ 7 00049 #define CMOS_CLOCK_IRQ 8 00050 #define KBD_AUX_IRQ 12 /* AUX (PS/2 mouse) port in kbd controller */ 00051 #define AT_WINI_0_IRQ 14 /* at winchester controller 0 */ 00052 #define AT_WINI_1_IRQ 15 /* at winchester controller 1 */ 00053 00054 /* Interrupt number to hardware vector. */ 00055 #define BIOS_VECTOR(irq) \ 00056 (((irq) < 8 ? BIOS_IRQ0_VEC : BIOS_IRQ8_VEC) + ((irq) & 0x07)) 00057 #define VECTOR(irq) \ 00058 (((irq) < 8 ? IRQ0_VECTOR : IRQ8_VECTOR) + ((irq) & 0x07)) 00059 00060 #endif /* (CHIP == INTEL) */ 00061 00062 #endif /* _INTERRUPT_H */
1.5.8