1 /* $NetBSD: mpconfig.h,v 1.3 2003/05/29 20:22:32 fvdl Exp $ */ 2 3 /* 4 * Definitions originally from the mpbios code, but now used for ACPI 5 * MP config as well. 6 */ 7 8 #ifndef _X86_MPCONFIG_H 9 #define _X86_MPCONFIG_H 10 11 /* 12 * Interrupt typess 13 */ 14 #define MPS_INTTYPE_INT 0 15 #define MPS_INTTYPE_NMI 1 16 #define MPS_INTTYPE_SMI 2 17 #define MPS_INTTYPE_ExtINT 3 18 19 #define MPS_INTPO_DEF 0 20 #define MPS_INTPO_ACTHI 1 21 #define MPS_INTPO_ACTLO 3 22 23 #define MPS_INTTR_DEF 0 24 #define MPS_INTTR_EDGE 1 25 #define MPS_INTTR_LEVEL 3 26 27 #ifndef _LOCORE 28 29 struct mpbios_int; 30 31 struct mp_bus 32 { 33 char *mb_name; /* XXX bus name */ 34 int mb_idx; /* XXX bus index */ 35 void (*mb_intr_print) __P((int)); 36 void (*mb_intr_cfg) __P((const struct mpbios_int *, u_int32_t *)); 37 struct mp_intr_map *mb_intrs; 38 u_int32_t mb_data; /* random bus-specific datum. */ 39 int mb_configured; /* has been autoconfigured */ 40 }; 41 42 struct mp_intr_map 43 { 44 struct mp_intr_map *next; 45 struct mp_bus *bus; 46 int bus_pin; 47 struct ioapic_softc *ioapic; 48 int ioapic_pin; 49 int ioapic_ih; /* int handle, for apic_intr_est */ 50 int type; /* from mp spec intr record */ 51 int flags; /* from mp spec intr record */ 52 u_int32_t redir; 53 int cpu_id; 54 int global_int; /* ACPI global interrupt number */ 55 }; 56 57 #if defined(_KERNEL) 58 extern int mp_verbose; 59 extern struct mp_bus *mp_busses; 60 extern struct mp_intr_map *mp_intrs; 61 extern int mp_nintr; 62 extern int mp_isa_bus, mp_eisa_bus; 63 extern int mp_nbus; 64 #endif 65 #endif 66 67 #endif /* _X86_MPCONFIG_H */ 68