1 /* $NetBSD: pic.h,v 1.6 2009/04/02 00:09:32 dyoung Exp $ */ 2 3 #ifndef _X86_PIC_H 4 #define _X86_PIC_H 5 6 struct cpu_info; 7 8 /* 9 * Structure common to all PIC softcs 10 */ 11 struct pic { 12 const char *pic_name; 13 int pic_type; 14 int pic_vecbase; 15 int pic_apicid; 16 __cpu_simple_lock_t pic_lock; 17 void (*pic_hwmask)(struct pic *, int); 18 void (*pic_hwunmask)(struct pic *, int); 19 void (*pic_addroute)(struct pic *, struct cpu_info *, int, int, int); 20 void (*pic_delroute)(struct pic *, struct cpu_info *, int, int, int); 21 struct intrstub *pic_level_stubs; 22 struct intrstub *pic_edge_stubs; 23 struct ioapic_softc *pic_ioapic; /* if pic_type == PIC_IOAPIC */ 24 }; 25 26 /* 27 * PIC types. 28 */ 29 #define PIC_I8259 0 30 #define PIC_IOAPIC 1 31 #define PIC_LAPIC 2 32 #define PIC_SOFT 3 33 34 extern struct pic i8259_pic; 35 extern struct pic local_pic; 36 extern struct pic softintr_pic; 37 #endif 38