Annotation of sys/arch/amd64/include/mpbiosreg.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: mpbiosreg.h,v 1.1 2004/01/28 01:39:39 mickey Exp $ */
2: /* $NetBSD: mpbiosreg.h,v 1.3 2003/03/04 23:27:32 fvdl Exp $ */
3:
4: /*-
5: * Copyright (c) 2000 The NetBSD Foundation, Inc.
6: * All rights reserved.
7: *
8: * This code is derived from software contributed to The NetBSD Foundation
9: * by RedBack Networks Inc.
10: *
11: * Author: Bill Sommerfeld
12: *
13: * Redistribution and use in source and binary forms, with or without
14: * modification, are permitted provided that the following conditions
15: * are met:
16: * 1. Redistributions of source code must retain the above copyright
17: * notice, this list of conditions and the following disclaimer.
18: * 2. Redistributions in binary form must reproduce the above copyright
19: * notice, this list of conditions and the following disclaimer in the
20: * documentation and/or other materials provided with the distribution.
21: * 3. All advertising materials mentioning features or use of this software
22: * must display the following acknowledgement:
23: * This product includes software developed by the NetBSD
24: * Foundation, Inc. and its contributors.
25: * 4. Neither the name of The NetBSD Foundation nor the names of its
26: * contributors may be used to endorse or promote products derived
27: * from this software without specific prior written permission.
28: *
29: * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
30: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
31: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
33: * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39: * POSSIBILITY OF SUCH DAMAGE.
40: */
41:
42: #ifndef _X86_MPBIOSREG_H_
43: #define _X86_MPBIOSREG_H_
44:
45: #define BIOS_BASE (0xf0000)
46: #define BIOS_SIZE (0x10000)
47: #define BIOS_COUNT (BIOS_SIZE)
48:
49: /*
50: * Multiprocessor config table entry types.
51: */
52:
53: #define MPS_MCT_CPU 0
54: #define MPS_MCT_BUS 1
55: #define MPS_MCT_IOAPIC 2
56: #define MPS_MCT_IOINT 3
57: #define MPS_MCT_LINT 4
58:
59: #define MPS_MCT_NTYPES 5
60:
61: /* MP Floating Pointer Structure */
62: struct mpbios_fps {
63: u_int32_t signature;
64: /* string defined by the Intel MP Spec as identifying the MP table */
65: #define MP_FP_SIG 0x5f504d5f /* _MP_ */
66:
67: u_int32_t pap;
68: u_int8_t length;
69: u_int8_t spec_rev;
70: u_int8_t checksum;
71: u_int8_t mpfb1; /* system configuration */
72: u_int8_t mpfb2; /* flags */
73: #define MPFPS_FLAG_IMCR 0x80 /* IMCR present */
74: u_int8_t mpfb3; /* unused */
75: u_int8_t mpfb4; /* unused */
76: u_int8_t mpfb5; /* unused */
77: };
78:
79: /* MP Configuration Table Header */
80: struct mpbios_cth {
81: u_int32_t signature;
82: #define MP_CT_SIG 0x504d4350 /* PCMP */
83:
84: u_int16_t base_len;
85: u_int8_t spec_rev;
86: u_int8_t checksum;
87: u_int8_t oem_id[8];
88: u_int8_t product_id[12];
89: u_int32_t oem_table_pointer;
90: u_int16_t oem_table_size;
91: u_int16_t entry_count;
92: u_int32_t apic_address;
93: u_int16_t ext_len;
94: u_int8_t ext_cksum;
95: u_int8_t reserved;
96: };
97:
98: struct mpbios_proc {
99: u_int8_t type;
100: u_int8_t apic_id;
101: u_int8_t apic_version;
102: u_int8_t cpu_flags;
103: #define PROCENTRY_FLAG_EN 0x01
104: #define PROCENTRY_FLAG_BP 0x02
105: u_int32_t cpu_signature;
106: u_int32_t feature_flags;
107: u_int32_t reserved1;
108: u_int32_t reserved2;
109: };
110:
111: struct mpbios_bus {
112: u_int8_t type;
113: u_int8_t bus_id;
114: char bus_type[6];
115: };
116:
117: struct mpbios_ioapic {
118: u_int8_t type;
119: u_int8_t apic_id;
120: u_int8_t apic_version;
121: u_int8_t apic_flags;
122: #define IOAPICENTRY_FLAG_EN 0x01
123: u_int32_t apic_address;
124: };
125:
126: struct mpbios_int {
127: u_int8_t type;
128: u_int8_t int_type;
129: u_int16_t int_flags;
130: u_int8_t src_bus_id;
131: u_int8_t src_bus_irq;
132: u_int8_t dst_apic_id;
133: #define MPS_ALL_APICS 0xff
134: u_int8_t dst_apic_int;
135: };
136:
137:
138: #endif /* !_X86_MPBIOSREG_H_ */
CVSweb