pic.h revision 1.2 1 /* $NetBSD: pic.h,v 1.2 2006/07/04 00:30:22 christos Exp $ */
2
3 #ifndef _X86_PIC_H
4 #define _X86_PIC_H
5
6 #include <sys/device.h>
7 #include <sys/lock.h>
8
9 struct cpu_info;
10
11 /*
12 * Structure common to all PIC softcs
13 */
14 struct pic {
15 struct device pic_dev;
16 int pic_type;
17 int pic_vecbase;
18 int pic_apicid;
19 __cpu_simple_lock_t pic_lock;
20 void (*pic_hwmask)(struct pic *, int);
21 void (*pic_hwunmask)(struct pic *, int);
22 void (*pic_addroute)(struct pic *, struct cpu_info *, int, int, int);
23 void (*pic_delroute)(struct pic *, struct cpu_info *, int, int, int);
24 struct intrstub *pic_level_stubs;
25 struct intrstub *pic_edge_stubs;
26 };
27
28 #define pic_name pic_dev.dv_xname
29
30 /*
31 * PIC types.
32 */
33 #define PIC_I8259 0
34 #define PIC_IOAPIC 1
35 #define PIC_LAPIC 2
36 #define PIC_SOFT 3
37
38 extern struct pic i8259_pic;
39 extern struct pic local_pic;
40 extern struct pic softintr_pic;
41 #endif
42