mpbiosvar.h revision 1.1.2.1 1 /*-
2 * Copyright (c) 2000 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by RedBack Networks Inc.
7 *
8 * Author: Bill Sommerfeld
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39
40 #ifndef _MPS_H_
41 #define _MPS_H_
42
43 #define MP_TRAMPOLINE (3 * NBPG)
44
45 #if !defined(_LOCORE)
46
47 struct mp_bus
48 {
49 char *mb_name; /* XXX bus name */
50 int mb_idx; /* XXX bus index */
51 void (*mb_intr_print)(int);
52 void (*mb_intr_cfg)(int, int, u_int32_t *); /* XXX XXX intf */
53 struct mp_intr_map *mb_intrs;
54 };
55
56 struct mp_intr_map
57 {
58 struct mp_intr_map *next;
59 struct mp_bus *bus;
60 int bus_pin;
61 struct ioapic_softc *ioapic;
62 int ioapic_pin;
63 int ioapic_ih; /* int handle, for apic_intr_est */
64 int type; /* from mp spec intr record */
65 int flags; /* from mp spec intr record */
66 u_int32_t redir;
67 };
68
69 #if defined(_KERNEL)
70 extern int mp_verbose;
71 extern struct mp_bus *mp_busses;
72 extern struct mp_intr_map *mp_intrs;
73 extern int mp_isa_bus;
74
75 void mpbios_scan __P((struct device *));
76 int mpbios_probe __P((struct device *));
77 #endif
78
79 #endif
80
81 #endif
82