xref: /netbsd-src/sys/arch/x86/include/mpconfig.h (revision 1ffa7b76c40339c17a0fb2a09fac93f287cfc046)
1 /*	$NetBSD: mpconfig.h,v 1.1 2003/02/26 21:26:11 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 };
40 
41 struct mp_intr_map
42 {
43 	struct mp_intr_map *next;
44 	struct mp_bus *bus;
45 	int bus_pin;
46 	struct ioapic_softc *ioapic;
47 	int ioapic_pin;
48 	int ioapic_ih;		/* int handle, for apic_intr_est */
49 	int type;		/* from mp spec intr record */
50  	int flags;		/* from mp spec intr record */
51 	u_int32_t redir;
52 	int cpu_id;
53 };
54 
55 #if defined(_KERNEL)
56 extern int mp_verbose;
57 extern struct mp_bus *mp_busses;
58 extern struct mp_intr_map *mp_intrs;
59 extern int mp_nintr;
60 extern int mp_isa_bus, mp_eisa_bus;
61 extern int mp_nbus;
62 #endif
63 #endif
64 
65 #endif /* _X86_MPCONFIG_H */
66