TianoCore EDK2 master
Loading...
Searching...
No Matches
LegacyBiosMpTable.h
Go to the documentation of this file.
1
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', '_')
23typedef struct {
24 UINT32 Reserved1 : 6;
25 UINT32 MutipleClk : 1;
26 UINT32 Imcr : 1;
27 UINT32 Reserved2 : 24;
29
30typedef struct {
31 UINT32 Signature;
32 UINT32 PhysicalAddress;
33 UINT8 Length;
34 UINT8 SpecRev;
35 UINT8 Checksum;
36 UINT8 FeatureByte1;
37 FEATUREBYTE2_5 FeatureByte2_5;
39
40#define EFI_LEGACY_MP_TABLE_HEADER_SIGNATURE SIGNATURE_32 ('P', 'C', 'M', 'P')
41typedef 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;
56
57typedef struct {
58 UINT8 EntryType;
60
61//
62// Entry Type 0: Processor.
63//
64#define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_PROCESSOR 0x00
65typedef struct {
66 UINT8 Enabled : 1;
67 UINT8 Bsp : 1;
68 UINT8 Reserved : 6;
70
71typedef struct {
72 UINT32 Stepping : 4;
73 UINT32 Model : 4;
74 UINT32 Family : 4;
75 UINT32 Reserved : 20;
77
78typedef 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;
86
87typedef struct {
88 UINT8 EntryType;
89 UINT8 Id;
90 UINT8 Ver;
94 UINT32 Reserved1;
95 UINT32 Reserved2;
97
98//
99// Entry Type 1: Bus.
100//
101#define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_BUS 0x01
102typedef struct {
103 UINT8 EntryType;
104 UINT8 Id;
105 CHAR8 TypeString[6];
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
130typedef struct {
131 UINT8 Enabled : 1;
132 UINT8 Reserved : 7;
134
135typedef struct {
136 UINT8 EntryType;
137 UINT8 Id;
138 UINT8 Ver;
140 UINT32 Address;
142
143//
144// Entry Type 3: I/O Interrupt Assignment.
145//
146#define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_IO_INT 0x03
147typedef struct {
148 UINT16 Polarity : 2;
149 UINT16 Trigger : 2;
150 UINT16 Reserved : 12;
152
153typedef struct {
154 UINT8 IntNo : 2;
155 UINT8 Dev : 5;
156 UINT8 Reserved : 1;
158
159typedef union {
161 UINT8 byte;
163
164typedef struct {
165 UINT8 EntryType;
166 UINT8 IntType;
168 UINT8 SourceBusId;
170 UINT8 DestApicId;
171 UINT8 DestApicIntIn;
173
174typedef enum {
175 EfiLegacyMpTableEntryIoIntTypeInt = 0,
176 EfiLegacyMpTableEntryIoIntTypeNmi = 1,
177 EfiLegacyMpTableEntryIoIntTypeSmi = 2,
178 EfiLegacyMpTableEntryIoIntTypeExtInt = 3,
179} EFI_LEGACY_MP_TABLE_ENTRY_IO_INT_TYPE;
180
181typedef enum {
182 EfiLegacyMpTableEntryIoIntFlagsPolaritySpec = 0x0,
183 EfiLegacyMpTableEntryIoIntFlagsPolarityActiveHigh = 0x1,
184 EfiLegacyMpTableEntryIoIntFlagsPolarityReserved = 0x2,
185 EfiLegacyMpTableEntryIoIntFlagsPolarityActiveLow = 0x3,
186} EFI_LEGACY_MP_TABLE_ENTRY_IO_INT_FLAGS_POLARITY;
187
188typedef 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
199typedef struct {
200 UINT8 EntryType;
201 UINT8 IntType;
203 UINT8 SourceBusId;
205 UINT8 DestApicId;
206 UINT8 DestApicIntIn;
208
209typedef enum {
210 EfiLegacyMpTableEntryLocalIntTypeInt = 0,
211 EfiLegacyMpTableEntryLocalIntTypeNmi = 1,
212 EfiLegacyMpTableEntryLocalIntTypeSmi = 2,
213 EfiLegacyMpTableEntryLocalIntTypeExtInt = 3,
214} EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT_TYPE;
215
216typedef enum {
217 EfiLegacyMpTableEntryLocalIntFlagsPolaritySpec = 0x0,
218 EfiLegacyMpTableEntryLocalIntFlagsPolarityActiveHigh = 0x1,
219 EfiLegacyMpTableEntryLocalIntFlagsPolarityReserved = 0x2,
220 EfiLegacyMpTableEntryLocalIntFlagsPolarityActiveLow = 0x3,
221} EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT_FLAGS_POLARITY;
222
223typedef 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
234typedef struct {
235 UINT8 EntryType;
236 UINT8 Length;
237 UINT8 BusId;
238 UINT8 AddressType;
239 UINT64 AddressBase;
240 UINT64 AddressLength;
242
243typedef 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
253typedef struct {
254 UINT8 SubtractiveDecode : 1;
255 UINT8 Reserved : 7;
257
258typedef struct {
259 UINT8 EntryType;
260 UINT8 Length;
261 UINT8 BusId;
263 UINT8 ParentBus;
264 UINT8 Reserved1;
265 UINT8 Reserved2;
266 UINT8 Reserved3;
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
273typedef struct {
274 UINT8 RangeMode : 1;
275 UINT8 Reserved : 7;
277
278typedef struct {
279 UINT8 EntryType;
280 UINT8 Length;
281 UINT8 BusId;
283 UINT32 PredefinedRangeList;
285
286#pragma pack()
287
288#endif