Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
424 giacomo 1
/*
2
 * This file should contain #defines for all of the interrupt vector
3
 * numbers used by this architecture.
4
 *
5
 * In addition, there are some standard defines:
6
 *
7
 *      FIRST_EXTERNAL_VECTOR:
8
 *              The first free place for external interrupts
9
 *
10
 *      SYSCALL_VECTOR:
11
 *              The IRQ vector a syscall makes the user to kernel transition
12
 *              under.
13
 *
14
 *      TIMER_IRQ:
15
 *              The IRQ number the timer interrupt comes in at.
16
 *
17
 *      NR_IRQS:
18
 *              The total number of interrupt vectors (including all the
19
 *              architecture specific interrupts) needed.
20
 *
21
 */                    
22
#ifndef _ASM_IRQ_VECTORS_H
23
#define _ASM_IRQ_VECTORS_H
24
 
25
/*
26
 * IDT vectors usable for external interrupt sources start
27
 * at 0x20:
28
 */
29
#define FIRST_EXTERNAL_VECTOR   0x20
30
 
31
#define SYSCALL_VECTOR          0x80
32
 
33
/*
34
 * Vectors 0x20-0x2f are used for ISA interrupts.
35
 */
36
 
37
/*
38
 * Special IRQ vectors used by the SMP architecture, 0xf0-0xff
39
 *
40
 *  some of the following vectors are 'rare', they are merged
41
 *  into a single vector (CALL_FUNCTION_VECTOR) to save vector space.
42
 *  TLB, reschedule and local APIC vectors are performance-critical.
43
 *
44
 *  Vectors 0xf0-0xfa are free (reserved for future Linux use).
45
 */
46
#define SPURIOUS_APIC_VECTOR    0xff
47
#define ERROR_APIC_VECTOR       0xfe
48
#define INVALIDATE_TLB_VECTOR   0xfd
49
#define RESCHEDULE_VECTOR       0xfc
50
#define CALL_FUNCTION_VECTOR    0xfb
51
 
52
#define THERMAL_APIC_VECTOR     0xf0
53
/*
54
 * Local APIC timer IRQ vector is on a different priority level,
55
 * to work around the 'lost local interrupt if more than 2 IRQ
56
 * sources per level' errata.
57
 */
58
#define LOCAL_TIMER_VECTOR      0xef
59
 
60
/*
61
 * First APIC vector available to drivers: (vectors 0x30-0xee)
62
 * we start at 0x31 to spread out vectors evenly between priority
63
 * levels. (0x80 is the syscall vector)
64
 */
65
#define FIRST_DEVICE_VECTOR     0x31
66
#define FIRST_SYSTEM_VECTOR     0xef
67
 
68
#define TIMER_IRQ 0
69
 
70
/*
71
 * 16 8259A IRQ's, 208 potential APIC interrupt sources.
72
 * Right now the APIC is mostly only used for SMP.
73
 * 256 vectors is an architectural limit. (we can have
74
 * more than 256 devices theoretically, but they will
75
 * have to use shared interrupts)
76
 * Since vectors 0x00-0x1f are used/reserved for the CPU,
77
 * the usable vector space is 0x20-0xff (224 vectors)
78
 */
79
#ifdef CONFIG_X86_IO_APIC
80
#define NR_IRQS 224
81
# if (224 >= 32 * NR_CPUS)
82
# define NR_IRQ_VECTORS NR_IRQS
83
# else
84
# define NR_IRQ_VECTORS (32 * NR_CPUS)
85
# endif
86
#else
87
#define NR_IRQS 16
88
#define NR_IRQ_VECTORS NR_IRQS
89
#endif
90
 
91
#define FPU_IRQ                 13
92
 
93
#define FIRST_VM86_IRQ          3
94
#define LAST_VM86_IRQ           15
95
#define invalid_vm86_irq(irq)   ((irq) < 3 || (irq) > 15)
96
 
97
 
98
#endif /* _ASM_IRQ_VECTORS_H */