1 | /** @file
|
---|
2 | Defives data structures per MultiProcessor Specification Ver 1.4.
|
---|
3 |
|
---|
4 | The MultiProcessor Specification defines an enhancement to the standard
|
---|
5 | to which PC manufacturers design DOS-compatible systems.
|
---|
6 |
|
---|
7 | Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
8 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
9 |
|
---|
10 | **/
|
---|
11 |
|
---|
12 | #ifndef _LEGACY_BIOS_MPTABLE_H_
|
---|
13 | #define _LEGACY_BIOS_MPTABLE_H_
|
---|
14 |
|
---|
15 | #define EFI_LEGACY_MP_TABLE_REV_1_4 0x04
|
---|
16 |
|
---|
17 | //
|
---|
18 | // Define MP table structures. All are packed.
|
---|
19 | //
|
---|
20 | #pragma pack(1)
|
---|
21 |
|
---|
22 | #define EFI_LEGACY_MP_TABLE_FLOATING_POINTER_SIGNATURE SIGNATURE_32 ('_', 'M', 'P', '_')
|
---|
23 | typedef struct {
|
---|
24 | UINT32 Reserved1 : 6;
|
---|
25 | UINT32 MutipleClk : 1;
|
---|
26 | UINT32 Imcr : 1;
|
---|
27 | UINT32 Reserved2 : 24;
|
---|
28 | } FEATUREBYTE2_5;
|
---|
29 |
|
---|
30 | typedef struct {
|
---|
31 | UINT32 Signature;
|
---|
32 | UINT32 PhysicalAddress;
|
---|
33 | UINT8 Length;
|
---|
34 | UINT8 SpecRev;
|
---|
35 | UINT8 Checksum;
|
---|
36 | UINT8 FeatureByte1;
|
---|
37 | FEATUREBYTE2_5 FeatureByte2_5;
|
---|
38 | } EFI_LEGACY_MP_TABLE_FLOATING_POINTER;
|
---|
39 |
|
---|
40 | #define EFI_LEGACY_MP_TABLE_HEADER_SIGNATURE SIGNATURE_32 ('P', 'C', 'M', 'P')
|
---|
41 | typedef struct {
|
---|
42 | UINT32 Signature;
|
---|
43 | UINT16 BaseTableLength;
|
---|
44 | UINT8 SpecRev;
|
---|
45 | UINT8 Checksum;
|
---|
46 | CHAR8 OemId[8];
|
---|
47 | CHAR8 OemProductId[12];
|
---|
48 | UINT32 OemTablePointer;
|
---|
49 | UINT16 OemTableSize;
|
---|
50 | UINT16 EntryCount;
|
---|
51 | UINT32 LocalApicAddress;
|
---|
52 | UINT16 ExtendedTableLength;
|
---|
53 | UINT8 ExtendedChecksum;
|
---|
54 | UINT8 Reserved;
|
---|
55 | } EFI_LEGACY_MP_TABLE_HEADER;
|
---|
56 |
|
---|
57 | typedef struct {
|
---|
58 | UINT8 EntryType;
|
---|
59 | } EFI_LEGACY_MP_TABLE_ENTRY_TYPE;
|
---|
60 |
|
---|
61 | //
|
---|
62 | // Entry Type 0: Processor.
|
---|
63 | //
|
---|
64 | #define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_PROCESSOR 0x00
|
---|
65 | typedef struct {
|
---|
66 | UINT8 Enabled : 1;
|
---|
67 | UINT8 Bsp : 1;
|
---|
68 | UINT8 Reserved : 6;
|
---|
69 | } EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FLAGS;
|
---|
70 |
|
---|
71 | typedef struct {
|
---|
72 | UINT32 Stepping : 4;
|
---|
73 | UINT32 Model : 4;
|
---|
74 | UINT32 Family : 4;
|
---|
75 | UINT32 Reserved : 20;
|
---|
76 | } EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_SIGNATURE;
|
---|
77 |
|
---|
78 | typedef struct {
|
---|
79 | UINT32 Fpu : 1;
|
---|
80 | UINT32 Reserved1 : 6;
|
---|
81 | UINT32 Mce : 1;
|
---|
82 | UINT32 Cx8 : 1;
|
---|
83 | UINT32 Apic : 1;
|
---|
84 | UINT32 Reserved2 : 22;
|
---|
85 | } EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FEATURES;
|
---|
86 |
|
---|
87 | typedef struct {
|
---|
88 | UINT8 EntryType;
|
---|
89 | UINT8 Id;
|
---|
90 | UINT8 Ver;
|
---|
91 | EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FLAGS Flags;
|
---|
92 | EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_SIGNATURE Signature;
|
---|
93 | EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FEATURES Features;
|
---|
94 | UINT32 Reserved1;
|
---|
95 | UINT32 Reserved2;
|
---|
96 | } EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR;
|
---|
97 |
|
---|
98 | //
|
---|
99 | // Entry Type 1: Bus.
|
---|
100 | //
|
---|
101 | #define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_BUS 0x01
|
---|
102 | typedef struct {
|
---|
103 | UINT8 EntryType;
|
---|
104 | UINT8 Id;
|
---|
105 | CHAR8 TypeString[6];
|
---|
106 | } EFI_LEGACY_MP_TABLE_ENTRY_BUS;
|
---|
107 |
|
---|
108 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_CBUS "CBUS " // Corollary CBus
|
---|
109 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_CBUSII "CBUSII" // Corollary CBUS II
|
---|
110 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_EISA "EISA " // Extended ISA
|
---|
111 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_FUTURE "FUTURE" // IEEE FutureBus
|
---|
112 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_INTERN "INTERN" // Internal bus
|
---|
113 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_ISA "ISA " // Industry Standard Architecture
|
---|
114 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MBI "MBI " // Multibus I
|
---|
115 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MBII "MBII " // Multibus II
|
---|
116 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MCA "MCA " // Micro Channel Architecture
|
---|
117 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MPI "MPI " // MPI
|
---|
118 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MPSA "MPSA " // MPSA
|
---|
119 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_NUBUS "NUBUS " // Apple Macintosh NuBus
|
---|
120 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_PCI "PCI " // Peripheral Component Interconnect
|
---|
121 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_PCMCIA "PCMCIA" // PC Memory Card International Assoc.
|
---|
122 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_TC "TC " // DEC TurboChannel
|
---|
123 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_VL "VL " // VESA Local Bus
|
---|
124 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_VME "VME " // VMEbus
|
---|
125 | #define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_XPRESS "XPRESS" // Express System Bus
|
---|
126 | //
|
---|
127 | // Entry Type 2: I/O APIC.
|
---|
128 | //
|
---|
129 | #define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_IOAPIC 0x02
|
---|
130 | typedef struct {
|
---|
131 | UINT8 Enabled : 1;
|
---|
132 | UINT8 Reserved : 7;
|
---|
133 | } EFI_LEGACY_MP_TABLE_ENTRY_IOAPIC_FLAGS;
|
---|
134 |
|
---|
135 | typedef struct {
|
---|
136 | UINT8 EntryType;
|
---|
137 | UINT8 Id;
|
---|
138 | UINT8 Ver;
|
---|
139 | EFI_LEGACY_MP_TABLE_ENTRY_IOAPIC_FLAGS Flags;
|
---|
140 | UINT32 Address;
|
---|
141 | } EFI_LEGACY_MP_TABLE_ENTRY_IOAPIC;
|
---|
142 |
|
---|
143 | //
|
---|
144 | // Entry Type 3: I/O Interrupt Assignment.
|
---|
145 | //
|
---|
146 | #define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_IO_INT 0x03
|
---|
147 | typedef struct {
|
---|
148 | UINT16 Polarity : 2;
|
---|
149 | UINT16 Trigger : 2;
|
---|
150 | UINT16 Reserved : 12;
|
---|
151 | } EFI_LEGACY_MP_TABLE_ENTRY_INT_FLAGS;
|
---|
152 |
|
---|
153 | typedef struct {
|
---|
154 | UINT8 IntNo : 2;
|
---|
155 | UINT8 Dev : 5;
|
---|
156 | UINT8 Reserved : 1;
|
---|
157 | } EFI_LEGACY_MP_TABLE_ENTRY_INT_FIELDS;
|
---|
158 |
|
---|
159 | typedef union {
|
---|
160 | EFI_LEGACY_MP_TABLE_ENTRY_INT_FIELDS fields;
|
---|
161 | UINT8 byte;
|
---|
162 | } EFI_LEGACY_MP_TABLE_ENTRY_INT_SOURCE_BUS_IRQ;
|
---|
163 |
|
---|
164 | typedef struct {
|
---|
165 | UINT8 EntryType;
|
---|
166 | UINT8 IntType;
|
---|
167 | EFI_LEGACY_MP_TABLE_ENTRY_INT_FLAGS Flags;
|
---|
168 | UINT8 SourceBusId;
|
---|
169 | EFI_LEGACY_MP_TABLE_ENTRY_INT_SOURCE_BUS_IRQ SourceBusIrq;
|
---|
170 | UINT8 DestApicId;
|
---|
171 | UINT8 DestApicIntIn;
|
---|
172 | } EFI_LEGACY_MP_TABLE_ENTRY_IO_INT;
|
---|
173 |
|
---|
174 | typedef enum {
|
---|
175 | EfiLegacyMpTableEntryIoIntTypeInt = 0,
|
---|
176 | EfiLegacyMpTableEntryIoIntTypeNmi = 1,
|
---|
177 | EfiLegacyMpTableEntryIoIntTypeSmi = 2,
|
---|
178 | EfiLegacyMpTableEntryIoIntTypeExtInt = 3,
|
---|
179 | } EFI_LEGACY_MP_TABLE_ENTRY_IO_INT_TYPE;
|
---|
180 |
|
---|
181 | typedef enum {
|
---|
182 | EfiLegacyMpTableEntryIoIntFlagsPolaritySpec = 0x0,
|
---|
183 | EfiLegacyMpTableEntryIoIntFlagsPolarityActiveHigh = 0x1,
|
---|
184 | EfiLegacyMpTableEntryIoIntFlagsPolarityReserved = 0x2,
|
---|
185 | EfiLegacyMpTableEntryIoIntFlagsPolarityActiveLow = 0x3,
|
---|
186 | } EFI_LEGACY_MP_TABLE_ENTRY_IO_INT_FLAGS_POLARITY;
|
---|
187 |
|
---|
188 | typedef enum {
|
---|
189 | EfiLegacyMpTableEntryIoIntFlagsTriggerSpec = 0x0,
|
---|
190 | EfiLegacyMpTableEntryIoIntFlagsTriggerEdge = 0x1,
|
---|
191 | EfiLegacyMpTableEntryIoIntFlagsTriggerReserved = 0x2,
|
---|
192 | EfiLegacyMpTableEntryIoIntFlagsTriggerLevel = 0x3,
|
---|
193 | } EFI_LEGACY_MP_TABLE_ENTRY_IO_INT_FLAGS_TRIGGER;
|
---|
194 |
|
---|
195 | //
|
---|
196 | // Entry Type 4: Local Interrupt Assignment.
|
---|
197 | //
|
---|
198 | #define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_LOCAL_INT 0x04
|
---|
199 | typedef struct {
|
---|
200 | UINT8 EntryType;
|
---|
201 | UINT8 IntType;
|
---|
202 | EFI_LEGACY_MP_TABLE_ENTRY_INT_FLAGS Flags;
|
---|
203 | UINT8 SourceBusId;
|
---|
204 | EFI_LEGACY_MP_TABLE_ENTRY_INT_SOURCE_BUS_IRQ SourceBusIrq;
|
---|
205 | UINT8 DestApicId;
|
---|
206 | UINT8 DestApicIntIn;
|
---|
207 | } EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT;
|
---|
208 |
|
---|
209 | typedef enum {
|
---|
210 | EfiLegacyMpTableEntryLocalIntTypeInt = 0,
|
---|
211 | EfiLegacyMpTableEntryLocalIntTypeNmi = 1,
|
---|
212 | EfiLegacyMpTableEntryLocalIntTypeSmi = 2,
|
---|
213 | EfiLegacyMpTableEntryLocalIntTypeExtInt = 3,
|
---|
214 | } EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT_TYPE;
|
---|
215 |
|
---|
216 | typedef enum {
|
---|
217 | EfiLegacyMpTableEntryLocalIntFlagsPolaritySpec = 0x0,
|
---|
218 | EfiLegacyMpTableEntryLocalIntFlagsPolarityActiveHigh = 0x1,
|
---|
219 | EfiLegacyMpTableEntryLocalIntFlagsPolarityReserved = 0x2,
|
---|
220 | EfiLegacyMpTableEntryLocalIntFlagsPolarityActiveLow = 0x3,
|
---|
221 | } EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT_FLAGS_POLARITY;
|
---|
222 |
|
---|
223 | typedef enum {
|
---|
224 | EfiLegacyMpTableEntryLocalIntFlagsTriggerSpec = 0x0,
|
---|
225 | EfiLegacyMpTableEntryLocalIntFlagsTriggerEdge = 0x1,
|
---|
226 | EfiLegacyMpTableEntryLocalIntFlagsTriggerReserved = 0x2,
|
---|
227 | EfiLegacyMpTableEntryLocalIntFlagsTriggerLevel = 0x3,
|
---|
228 | } EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT_FLAGS_TRIGGER;
|
---|
229 |
|
---|
230 | //
|
---|
231 | // Entry Type 128: System Address Space Mapping.
|
---|
232 | //
|
---|
233 | #define EFI_LEGACY_MP_TABLE_ENTRY_EXT_TYPE_SYS_ADDR_SPACE_MAPPING 0x80
|
---|
234 | typedef struct {
|
---|
235 | UINT8 EntryType;
|
---|
236 | UINT8 Length;
|
---|
237 | UINT8 BusId;
|
---|
238 | UINT8 AddressType;
|
---|
239 | UINT64 AddressBase;
|
---|
240 | UINT64 AddressLength;
|
---|
241 | } EFI_LEGACY_MP_TABLE_ENTRY_EXT_SYS_ADDR_SPACE_MAPPING;
|
---|
242 |
|
---|
243 | typedef enum {
|
---|
244 | EfiLegacyMpTableEntryExtSysAddrSpaceMappingIo = 0,
|
---|
245 | EfiLegacyMpTableEntryExtSysAddrSpaceMappingMemory = 1,
|
---|
246 | EfiLegacyMpTableEntryExtSysAddrSpaceMappingPrefetch = 2,
|
---|
247 | } EFI_LEGACY_MP_TABLE_ENTRY_EXT_SYS_ADDR_SPACE_MAPPING_TYPE;
|
---|
248 |
|
---|
249 | //
|
---|
250 | // Entry Type 129: Bus Hierarchy.
|
---|
251 | //
|
---|
252 | #define EFI_LEGACY_MP_TABLE_ENTRY_EXT_TYPE_BUS_HIERARCHY 0x81
|
---|
253 | typedef struct {
|
---|
254 | UINT8 SubtractiveDecode : 1;
|
---|
255 | UINT8 Reserved : 7;
|
---|
256 | } EFI_LEGACY_MP_TABLE_ENTRY_EXT_BUS_HIERARCHY_BUSINFO;
|
---|
257 |
|
---|
258 | typedef struct {
|
---|
259 | UINT8 EntryType;
|
---|
260 | UINT8 Length;
|
---|
261 | UINT8 BusId;
|
---|
262 | EFI_LEGACY_MP_TABLE_ENTRY_EXT_BUS_HIERARCHY_BUSINFO BusInfo;
|
---|
263 | UINT8 ParentBus;
|
---|
264 | UINT8 Reserved1;
|
---|
265 | UINT8 Reserved2;
|
---|
266 | UINT8 Reserved3;
|
---|
267 | } EFI_LEGACY_MP_TABLE_ENTRY_EXT_BUS_HIERARCHY;
|
---|
268 |
|
---|
269 | //
|
---|
270 | // Entry Type 130: Compatibility Bus Address Space Modifier.
|
---|
271 | //
|
---|
272 | #define EFI_LEGACY_MP_TABLE_ENTRY_EXT_TYPE_COMPAT_BUS_ADDR_SPACE_MODIFIER 0x82
|
---|
273 | typedef struct {
|
---|
274 | UINT8 RangeMode : 1;
|
---|
275 | UINT8 Reserved : 7;
|
---|
276 | } EFI_LEGACY_MP_TABLE_ENTRY_EXT_COMPAT_BUS_ADDR_SPACE_MODIFIER_ADDR_MODE;
|
---|
277 |
|
---|
278 | typedef struct {
|
---|
279 | UINT8 EntryType;
|
---|
280 | UINT8 Length;
|
---|
281 | UINT8 BusId;
|
---|
282 | EFI_LEGACY_MP_TABLE_ENTRY_EXT_COMPAT_BUS_ADDR_SPACE_MODIFIER_ADDR_MODE AddrMode;
|
---|
283 | UINT32 PredefinedRangeList;
|
---|
284 | } EFI_LEGACY_MP_TABLE_ENTRY_EXT_COMPAT_BUS_ADDR_SPACE_MODIFIER;
|
---|
285 |
|
---|
286 | #pragma pack()
|
---|
287 |
|
---|
288 | #endif
|
---|