1/* $OpenBSD: mpconfig.h,v 1.8 2011/10/21 20:48:11 kettenis Exp $ */
2/* $NetBSD: mpconfig.h,v 1.2 2003/05/11 00:05:52 fvdl Exp $ */
3
4/*
5 * Definitions originally from the mpbios code, but now used for ACPI
6 * MP config as well.
7 */
8
9#ifndef _AMD64_MPCONFIG_H
10#define _AMD64_MPCONFIG_H
11
12#ifndef _LOCORE
13
14struct mpbios_int;
15
16struct mp_bus {
17 char *mb_name; /* XXX bus name */
18 int mb_idx; /* XXX bus index */
19 void (*mb_intr_print)(int);
20 void (*mb_intr_cfg)(const struct mpbios_int *, u_int32_t *);
21 struct mp_intr_map *mb_intrs;
22 u_int32_t mb_data; /* random bus-specific datum. */
23};
24
25struct mp_intr_map {
26 struct mp_intr_map *next;
27 struct mp_bus *bus;
28 int bus_pin;
29 struct ioapic_softc *ioapic;
30 int ioapic_pin;
31 int ioapic_ih; /* int handle, for apic_intr_est */
32 int type; /* from mp spec intr record */
33 int flags; /* from mp spec intr record */
34 u_int32_t redir;
35 int cpu_id;
36};
37
38#if defined(_KERNEL)
39extern int mp_verbose;
40extern struct mp_bus *mp_busses;
41extern int mp_nbusses;
42extern struct mp_intr_map *mp_intrs;
43extern int mp_nintrs;
44extern struct mp_bus *mp_isa_bus;
45extern struct mp_bus *mp_eisa_bus;
46#endif
47#endif
48
49#endif /* _AMD64_MPCONFIG_H */