cpu = newCPU;
initialApicId = cpu->cpuId();
regs[APIC_ID] = (initialApicId << 24);
+ pioAddr = x86LocalAPICAddress(initialApicId, 0);
}
AddrRangeList
-X86ISA::Interrupts::getAddrRanges()
+X86ISA::Interrupts::getAddrRanges() const
{
AddrRangeList ranges;
Range<Addr> range = RangeEx(x86LocalAPICAddress(initialApicId, 0),
x86LocalAPICAddress(initialApicId, 0) +
PageBytes);
ranges.push_back(range);
- pioAddr = range.start;
return ranges;
}
AddrRangeList
-X86ISA::Interrupts::getIntAddrRange()
+X86ISA::Interrupts::getIntAddrRange() const
{
AddrRangeList ranges;
ranges.push_back(RangeEx(x86InterruptAddress(initialApicId, 0),
return entry.periodic;
}
- AddrRangeList getAddrRanges();
- AddrRangeList getIntAddrRange();
+ AddrRangeList getAddrRanges() const;
+ AddrRangeList getIntAddrRange() const;
MasterPort &getMasterPort(const std::string &if_name, int idx = -1)
{
}
AddrRangeList
-Gic::getAddrRanges()
+Gic::getAddrRanges() const
{
AddrRangeList ranges;
ranges.push_back(RangeSize(distAddr, DIST_SIZE));
/** Return the address ranges used by the Gic
* This is the distributor address + all cpu addresses
*/
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
/** A PIO read to the device, immediately split up into
* readDistributor() or readCpu()
}
AddrRangeList
-Pl111::getAddrRanges()
+Pl111::getAddrRanges() const
{
AddrRangeList ranges;
ranges.push_back(RangeSize(pioAddr, pioSize));
*
* @return a list of non-overlapping address ranges
*/
- AddrRangeList getAddrRanges();
+ AddrRangeList getAddrRanges() const;
};
#endif
}
AddrRangeList
-PioPort::getAddrRanges()
+PioPort::getAddrRanges() const
{
return device->getAddrRanges();
}
{}
AddrRangeList
-BasicPioDevice::getAddrRanges()
+BasicPioDevice::getAddrRanges() const
{
assert(pioSize != 0);
AddrRangeList ranges;
virtual Tick recvAtomic(PacketPtr pkt);
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
public:
*
* @return a list of non-overlapping address ranges
*/
- virtual AddrRangeList getAddrRanges() = 0;
+ virtual AddrRangeList getAddrRanges() const = 0;
/** Pure virtual function that the device must implement. Called
* when a read command is recieved by the port.
*
* @return a list of non-overlapping address ranges
*/
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
};
AddrRangeList
-PciConfigAll::getAddrRanges()
+PciConfigAll::getAddrRanges() const
{
AddrRangeList ranges;
ranges.push_back(RangeSize(pioAddr, params()->size));
virtual Tick write(PacketPtr pkt);
- AddrRangeList getAddrRanges();
+ AddrRangeList getAddrRanges() const;
private:
Addr pioAddr;
}
AddrRangeList
-PciDev::PciConfigPort::getAddrRanges()
+PciDev::PciConfigPort::getAddrRanges() const
{
AddrRangeList ranges;
if (configAddr != ULL(-1))
}
AddrRangeList
-PciDev::getAddrRanges()
+PciDev::getAddrRanges() const
{
AddrRangeList ranges;
int x = 0;
virtual Tick recvAtomic(PacketPtr pkt);
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
Platform *platform;
*
* @return a list of non-overlapping address ranges
*/
- AddrRangeList getAddrRanges();
+ AddrRangeList getAddrRanges() const;
/**
* Constructor for PCI Dev. This function copies data from the
}
AddrRangeList
-Iob::getAddrRanges()
+Iob::getAddrRanges() const
{
AddrRangeList ranges;
ranges.push_back(RangeSize(iobManAddr, iobManSize));
bool receiveJBusInterrupt(int cpu_id, int source, uint64_t d0,
uint64_t d1);
- AddrRangeList getAddrRanges();
+ AddrRangeList getAddrRanges() const;
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string §ion);
}
AddrRangeList
-Uart8250::getAddrRanges()
+Uart8250::getAddrRanges() const
{
AddrRangeList ranges;
ranges.push_back(RangeSize(pioAddr, pioSize));
virtual Tick read(PacketPtr pkt);
virtual Tick write(PacketPtr pkt);
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
/**
* Inform the uart that there is data available.
const uint8_t BatSuccessful = 0xaa;
AddrRangeList
-X86ISA::I8042::getAddrRanges()
+X86ISA::I8042::getAddrRanges() const
{
AddrRangeList ranges;
+ // TODO: Are these really supposed to be a single byte and not 4?
ranges.push_back(RangeSize(dataPort, 1));
ranges.push_back(RangeSize(commandPort, 1));
return ranges;
commandByte.keyboardFullInt = 1;
}
- AddrRangeList getAddrRanges();
+ AddrRangeList getAddrRanges() const;
Tick read(PacketPtr pkt);
Tick read(PacketPtr pkt);
Tick write(PacketPtr pkt);
- AddrRangeList getAddrRanges()
+ AddrRangeList getAddrRanges() const
{
AddrRangeList ranges;
ranges.push_back(RangeEx(pioAddr, pioAddr + 4));
return ranges;
}
- AddrRangeList getIntAddrRange()
+ AddrRangeList getIntAddrRange() const
{
AddrRangeList ranges;
ranges.push_back(RangeEx(x86InterruptAddress(initialApicId, 0),
{
}
- AddrRangeList getAddrRanges()
+ AddrRangeList getAddrRanges() const
{
return device->getIntAddrRange();
}
}
virtual AddrRangeList
- getIntAddrRange()
+ getIntAddrRange() const
{
panic("intAddrRange not implemented.\n");
}
}
AddrRangeList
-Bridge::BridgeSlavePort::getAddrRanges()
+Bridge::BridgeSlavePort::getAddrRanges() const
{
return ranges;
}
/** When receiving a address range request the peer port,
pass it to the bridge. */
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
};
return dest_id;
// Check normal port ranges
- PortIter i = portMap.find(RangeSize(addr,1));
+ PortMapConstIter i = portMap.find(RangeSize(addr,1));
if (i != portMap.end()) {
dest_id = i->second;
updatePortCache(dest_id, i->first.start, i->first.end);
// Check if this matches the default range
if (useDefaultRange) {
- AddrRangeIter a_end = defaultRange.end();
- for (AddrRangeIter i = defaultRange.begin(); i != a_end; i++) {
+ AddrRangeConstIter a_end = defaultRange.end();
+ for (AddrRangeConstIter i = defaultRange.begin(); i != a_end; i++) {
if (*i == addr) {
DPRINTF(BusAddrRanges, " found addr %#llx on default\n",
addr);
MasterPort *port = masterPorts[master_port_id];
// Clean out any previously existent ids
- for (PortIter portIter = portMap.begin();
+ for (PortMapIter portIter = portMap.begin();
portIter != portMap.end(); ) {
if (portIter->second == master_port_id)
portMap.erase(portIter++);
}
AddrRangeList
-BaseBus::getAddrRanges()
+BaseBus::getAddrRanges() const
{
AddrRangeList ranges;
DPRINTF(BusAddrRanges, "received address range request, returning:\n");
- for (AddrRangeIter dflt_iter = defaultRange.begin();
+ for (AddrRangeConstIter dflt_iter = defaultRange.begin();
dflt_iter != defaultRange.end(); dflt_iter++) {
ranges.push_back(*dflt_iter);
DPRINTF(BusAddrRanges, " -- Dflt: %#llx : %#llx\n",dflt_iter->start,
dflt_iter->end);
}
- for (PortIter portIter = portMap.begin();
+ for (PortMapConstIter portIter = portMap.begin();
portIter != portMap.end(); portIter++) {
bool subset = false;
- for (AddrRangeIter dflt_iter = defaultRange.begin();
+ for (AddrRangeConstIter dflt_iter = defaultRange.begin();
dflt_iter != defaultRange.end(); dflt_iter++) {
if ((portIter->first.start < dflt_iter->start &&
portIter->first.end >= dflt_iter->start) ||
Event * drainEvent;
- typedef range_map<Addr, PortID>::iterator PortIter;
+ typedef range_map<Addr, PortID>::iterator PortMapIter;
+ typedef range_map<Addr, PortID>::const_iterator PortMapConstIter;
range_map<Addr, PortID> portMap;
AddrRangeList defaultRange;
*
* @return a list of non-overlapping address ranges
*/
- AddrRangeList getAddrRanges();
+ AddrRangeList getAddrRanges() const;
/** Calculate the timing parameters for the packet. Updates the
* firstWordTime and finishTime fields of the packet object.
virtual unsigned deviceBlockSize() const
{ return cache->getBlockSize(); }
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
public:
template<class TagStore>
AddrRangeList
-Cache<TagStore>::CpuSidePort::getAddrRanges()
+Cache<TagStore>::CpuSidePort::getAddrRanges() const
{
return cache->getAddrRanges();
}
/**
* Return the union of all adress ranges seen by this bus.
*/
- virtual AddrRangeList getAddrRanges()
+ virtual AddrRangeList getAddrRanges() const
{ return bus.getAddrRanges(); }
/**
}
AddrRangeList
-CommMonitor::getAddrRanges()
+CommMonitor::getAddrRanges() const
{
// get the address ranges of the connected slave port
return masterPort.getAddrRanges();
return mon.deviceBlockSizeSlave();
}
- AddrRangeList getAddrRanges()
+ AddrRangeList getAddrRanges() const
{
return mon.getAddrRanges();
}
unsigned deviceBlockSizeSlave();
- AddrRangeList getAddrRanges();
+ AddrRangeList getAddrRanges() const;
bool isSnooping() const;
/**
* Return the union of all adress ranges seen by this bus.
*/
- virtual AddrRangeList getAddrRanges()
+ virtual AddrRangeList getAddrRanges() const
{ return bus.getAddrRanges(); }
/**
typedef std::list<Range<Addr> > AddrRangeList;
typedef std::list<Range<Addr> >::iterator AddrRangeIter;
+typedef std::list<Range<Addr> >::const_iterator AddrRangeConstIter;
class MemObject;
*
* @return a list of ranges responded to
*/
- virtual AddrRangeList getAddrRanges() = 0;
+ virtual AddrRangeList getAddrRanges() const = 0;
protected:
}
AddrRangeList
-RubyPort::M5Port::getAddrRanges()
+RubyPort::M5Port::getAddrRanges() const
{
// at the moment the assumption is that the master does not care
AddrRangeList ranges;
virtual bool recvTimingReq(PacketPtr pkt);
virtual Tick recvAtomic(PacketPtr pkt);
virtual void recvFunctional(PacketPtr pkt);
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
private:
bool isPhysMemAddress(Addr addr);
{ }
AddrRangeList
-SimpleMemory::MemoryPort::getAddrRanges()
+SimpleMemory::MemoryPort::getAddrRanges() const
{
AddrRangeList ranges;
ranges.push_back(memory.getAddrRange());
virtual void recvFunctional(PacketPtr pkt);
- virtual AddrRangeList getAddrRanges();
+ virtual AddrRangeList getAddrRanges() const;
};