arm: make signal handlers work
[minix.git] / sys / arch / x86 / include / mpconfig.h
blob733ba6483bfa4802f5147369f26872eeafe130cd
1 /* $NetBSD: mpconfig.h,v 1.14 2012/06/15 13:57:59 yamt Exp $ */
3 /*
4 * Definitions originally from the mpbios code, but now used for ACPI
5 * MP config as well.
6 */
8 #ifndef _X86_MPCONFIG_H_
9 #define _X86_MPCONFIG_H_
12 * XXX
14 #include <sys/bus.h>
15 #include <dev/pci/pcivar.h>
16 #include <machine/pci_machdep.h>
18 /*
19 * Interrupt types
21 #define MPS_INTTYPE_INT 0
22 #define MPS_INTTYPE_NMI 1
23 #define MPS_INTTYPE_SMI 2
24 #define MPS_INTTYPE_ExtINT 3
26 #define MPS_INTPO_DEF 0
27 #define MPS_INTPO_ACTHI 1
28 #define MPS_INTPO_ACTLO 3
30 #define MPS_INTTR_DEF 0
31 #define MPS_INTTR_EDGE 1
32 #define MPS_INTTR_LEVEL 3
34 #ifndef _LOCORE
36 struct mpbios_int;
38 struct mp_bus
40 const char *mb_name; /* XXX bus name */
41 int mb_idx; /* XXX bus index */
42 void (*mb_intr_print)(int);
43 void (*mb_intr_cfg)(const struct mpbios_int *, uint32_t *);
44 struct mp_intr_map *mb_intrs;
45 uint32_t mb_data; /* random bus-specific datum. */
46 device_t mb_dev; /* has been autoconfigured if mb_dev != NULL */
47 pcitag_t *mb_pci_bridge_tag;
48 pci_chipset_tag_t mb_pci_chipset_tag;
51 struct mp_intr_map
53 struct mp_intr_map *next;
54 struct mp_bus *bus;
56 * encoding of bus_pin is mp_bus dependant.
57 * for pci, bus_pin = (pci_device_number << 2) | pin
58 * where pin is 0=INTA ... 3=INTD.
60 int bus_pin;
61 struct pic *ioapic; /* NULL for local apic */
62 int ioapic_pin;
63 int ioapic_ih; /* int handle, see i82093var.h for encoding */
64 int type; /* from mp spec intr record */
65 int flags; /* from mp spec intr record */
66 uint32_t redir;
67 uint32_t cpu_id;
68 int global_int; /* ACPI global interrupt number */
69 int sflags; /* other, software flags (see below) */
70 void *linkdev;
71 int sourceindex;
74 #define MPI_OVR 0x0001 /* Was overridden by an ACPI OVR */
76 #if defined(_KERNEL)
77 extern int mp_verbose;
78 extern struct mp_bus *mp_busses;
79 extern struct mp_intr_map *mp_intrs;
80 extern int mp_nintr;
81 extern int mp_isa_bus, mp_eisa_bus;
82 extern int mp_nbus;
83 int mp_pci_scan(device_t, struct pcibus_attach_args *, cfprint_t);
84 void mp_pci_childdetached(device_t, device_t);
85 #endif
86 #endif
88 #endif /* _X86_MPCONFIG_H_ */