2 * Copyright (c) 1996, by Steve Passe
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. The name of the developer may NOT be used to endorse or promote products
11 * derived from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 #ifndef __MACHINE_MPTABLE_H__
29 #define __MACHINE_MPTABLE_H__
38 UNKNOWN_BUSTYPE = 0xff
41 /* MP Floating Pointer Structure */
42 typedef struct MPFPS {
55 #define MPFB2_IMCR_PRESENT 0x80
56 #define MPFB2_MUL_CLK_SRCS 0x40
58 /* MP Configuration Table Header */
59 typedef struct MPCTH {
61 u_short base_table_length;
65 u_char product_id[12];
66 u_int32_t oem_table_pointer;
67 u_short oem_table_size;
69 u_int32_t apic_address;
70 u_short extended_table_length;
71 u_char extended_table_checksum;
75 #define MPCT_ENTRY_PROCESSOR 0
76 #define MPCT_ENTRY_BUS 1
77 #define MPCT_ENTRY_IOAPIC 2
78 #define MPCT_ENTRY_INT 3
79 #define MPCT_ENTRY_LOCAL_INT 4
81 typedef struct PROCENTRY {
92 #define PROCENTRY_FLAG_EN 0x01
93 #define PROCENTRY_FLAG_BP 0x02
95 typedef struct BUSENTRY {
101 typedef struct IOAPICENTRY {
106 u_int32_t apic_address;
107 } *io_apic_entry_ptr;
109 #define IOAPICENTRY_FLAG_EN 0x01
111 typedef struct INTENTRY {
121 #define INTENTRY_TYPE_INT 0
122 #define INTENTRY_TYPE_NMI 1
123 #define INTENTRY_TYPE_SMI 2
124 #define INTENTRY_TYPE_EXTINT 3
126 #define INTENTRY_FLAGS_POLARITY 0x3
127 #define INTENTRY_FLAGS_POLARITY_CONFORM 0x0
128 #define INTENTRY_FLAGS_POLARITY_ACTIVEHI 0x1
129 #define INTENTRY_FLAGS_POLARITY_ACTIVELO 0x3
130 #define INTENTRY_FLAGS_TRIGGER 0xc
131 #define INTENTRY_FLAGS_TRIGGER_CONFORM 0x0
132 #define INTENTRY_FLAGS_TRIGGER_EDGE 0x4
133 #define INTENTRY_FLAGS_TRIGGER_LEVEL 0xc
135 /* descriptions of MP basetable entries */
136 typedef struct BASETABLE_ENTRY {
143 int mptable_pci_probe_table(int bus);
144 int mptable_pci_route_interrupt(device_t pcib, device_t dev, int pin);
146 #endif /* !__MACHINE_MPTABLE_H__ */