46#include "params/X86IntelMPBaseConfigEntry.hh"
47#include "params/X86IntelMPExtConfigEntry.hh"
50#include "params/X86IntelMPConfigTable.hh"
51#include "params/X86IntelMPFloatingPointer.hh"
54#include "params/X86IntelMPBus.hh"
55#include "params/X86IntelMPIOAPIC.hh"
56#include "params/X86IntelMPIOIntAssignment.hh"
57#include "params/X86IntelMPLocalIntAssignment.hh"
58#include "params/X86IntelMPProcessor.hh"
61#include "params/X86IntelMPAddrSpaceMapping.hh"
62#include "params/X86IntelMPBusHierarchy.hh"
63#include "params/X86IntelMPCompatAddrSpaceMod.hh"
88 char cleanedString[length + 1];
89 cleanedString[length] = 0;
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;
102 for (
int i = 0;
i < length;
i++)
103 checkSum += cleanedString[
i];
114 fatal(
"Either an MP configuration table or a default configuration "
117 fatal(
"Both an MP configuration table and a default configuration "
120 uint8_t checkSum = 0;
123 for (
int i = 0;
i < 4;
i++)
142 checkSum = -checkSum;
150 defaultConfig(
p.default_config), imcrPresent(
p.imcr_present)
163 const Params &
p, uint8_t _type) :
179 uint8_t _type, uint8_t _length) :
188 uint8_t checkSum = 0;
191 for (
int i = 0;
i < 4;
i++)
192 checkSum += signature[
i];
215 for (baseEnt = baseEntries.begin();
216 baseEnt != baseEntries.end(); baseEnt++) {
224 uint16_t extOffset = 0;
225 uint8_t extCheckSum = 0;
226 for (extEnt = extEntries.begin();
227 extEnt != extEntries.end(); extEnt++) {
228 extOffset += (*extEnt)->writeOut(proxy,
233 extCheckSum = -extCheckSum;
237 checkSum = -checkSum;
240 return offset + extOffset;
244 specRev(
p.spec_rev), oemID(
p.oem_id), productID(
p.product_id),
245 oemTableAddr(
p.oem_table_addr), oemTableSize(
p.oem_table_size),
246 localApic(
p.local_apic),
247 baseEntries(
p.base_entries), extEntries(
p.ext_entries)
268 localApicID(
p.local_apic_id), localApicVersion(
p.local_apic_version),
269 cpuFlags(0), cpuSignature(0), featureFlags(
p.feature_flags)
292 busID(
p.bus_id), busType(
p.bus_type)
308 id(
p.
id), version(
p.version),
flags(0), address(
p.address)
330 p.source_bus_id,
p.source_bus_irq,
331 p.dest_io_apic_id,
p.dest_io_apic_intin)
336 p.source_bus_id,
p.source_bus_irq,
337 p.dest_local_apic_id,
p.dest_local_apic_intin)
354 busID(
p.bus_id), addrType(
p.address_type),
355 addr(
p.address), addrLength(
p.length)
375 busID(
p.bus_id), info(0), parentBus(
p.parent_bus)
377 if (
p.subtractive_decode)
394 busID(
p.bus_id),
mod(0), rangeList(
p.range_list)
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
This object is a proxy for a port or other object which implements the functional response protocol,...
void writeBlob(Addr addr, const void *p, uint64_t size) const
Same as tryWriteBlob, but insists on success.
Abstract superclass for simulation objects.
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
X86IntelMPAddrSpaceMappingParams Params
AddrSpaceMapping(const Params &p)
virtual Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
BaseConfigEntry(const Params &p, uint8_t _type)
X86IntelMPBaseConfigEntryParams Params
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
X86IntelMPBusHierarchyParams Params
BusHierarchy(const Params &p)
X86IntelMPBusParams Params
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
X86IntelMPCompatAddrSpaceModParams Params
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
CompatAddrSpaceMod(const Params &p)
X86IntelMPConfigTableParams Params
static const char signature[]
ConfigTable(const Params &p)
Addr writeOut(PortProxy &proxy, Addr addr)
virtual Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
ExtConfigEntry(const Params &p, uint8_t _type, uint8_t _length)
X86IntelMPExtConfigEntryParams Params
Addr writeOut(PortProxy &proxy, Addr addr)
X86IntelMPFloatingPointerParams Params
static const char signature[]
FloatingPointer(const Params &p)
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
X86IntelMPIOAPICParams Params
IOIntAssignment(const Params &p)
X86IntelMPIOIntAssignmentParams Params
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
LocalIntAssignment(const Params &p)
X86IntelMPLocalIntAssignmentParams Params
X86IntelMPProcessorParams Params
Processor(const Params &p)
Addr writeOut(PortProxy &proxy, Addr addr, uint8_t &checkSum)
constexpr void replaceBits(T &val, unsigned first, unsigned last, B bit_val)
A convenience function to replace bits first to last of val with bit_val in place.
#define fatal(...)
This implements a cprintf based fatal() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint8_t writeOutField(PortProxy &proxy, Addr addr, T val)
uint8_t writeOutString(PortProxy &proxy, Addr addr, std::string str, int length)
Bitfield< 63, 19 > reserved
PortProxy Object Declaration.