debuggers.hg

view xen/include/asm-x86/irq.h @ 3659:bf2c38625b39

bitkeeper revision 1.1159.212.72 (42011b79Y7C9nEKFZ5pdQXwp8jC9hw)

More x86/64. Now boot secondary CPUs, but I seem to have problems
executing IRET, so interrupts are fatal.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Wed Feb 02 18:27:05 2005 +0000 (2005-02-02)
parents 6b76ae4b9ea7
children bbe8541361dd
line source
1 #ifndef _ASM_HW_IRQ_H
2 #define _ASM_HW_IRQ_H
4 /* (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar */
6 #include <xen/config.h>
7 #include <asm/atomic.h>
8 #include <asm/asm_defns.h>
10 extern void disable_irq(unsigned int);
11 extern void disable_irq_nosync(unsigned int);
12 extern void enable_irq(unsigned int);
14 /*
15 * IDT vectors usable for external interrupt sources start
16 * at 0x20:
17 */
18 #define FIRST_EXTERNAL_VECTOR 0x30
20 #define NR_IRQS (256 - FIRST_EXTERNAL_VECTOR)
22 #define HYPERCALL_VECTOR 0x82
24 /*
25 * Vectors 0x30-0x3f are used for ISA interrupts.
26 */
28 /*
29 * Special IRQ vectors used by the SMP architecture, 0xf0-0xff
30 */
31 #define SPURIOUS_APIC_VECTOR 0xff
32 #define ERROR_APIC_VECTOR 0xfe
33 #define INVALIDATE_TLB_VECTOR 0xfd
34 #define EVENT_CHECK_VECTOR 0xfc
35 #define CALL_FUNCTION_VECTOR 0xfb
36 #define KDB_VECTOR 0xfa
38 /*
39 * Local APIC timer IRQ vector is on a different priority level,
40 * to work around the 'lost local interrupt if more than 2 IRQ
41 * sources per level' errata.
42 */
43 #define LOCAL_TIMER_VECTOR 0xef
45 /*
46 * First APIC vector available to drivers: (vectors 0x40-0xee)
47 * we start at 0x41 to spread out vectors evenly between priority
48 * levels. (0x82 is the hypercall vector)
49 */
50 #define FIRST_DEVICE_VECTOR 0x41
51 #define FIRST_SYSTEM_VECTOR 0xef
53 extern int irq_vector[NR_IRQS];
54 #define IO_APIC_VECTOR(irq) irq_vector[irq]
56 /*
57 * Various low-level irq details needed by irq.c, process.c,
58 * time.c, io_apic.c and smp.c
59 *
60 * Interrupt entry/exit code at both C and assembly level
61 */
63 extern void mask_irq(unsigned int irq);
64 extern void unmask_irq(unsigned int irq);
65 extern void disable_8259A_irq(unsigned int irq);
66 extern void enable_8259A_irq(unsigned int irq);
67 extern int i8259A_irq_pending(unsigned int irq);
68 extern void make_8259A_irq(unsigned int irq);
69 extern void init_8259A(int aeoi);
70 extern void send_IPI_self(int vector);
71 extern void init_VISWS_APIC_irqs(void);
72 extern void setup_IO_APIC(void);
73 extern void disable_IO_APIC(void);
74 extern void print_IO_APIC(void);
75 extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
76 extern void send_IPI(int dest, int vector);
78 extern unsigned long io_apic_irqs;
80 extern atomic_t irq_err_count;
81 extern atomic_t irq_mis_count;
83 extern char _stext, _etext;
85 #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
87 #include <xen/irq.h>
89 static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
90 {
91 #if defined(CONFIG_X86_IO_APIC)
92 if (IO_APIC_IRQ(i))
93 send_IPI_self(IO_APIC_VECTOR(i));
94 #endif
95 }
97 #endif /* _ASM_HW_IRQ_H */