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