47 #include "params/X86IntelMPBaseConfigEntry.hh"
48 #include "params/X86IntelMPExtConfigEntry.hh"
51 #include "params/X86IntelMPConfigTable.hh"
52 #include "params/X86IntelMPFloatingPointer.hh"
55 #include "params/X86IntelMPBus.hh"
56 #include "params/X86IntelMPIOAPIC.hh"
57 #include "params/X86IntelMPIOIntAssignment.hh"
58 #include "params/X86IntelMPLocalIntAssignment.hh"
59 #include "params/X86IntelMPProcessor.hh"
62 #include "params/X86IntelMPAddrSpaceMapping.hh"
63 #include "params/X86IntelMPBusHierarchy.hh"
64 #include "params/X86IntelMPCompatAddrSpaceMod.hh"
88 char cleanedString[
length + 1];
91 if (str.length() >
length) {
92 memcpy(cleanedString, str.c_str(),
length);
93 warn(
"Intel MP configuration table string \"%s\" "
94 "will be truncated to \"%s\".\n", str, (
char *)&cleanedString);
96 memcpy(cleanedString, str.c_str(), str.length());
97 memset(cleanedString + str.length(), 0,
length - str.length());
101 uint8_t checkSum = 0;
103 checkSum += cleanedString[
i];
113 if (!tableAddr && !defaultConfig)
114 fatal(
"Either an MP configuration table or a default configuration "
116 if (tableAddr && defaultConfig)
117 fatal(
"Both an MP configuration table and a default configuration "
120 uint8_t checkSum = 0;
123 for (
int i = 0;
i < 4;
i++)
124 checkSum += signature[
i];
137 checkSum += defaultConfig;
139 uint32_t features2_5 = imcrPresent ? (1 << 7) : 0;
142 checkSum = -checkSum;
150 defaultConfig(
p->default_config), imcrPresent(
p->imcr_present)
154 X86IntelMPFloatingPointerParams::create()
184 uint8_t _type, uint8_t _length) :
193 uint8_t checkSum = 0;
196 for (
int i = 0;
i < 4;
i++)
197 checkSum += signature[
i];
214 uint8_t reserved = 0;
216 checkSum += reserved;
220 for (baseEnt = baseEntries.begin();
221 baseEnt != baseEntries.end(); baseEnt++) {
229 uint16_t extOffset = 0;
230 uint8_t extCheckSum = 0;
231 for (extEnt = extEntries.begin();
232 extEnt != extEntries.end(); extEnt++) {
233 extOffset += (*extEnt)->writeOut(proxy,
238 extCheckSum = -extCheckSum;
242 checkSum = -checkSum;
245 return offset + extOffset;
249 specRev(
p->spec_rev), oemID(
p->oem_id), productID(
p->product_id),
250 oemTableAddr(
p->oem_table_addr), oemTableSize(
p->oem_table_size),
251 localApic(
p->local_apic),
252 baseEntries(
p->base_entries), extEntries(
p->ext_entries)
256 X86IntelMPConfigTableParams::create()
272 uint32_t reserved = 0;
279 localApicID(
p->local_apic_id), localApicVersion(
p->local_apic_version),
280 cpuFlags(0), cpuSignature(0), featureFlags(
p->feature_flags)
293 X86IntelMPProcessorParams::create()
309 busID(
p->bus_id), busType(
p->bus_type)
313 X86IntelMPBusParams::create()
331 id(
p->
id), version(
p->version), flags(0), address(
p->address)
338 X86IntelMPIOAPICParams::create()
359 p->source_bus_id,
p->source_bus_irq,
360 p->dest_io_apic_id,
p->dest_io_apic_intin)
364 X86IntelMPIOIntAssignmentParams::create()
371 p->source_bus_id,
p->source_bus_irq,
372 p->dest_local_apic_id,
p->dest_local_apic_intin)
376 X86IntelMPLocalIntAssignmentParams::create()
395 busID(
p->bus_id), addrType(
p->address_type),
400 X86IntelMPAddrSpaceMappingParams::create()
414 uint32_t reserved = 0;
422 busID(
p->bus_id), info(0), parentBus(
p->parent_bus)
424 if (
p->subtractive_decode)
429 X86IntelMPBusHierarchyParams::create()
447 busID(
p->bus_id),
mod(0), rangeList(
p->range_list)
454 X86IntelMPCompatAddrSpaceModParams::create()