xref: /netbsd/sys/arch/i386/include/pic.h (revision c4a72b64)
1 /*	$NetBSD: pic.h,v 1.1 2002/11/22 15:07:58 fvdl Exp $	*/
2 
3 #ifndef _I386_PIC_H
4 #define _I386_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 	__cpu_simple_lock_t pic_lock;
18         void (*pic_hwmask)(struct pic *, int);
19         void (*pic_hwunmask)(struct pic *, int);
20 	void (*pic_addroute)(struct pic *, struct cpu_info *, int, int, int);
21 	void (*pic_delroute)(struct pic *, struct cpu_info *, int, int, int);
22 	struct intrstub *pic_level_stubs;
23 	struct intrstub *pic_edge_stubs;
24 };
25 
26 #define pic_name pic_dev.dv_xname
27 
28 /*
29  * PIC types.
30  */
31 #define PIC_I8259	0
32 #define PIC_IOAPIC	1
33 #define PIC_LAPIC	2
34 #define PIC_SOFT	3
35 
36 extern struct pic i8259_pic;
37 extern struct pic local_pic;
38 extern struct pic softintr_pic;
39 #endif
40