summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2012-01-28 07:24:01 -0800
committerGabe Black <gblack@eecs.umich.edu>2012-01-28 07:24:01 -0800
commitc3d41a2def15cdaf2ac3984315f452dacc6a0884 (patch)
tree5324ebec3add54b934a841eee901983ac3463a7f /src/dev
parentda2a4acc26ba264c3c4a12495776fd6a1c4fb133 (diff)
parent4acca8a0536d4445ed25b67edf571ae460446ab9 (diff)
downloadgem5-c3d41a2def15cdaf2ac3984315f452dacc6a0884.tar.xz
Merge with the main repo.
--HG-- rename : src/mem/vport.hh => src/mem/fs_translating_port_proxy.hh rename : src/mem/translating_port.cc => src/mem/se_translating_port_proxy.cc rename : src/mem/translating_port.hh => src/mem/se_translating_port_proxy.hh
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/Device.py2
-rw-r--r--src/dev/Pci.py2
-rw-r--r--src/dev/arm/RealView.py42
-rw-r--r--src/dev/arm/gic.cc11
-rw-r--r--src/dev/arm/gic.hh2
-rw-r--r--src/dev/arm/pl111.cc9
-rw-r--r--src/dev/arm/pl111.hh8
-rw-r--r--src/dev/copy_engine.hh1
-rw-r--r--src/dev/io_device.cc34
-rw-r--r--src/dev/io_device.hh45
-rw-r--r--src/dev/ns_gige.cc20
-rw-r--r--src/dev/pciconfigall.cc9
-rw-r--r--src/dev/pciconfigall.hh2
-rw-r--r--src/dev/pcidev.cc29
-rw-r--r--src/dev/pcidev.hh11
-rw-r--r--src/dev/simple_disk.cc4
-rw-r--r--src/dev/sinic.cc2
-rw-r--r--src/dev/sparc/iob.cc11
-rw-r--r--src/dev/sparc/iob.hh2
-rw-r--r--src/dev/uart8250.cc12
-rw-r--r--src/dev/uart8250.hh2
-rw-r--r--src/dev/x86/SouthBridge.py2
-rw-r--r--src/dev/x86/i8042.cc11
-rw-r--r--src/dev/x86/i8042.hh2
-rw-r--r--src/dev/x86/i82094aa.hh20
-rw-r--r--src/dev/x86/intdev.cc2
-rw-r--r--src/dev/x86/intdev.hh9
27 files changed, 169 insertions, 137 deletions
diff --git a/src/dev/Device.py b/src/dev/Device.py
index 9cd41fe09..c32946277 100644
--- a/src/dev/Device.py
+++ b/src/dev/Device.py
@@ -45,7 +45,7 @@ class BasicPioDevice(PioDevice):
class DmaDevice(PioDevice):
type = 'DmaDevice'
abstract = True
- dma = Port(Self.pio.peerObj.port, "DMA port")
+ dma = Port("DMA port")
min_backoff_delay = Param.Latency('4ns',
"min time between a nack packet being received and the next request made by the device")
max_backoff_delay = Param.Latency('10us',
diff --git a/src/dev/Pci.py b/src/dev/Pci.py
index 2f9f93a59..95cb3916f 100644
--- a/src/dev/Pci.py
+++ b/src/dev/Pci.py
@@ -43,7 +43,7 @@ class PciDevice(DmaDevice):
type = 'PciDevice'
abstract = True
platform = Param.Platform(Parent.any, "Platform this device is part of.")
- config = Port(Self.pio.peerObj.port, "PCI configuration space port")
+ config = Port("PCI configuration space port")
pci_bus = Param.Int("PCI bus")
pci_dev = Param.Int("PCI device number")
pci_func = Param.Int("PCI function code")
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index 11905ae79..dc2219cd1 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 ARM Limited
+# Copyright (c) 2009-2011 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -178,12 +178,18 @@ class RealViewPBX(RealView):
rtc_fake = AmbaFake(pio_addr=0x10017000, amba_id=0x41031)
- # Attach I/O devices that are on chip
- def attachOnChipIO(self, bus):
+ # Attach I/O devices that are on chip and also set the appropriate
+ # ranges for the bridge
+ def attachOnChipIO(self, bus, bridge):
self.gic.pio = bus.port
self.l2x0_fake.pio = bus.port
self.a9scu.pio = bus.port
self.local_cpu_timer.pio = bus.port
+ # Bridge ranges based on excluding what is part of on-chip I/O
+ # (gic, l2x0, a9scu, local_cpu_timer)
+ bridge.ranges = [AddrRange(self.realview_io.pio_addr,
+ self.a9scu.pio_addr - 1),
+ AddrRange(self.flash_fake.pio_addr, Addr.max)]
# Attach I/O devices to specified bus object. Can't do this
# earlier, since the bus object itself is typically defined at the
@@ -194,9 +200,12 @@ class RealViewPBX(RealView):
self.timer0.pio = bus.port
self.timer1.pio = bus.port
self.clcd.pio = bus.port
+ self.clcd.dma = bus.port
self.kmi0.pio = bus.port
self.kmi1.pio = bus.port
self.cf_ctrl.pio = bus.port
+ self.cf_ctrl.config = bus.port
+ self.cf_ctrl.dma = bus.port
self.dmac_fake.pio = bus.port
self.uart1_fake.pio = bus.port
self.uart2_fake.pio = bus.port
@@ -249,10 +258,16 @@ class RealViewEB(RealView):
- # Attach I/O devices that are on chip
- def attachOnChipIO(self, bus):
+ # Attach I/O devices that are on chip and also set the appropriate
+ # ranges for the bridge
+ def attachOnChipIO(self, bus, bridge):
self.gic.pio = bus.port
self.l2x0_fake.pio = bus.port
+ # Bridge ranges based on excluding what is part of on-chip I/O
+ # (gic, l2x0)
+ bridge.ranges = [AddrRange(self.realview_io.pio_addr,
+ self.gic.cpu_addr - 1),
+ AddrRange(self.flash_fake.pio_addr, Addr.max)]
# Attach I/O devices to specified bus object. Can't do this
# earlier, since the bus object itself is typically defined at the
@@ -263,6 +278,7 @@ class RealViewEB(RealView):
self.timer0.pio = bus.port
self.timer1.pio = bus.port
self.clcd.pio = bus.port
+ self.clcd.dma = bus.port
self.kmi0.pio = bus.port
self.kmi1.pio = bus.port
self.dmac_fake.pio = bus.port
@@ -330,10 +346,15 @@ class VExpress_ELT(RealView):
usb_fake = IsaFake(pio_addr=0xFB000000, pio_size=0x1ffff)
- # Attach I/O devices that are on chip
- def attachOnChipIO(self, bus):
+ # Attach I/O devices that are on chip and also set the appropriate
+ # ranges for the bridge
+ def attachOnChipIO(self, bus, bridge):
self.gic.pio = bus.port
self.a9scu.pio = bus.port
+ # Bridge ranges based on excluding what is part of on-chip I/O
+ # (gic, a9scu)
+ bridge.ranges = [AddrRange(self.pci_cfg_base, self.a9scu.pio_addr - 1),
+ AddrRange(self.local_cpu_timer.pio_addr, Addr.max)]
# Attach I/O devices to specified bus object. Can't do this
# earlier, since the bus object itself is typically defined at the
@@ -348,13 +369,20 @@ class VExpress_ELT(RealView):
self.elba_timer0.pio = bus.port
self.elba_timer1.pio = bus.port
self.clcd.pio = bus.port
+ self.clcd.dma = bus.port
self.kmi0.pio = bus.port
self.kmi1.pio = bus.port
self.elba_kmi0.pio = bus.port
self.elba_kmi1.pio = bus.port
self.cf_ctrl.pio = bus.port
+ self.cf_ctrl.config = bus.port
+ self.cf_ctrl.dma = bus.port
self.ide.pio = bus.port
+ self.ide.config = bus.port
+ self.ide.dma = bus.port
self.ethernet.pio = bus.port
+ self.ethernet.config = bus.port
+ self.ethernet.dma = bus.port
self.pciconfig.pio = bus.default
bus.use_default_range = True
diff --git a/src/dev/arm/gic.cc b/src/dev/arm/gic.cc
index 67520f865..f686c2a13 100644
--- a/src/dev/arm/gic.cc
+++ b/src/dev/arm/gic.cc
@@ -705,12 +705,13 @@ Gic::postInt(uint32_t cpu, Tick when)
eventq->schedule(postIntEvent[cpu], when);
}
-void
-Gic::addressRanges(AddrRangeList &range_list)
+AddrRangeList
+Gic::getAddrRanges()
{
- range_list.clear();
- range_list.push_back(RangeSize(distAddr, DIST_SIZE));
- range_list.push_back(RangeSize(cpuAddr, CPU_SIZE));
+ AddrRangeList ranges;
+ ranges.push_back(RangeSize(distAddr, DIST_SIZE));
+ ranges.push_back(RangeSize(cpuAddr, CPU_SIZE));
+ return ranges;
}
diff --git a/src/dev/arm/gic.hh b/src/dev/arm/gic.hh
index 6988d6ed1..67d48cd86 100644
--- a/src/dev/arm/gic.hh
+++ b/src/dev/arm/gic.hh
@@ -261,7 +261,7 @@ class Gic : public PioDevice
/** Return the address ranges used by the Gic
* This is the distributor address + all cpu addresses
*/
- virtual void addressRanges(AddrRangeList &range_list);
+ virtual AddrRangeList getAddrRanges();
/** A PIO read to the device, immediately split up into
* readDistributor() or readCpu()
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc
index 958f07aa7..263a3b620 100644
--- a/src/dev/arm/pl111.cc
+++ b/src/dev/arm/pl111.cc
@@ -735,11 +735,12 @@ Pl111::generateInterrupt()
}
}
-void
-Pl111::addressRanges(AddrRangeList& range_list)
+AddrRangeList
+Pl111::getAddrRanges()
{
- range_list.clear();
- range_list.push_back(RangeSize(pioAddr, pioSize));
+ AddrRangeList ranges;
+ ranges.push_back(RangeSize(pioAddr, pioSize));
+ return ranges;
}
Pl111 *
diff --git a/src/dev/arm/pl111.hh b/src/dev/arm/pl111.hh
index f36dc6810..b2dc1f640 100644
--- a/src/dev/arm/pl111.hh
+++ b/src/dev/arm/pl111.hh
@@ -325,10 +325,12 @@ class Pl111: public AmbaDmaDevice
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string &section);
- /** return the address ranges that this device responds to.
- * @param range_list range list to populate with ranges
+ /**
+ * Determine the address ranges that this device responds to.
+ *
+ * @return a list of non-overlapping address ranges
*/
- void addressRanges(AddrRangeList &range_list);
+ AddrRangeList getAddrRanges();
};
#endif
diff --git a/src/dev/copy_engine.hh b/src/dev/copy_engine.hh
index dfe469588..581d3c80b 100644
--- a/src/dev/copy_engine.hh
+++ b/src/dev/copy_engine.hh
@@ -85,7 +85,6 @@ class CopyEngine : public PciDev
void init();
std::string name() { assert(ce); return ce->name() + csprintf("-chan%d", channelId); }
- virtual void addressRanges(AddrRangeList &range_list) { range_list.clear(); }
virtual Tick read(PacketPtr pkt)
{ panic("CopyEngineChannel has no I/O access\n");}
virtual Tick write(PacketPtr pkt)
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc
index 0ad53f09e..840343dce 100644
--- a/src/dev/io_device.cc
+++ b/src/dev/io_device.cc
@@ -47,13 +47,10 @@ PioPort::recvAtomic(PacketPtr pkt)
return pkt->isRead() ? device->read(pkt) : device->write(pkt);
}
-void
-PioPort::getDeviceAddressRanges(AddrRangeList &resp, bool &snoop)
+AddrRangeList
+PioPort::getAddrRanges()
{
- snoop = false;
- device->addressRanges(resp);
- for (AddrRangeIter i = resp.begin(); i != resp.end(); i++)
- DPRINTF(BusAddrRanges, "Adding Range %#x-%#x\n", i->start, i->end);
+ return device->getAddrRanges();
}
@@ -72,7 +69,7 @@ PioDevice::init()
{
if (!pioPort)
panic("Pio port of %s not connected to anything!", name());
- pioPort->sendStatusChange(Port::RangeChange);
+ pioPort->sendRangeChange();
}
Port *
@@ -105,13 +102,14 @@ BasicPioDevice::BasicPioDevice(const Params *p)
pioDelay(p->pio_latency)
{}
-void
-BasicPioDevice::addressRanges(AddrRangeList &range_list)
+AddrRangeList
+BasicPioDevice::getAddrRanges()
{
assert(pioSize != 0);
- range_list.clear();
+ AddrRangeList ranges;
DPRINTF(BusAddrRanges, "registering range: %#x-%#x\n", pioAddr, pioSize);
- range_list.push_back(RangeSize(pioAddr, pioSize));
+ ranges.push_back(RangeSize(pioAddr, pioSize));
+ return ranges;
}
@@ -121,7 +119,7 @@ DmaPort::DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff,
pendingCount(0), actionInProgress(0), drainEvent(NULL),
backoffTime(0), minBackoffDelay(min_backoff),
maxBackoffDelay(max_backoff), inRetry(false), recvSnoops(recv_snoops),
- snoopRangeSent(false), backoffEvent(this)
+ backoffEvent(this)
{ }
bool
@@ -136,7 +134,7 @@ DmaPort::recvTiming(PacketPtr pkt)
else if (backoffTime < maxBackoffDelay)
backoffTime <<= 1;
- reschedule(backoffEvent, curTick() + backoffTime, true);
+ device->reschedule(backoffEvent, curTick() + backoffTime, true);
DPRINTF(DMA, "Backoff time set to %d ticks\n", backoffTime);
@@ -164,7 +162,8 @@ DmaPort::recvTiming(PacketPtr pkt)
if (state->totBytes == state->numBytes) {
if (state->completionEvent) {
if (state->delay)
- schedule(state->completionEvent, curTick() + state->delay);
+ device->schedule(state->completionEvent,
+ curTick() + state->delay);
else
state->completionEvent->process();
}
@@ -234,7 +233,7 @@ DmaPort::recvRetry()
if (transmitList.size() && backoffTime && !inRetry) {
DPRINTF(DMA, "Scheduling backoff for %d\n", curTick()+backoffTime);
if (!backoffEvent.scheduled())
- schedule(backoffEvent, backoffTime + curTick());
+ device->schedule(backoffEvent, backoffTime + curTick());
}
DPRINTF(DMA, "TransmitList: %d, backoffTime: %d inRetry: %d es: %d\n",
transmitList.size(), backoffTime, inRetry,
@@ -320,7 +319,7 @@ DmaPort::sendDma()
!backoffEvent.scheduled()) {
DPRINTF(DMA, "-- Scheduling backoff timer for %d\n",
backoffTime+curTick());
- schedule(backoffEvent, backoffTime + curTick());
+ device->schedule(backoffEvent, backoffTime + curTick());
}
} else if (state == Enums::atomic) {
transmitList.pop_front();
@@ -342,7 +341,8 @@ DmaPort::sendDma()
if (state->totBytes == state->numBytes) {
if (state->completionEvent) {
assert(!state->completionEvent->scheduled());
- schedule(state->completionEvent, curTick() + lat + state->delay);
+ device->schedule(state->completionEvent,
+ curTick() + lat + state->delay);
}
delete state;
delete pkt->req;
diff --git a/src/dev/io_device.hh b/src/dev/io_device.hh
index 083ab43cb..ea2364f33 100644
--- a/src/dev/io_device.hh
+++ b/src/dev/io_device.hh
@@ -50,7 +50,7 @@ class System;
* The PioPort class is a programmed i/o port that all devices that are
* sensitive to an address range use. The port takes all the memory
* access types and roles them into one read() and write() call that the device
- * must respond to. The device must also provide the addressRanges() function
+ * must respond to. The device must also provide getAddrRanges() function
* with which it returns the address ranges it is interested in.
*/
class PioPort : public SimpleTimingPort
@@ -61,8 +61,7 @@ class PioPort : public SimpleTimingPort
virtual Tick recvAtomic(PacketPtr pkt);
- virtual void getDeviceAddressRanges(AddrRangeList &resp,
- bool &snoop);
+ virtual AddrRangeList getAddrRanges();
public:
@@ -132,9 +131,6 @@ class DmaPort : public Port
/** Port accesses a cache which requires snooping */
bool recvSnoops;
- /** Records snoop response so we only reply once to a status change */
- bool snoopRangeSent;
-
virtual bool recvTiming(PacketPtr pkt);
virtual Tick recvAtomic(PacketPtr pkt)
{
@@ -149,25 +145,16 @@ class DmaPort : public Port
panic("dma port shouldn't be used for pio access.");
}
- virtual void recvStatusChange(Status status)
+ virtual void recvRangeChange()
{
- if (recvSnoops) {
- if (status == RangeChange) {
- if (!snoopRangeSent) {
- snoopRangeSent = true;
- sendStatusChange(Port::RangeChange);
- }
- return;
- }
- panic("Unexpected recvStatusChange\n");
- }
+ // DMA port is a master with a single slave so there is no choice and
+ // thus no need to worry about any address changes
}
virtual void recvRetry() ;
- virtual void getDeviceAddressRanges(AddrRangeList &resp,
- bool &snoop)
- { resp.clear(); snoop = recvSnoops; }
+ virtual bool isSnooping()
+ { return recvSnoops; }
void queueDma(PacketPtr pkt, bool front = false);
void sendDma();
@@ -191,7 +178,7 @@ class DmaPort : public Port
/**
* This device is the base class which all devices senstive to an address range
* inherit from. There are three pure virtual functions which all devices must
- * implement addressRanges(), read(), and write(). The magic do choose which
+ * implement getAddrRanges(), read(), and write(). The magic do choose which
* mode we are in, etc is handled by the PioPort so the device doesn't have to
* bother.
*/
@@ -204,7 +191,13 @@ class PioDevice : public MemObject
* that it sees. */
PioPort *pioPort;
- virtual void addressRanges(AddrRangeList &range_list) = 0;
+ /**
+ * Every PIO device is obliged to provide an implementation that
+ * returns the address ranges the device responds to.
+ *
+ * @return a list of non-overlapping address ranges
+ */
+ virtual AddrRangeList getAddrRanges() = 0;
/** Pure virtual function that the device must implement. Called
* when a read command is recieved by the port.
@@ -263,10 +256,12 @@ class BasicPioDevice : public PioDevice
return dynamic_cast<const Params *>(_params);
}
- /** return the address ranges that this device responds to.
- * @param range_list range list to populate with ranges
+ /**
+ * Determine the address ranges that this device responds to.
+ *
+ * @return a list of non-overlapping address ranges
*/
- void addressRanges(AddrRangeList &range_list);
+ virtual AddrRangeList getAddrRanges();
};
diff --git a/src/dev/ns_gige.cc b/src/dev/ns_gige.cc
index a7bc6d0ab..eb6eb6353 100644
--- a/src/dev/ns_gige.cc
+++ b/src/dev/ns_gige.cc
@@ -465,16 +465,16 @@ NSGigE::write(PacketPtr pkt)
reg & CFGR_DUPSTS ||
reg & CFGR_RESERVED ||
reg & CFGR_T64ADDR ||
- reg & CFGR_PCI64_DET)
-
- // First clear all writable bits
- regs.config &= CFGR_LNKSTS | CFGR_SPDSTS | CFGR_DUPSTS |
- CFGR_RESERVED | CFGR_T64ADDR |
- CFGR_PCI64_DET;
- // Now set the appropriate writable bits
- regs.config |= reg & ~(CFGR_LNKSTS | CFGR_SPDSTS | CFGR_DUPSTS |
- CFGR_RESERVED | CFGR_T64ADDR |
- CFGR_PCI64_DET);
+ reg & CFGR_PCI64_DET) {
+ // First clear all writable bits
+ regs.config &= CFGR_LNKSTS | CFGR_SPDSTS | CFGR_DUPSTS |
+ CFGR_RESERVED | CFGR_T64ADDR |
+ CFGR_PCI64_DET;
+ // Now set the appropriate writable bits
+ regs.config |= reg & ~(CFGR_LNKSTS | CFGR_SPDSTS | CFGR_DUPSTS |
+ CFGR_RESERVED | CFGR_T64ADDR |
+ CFGR_PCI64_DET);
+ }
// all these #if 0's are because i don't THINK the kernel needs to
// have these implemented. if there is a problem relating to one of
diff --git a/src/dev/pciconfigall.cc b/src/dev/pciconfigall.cc
index 55b439857..e7130e11d 100644
--- a/src/dev/pciconfigall.cc
+++ b/src/dev/pciconfigall.cc
@@ -86,11 +86,12 @@ PciConfigAll::write(PacketPtr pkt)
}
-void
-PciConfigAll::addressRanges(AddrRangeList &range_list)
+AddrRangeList
+PciConfigAll::getAddrRanges()
{
- range_list.clear();
- range_list.push_back(RangeSize(pioAddr, params()->size));
+ AddrRangeList ranges;
+ ranges.push_back(RangeSize(pioAddr, params()->size));
+ return ranges;
}
diff --git a/src/dev/pciconfigall.hh b/src/dev/pciconfigall.hh
index b3f6d1472..e594838fa 100644
--- a/src/dev/pciconfigall.hh
+++ b/src/dev/pciconfigall.hh
@@ -80,7 +80,7 @@ class PciConfigAll : public PioDevice
virtual Tick write(PacketPtr pkt);
- void addressRanges(AddrRangeList &range_list);
+ AddrRangeList getAddrRanges();
private:
Addr pioAddr;
diff --git a/src/dev/pcidev.cc b/src/dev/pcidev.cc
index ac315341a..42c803553 100644
--- a/src/dev/pcidev.cc
+++ b/src/dev/pcidev.cc
@@ -72,13 +72,13 @@ PciDev::PciConfigPort::recvAtomic(PacketPtr pkt)
return pkt->isRead() ? device->readConfig(pkt) : device->writeConfig(pkt);
}
-void
-PciDev::PciConfigPort::getDeviceAddressRanges(AddrRangeList &resp,
- bool &snoop)
+AddrRangeList
+PciDev::PciConfigPort::getAddrRanges()
{
- snoop = false;;
+ AddrRangeList ranges;
if (configAddr != ULL(-1))
- resp.push_back(RangeSize(configAddr, PCI_CONFIG_SIZE+1));
+ ranges.push_back(RangeSize(configAddr, PCI_CONFIG_SIZE+1));
+ return ranges;
}
@@ -150,9 +150,9 @@ PciDev::PciDev(const Params *p)
void
PciDev::init()
{
- if (!configPort)
- panic("pci config port not connected to anything!");
- configPort->sendStatusChange(Port::RangeChange);
+ if (!configPort && !configPort->isConnected())
+ panic("PCI config port on %s not connected to anything!\n", name());
+ configPort->sendRangeChange();
PioDevice::init();
}
@@ -207,14 +207,15 @@ PciDev::readConfig(PacketPtr pkt)
}
-void
-PciDev::addressRanges(AddrRangeList &range_list)
+AddrRangeList
+PciDev::getAddrRanges()
{
+ AddrRangeList ranges;
int x = 0;
- range_list.clear();
for (x = 0; x < 6; x++)
if (BARAddrs[x] != 0)
- range_list.push_back(RangeSize(BARAddrs[x],BARSize[x]));
+ ranges.push_back(RangeSize(BARAddrs[x],BARSize[x]));
+ return ranges;
}
Tick
@@ -301,7 +302,7 @@ PciDev::writeConfig(PacketPtr pkt)
BARAddrs[barnum] = BAR_IO_SPACE(he_old_bar) ?
platform->calcPciIOAddr(he_new_bar) :
platform->calcPciMemAddr(he_new_bar);
- pioPort->sendStatusChange(Port::RangeChange);
+ pioPort->sendRangeChange();
}
}
config.baseAddr[barnum] = htole((he_new_bar & ~bar_mask) |
@@ -354,7 +355,7 @@ PciDev::unserialize(Checkpoint *cp, const std::string &section)
UNSERIALIZE_ARRAY(BARAddrs, sizeof(BARAddrs) / sizeof(BARAddrs[0]));
UNSERIALIZE_ARRAY(config.data,
sizeof(config.data) / sizeof(config.data[0]));
- pioPort->sendStatusChange(Port::RangeChange);
+ pioPort->sendRangeChange();
}
diff --git a/src/dev/pcidev.hh b/src/dev/pcidev.hh
index dae005a97..c0c3df0a6 100644
--- a/src/dev/pcidev.hh
+++ b/src/dev/pcidev.hh
@@ -65,8 +65,7 @@ class PciDev : public DmaDevice
virtual Tick recvAtomic(PacketPtr pkt);
- virtual void getDeviceAddressRanges(AddrRangeList &resp,
- bool &snoop);
+ virtual AddrRangeList getAddrRanges();
Platform *platform;
@@ -187,10 +186,12 @@ class PciDev : public DmaDevice
interruptLine()
{ return letoh(config.interruptLine); }
- /** return the address ranges that this device responds to.
- * @params range_list range list to populate with ranges
+ /**
+ * Determine the address ranges that this device responds to.
+ *
+ * @return a list of non-overlapping address ranges
*/
- void addressRanges(AddrRangeList &range_list);
+ AddrRangeList getAddrRanges();
/**
* Constructor for PCI Dev. This function copies data from the
diff --git a/src/dev/simple_disk.cc b/src/dev/simple_disk.cc
index 4bf24b1cd..9cec638b8 100644
--- a/src/dev/simple_disk.cc
+++ b/src/dev/simple_disk.cc
@@ -46,7 +46,7 @@
#include "debug/SimpleDiskData.hh"
#include "dev/disk_image.hh"
#include "dev/simple_disk.hh"
-#include "mem/port.hh"
+#include "mem/port_proxy.hh"
#include "sim/system.hh"
using namespace std;
@@ -70,7 +70,7 @@ SimpleDisk::read(Addr addr, baddr_t block, int count) const
for (int i = 0, j = 0; i < count; i += SectorSize, j++)
image->read(data + i, block + j);
- system->functionalPort->writeBlob(addr, data, count);
+ system->physProxy->writeBlob(addr, data, count);
DPRINTF(SimpleDisk, "read block=%#x len=%d\n", (uint64_t)block, count);
DDUMP(SimpleDiskData, data, count);
diff --git a/src/dev/sinic.cc b/src/dev/sinic.cc
index b87dfa704..741442918 100644
--- a/src/dev/sinic.cc
+++ b/src/dev/sinic.cc
@@ -1714,7 +1714,7 @@ Device::unserialize(Checkpoint *cp, const std::string &section)
if (transmitTick)
schedule(txEvent, curTick() + transmitTick);
- pioPort->sendStatusChange(Port::RangeChange);
+ pioPort->sendRangeChange();
}
diff --git a/src/dev/sparc/iob.cc b/src/dev/sparc/iob.cc
index 008e063e0..757c50a24 100644
--- a/src/dev/sparc/iob.cc
+++ b/src/dev/sparc/iob.cc
@@ -323,12 +323,13 @@ Iob::receiveJBusInterrupt(int cpu_id, int source, uint64_t d0, uint64_t d1)
return true;
}
-void
-Iob::addressRanges(AddrRangeList &range_list)
+AddrRangeList
+Iob::getAddrRanges()
{
- range_list.clear();
- range_list.push_back(RangeSize(iobManAddr, iobManSize));
- range_list.push_back(RangeSize(iobJBusAddr, iobJBusSize));
+ AddrRangeList ranges;
+ ranges.push_back(RangeSize(iobManAddr, iobManSize));
+ ranges.push_back(RangeSize(iobJBusAddr, iobJBusSize));
+ return ranges;
}
diff --git a/src/dev/sparc/iob.hh b/src/dev/sparc/iob.hh
index 7391b1ccd..d6a47ce19 100644
--- a/src/dev/sparc/iob.hh
+++ b/src/dev/sparc/iob.hh
@@ -141,7 +141,7 @@ class Iob : public PioDevice
bool receiveJBusInterrupt(int cpu_id, int source, uint64_t d0,
uint64_t d1);
- void addressRanges(AddrRangeList &range_list);
+ AddrRangeList getAddrRanges();
virtual void serialize(std::ostream &os);
virtual void unserialize(Checkpoint *cp, const std::string &section);
diff --git a/src/dev/uart8250.cc b/src/dev/uart8250.cc
index 877e9fb47..671d5505f 100644
--- a/src/dev/uart8250.cc
+++ b/src/dev/uart8250.cc
@@ -286,16 +286,14 @@ Uart8250::dataAvailable()
}
-void
-Uart8250::addressRanges(AddrRangeList &range_list)
+AddrRangeList
+Uart8250::getAddrRanges()
{
- assert(pioSize != 0);
- range_list.clear();
- range_list.push_back(RangeSize(pioAddr, pioSize));
+ AddrRangeList ranges;
+ ranges.push_back(RangeSize(pioAddr, pioSize));
+ return ranges;
}
-
-
void
Uart8250::serialize(ostream &os)
{
diff --git a/src/dev/uart8250.hh b/src/dev/uart8250.hh
index 79c31d5cf..f31def2ea 100644
--- a/src/dev/uart8250.hh
+++ b/src/dev/uart8250.hh
@@ -100,7 +100,7 @@ class Uart8250 : public Uart
virtual Tick read(PacketPtr pkt);
virtual Tick write(PacketPtr pkt);
- virtual void addressRanges(AddrRangeList &range_list);
+ virtual AddrRangeList getAddrRanges();
/**
* Inform the uart that there is data available.
diff --git a/src/dev/x86/SouthBridge.py b/src/dev/x86/SouthBridge.py
index c23ecf01c..baff35e0b 100644
--- a/src/dev/x86/SouthBridge.py
+++ b/src/dev/x86/SouthBridge.py
@@ -105,6 +105,8 @@ class SouthBridge(SimObject):
self.cmos.pio = bus.port
self.dma1.pio = bus.port
self.ide.pio = bus.port
+ self.ide.config = bus.port
+ self.ide.dma = bus.port
self.keyboard.pio = bus.port
self.pic1.pio = bus.port
self.pic2.pio = bus.port
diff --git a/src/dev/x86/i8042.cc b/src/dev/x86/i8042.cc
index a0786c95c..746a08778 100644
--- a/src/dev/x86/i8042.cc
+++ b/src/dev/x86/i8042.cc
@@ -43,12 +43,13 @@ const uint8_t CommandAck = 0xfa;
const uint8_t CommandNack = 0xfe;
const uint8_t BatSuccessful = 0xaa;
-void
-X86ISA::I8042::addressRanges(AddrRangeList &range_list)
+AddrRangeList
+X86ISA::I8042::getAddrRanges()
{
- range_list.clear();
- range_list.push_back(RangeSize(dataPort, 1));
- range_list.push_back(RangeSize(commandPort, 1));
+ AddrRangeList ranges;
+ ranges.push_back(RangeSize(dataPort, 1));
+ ranges.push_back(RangeSize(commandPort, 1));
+ return ranges;
}
void
diff --git a/src/dev/x86/i8042.hh b/src/dev/x86/i8042.hh
index be12c4e96..61220b45d 100644
--- a/src/dev/x86/i8042.hh
+++ b/src/dev/x86/i8042.hh
@@ -255,7 +255,7 @@ class I8042 : public BasicPioDevice
commandByte.keyboardFullInt = 1;
}
- void addressRanges(AddrRangeList &range_list);
+ AddrRangeList getAddrRanges();
Tick read(PacketPtr pkt);
diff --git a/src/dev/x86/i82094aa.hh b/src/dev/x86/i82094aa.hh
index 00ba2800d..dfef059c3 100644
--- a/src/dev/x86/i82094aa.hh
+++ b/src/dev/x86/i82094aa.hh
@@ -101,19 +101,21 @@ class I82094AA : public PioDevice, public IntDev
Tick read(PacketPtr pkt);
Tick write(PacketPtr pkt);
- void addressRanges(AddrRangeList &range_list)
+ AddrRangeList getAddrRanges()
{
- range_list.clear();
- range_list.push_back(RangeEx(pioAddr, pioAddr + 4));
- range_list.push_back(RangeEx(pioAddr + 16, pioAddr + 20));
+ AddrRangeList ranges;
+ ranges.push_back(RangeEx(pioAddr, pioAddr + 4));
+ ranges.push_back(RangeEx(pioAddr + 16, pioAddr + 20));
+ return ranges;
}
- void getIntAddrRange(AddrRangeList &range_list)
+ AddrRangeList getIntAddrRange()
{
- range_list.clear();
- range_list.push_back(RangeEx(x86InterruptAddress(initialApicId, 0),
- x86InterruptAddress(initialApicId, 0) +
- PhysAddrAPICRangeSize));
+ AddrRangeList ranges;
+ ranges.push_back(RangeEx(x86InterruptAddress(initialApicId, 0),
+ x86InterruptAddress(initialApicId, 0) +
+ PhysAddrAPICRangeSize));
+ return ranges;
}
void writeReg(uint8_t offset, uint32_t value);
diff --git a/src/dev/x86/intdev.cc b/src/dev/x86/intdev.cc
index 0c0fa73cf..a991005bc 100644
--- a/src/dev/x86/intdev.cc
+++ b/src/dev/x86/intdev.cc
@@ -54,7 +54,7 @@ X86ISA::IntDev::init()
if (!intPort) {
panic("Int port not connected to anything!");
}
- intPort->sendStatusChange(Port::RangeChange);
+ intPort->sendRangeChange();
}
X86ISA::IntSourcePin *
diff --git a/src/dev/x86/intdev.hh b/src/dev/x86/intdev.hh
index 1b3efdbb5..9713d042b 100644
--- a/src/dev/x86/intdev.hh
+++ b/src/dev/x86/intdev.hh
@@ -63,10 +63,9 @@ class IntDev
{
}
- void getDeviceAddressRanges(AddrRangeList &resp, bool &snoop)
+ AddrRangeList getAddrRanges()
{
- snoop = false;
- device->getIntAddrRange(resp);
+ return device->getIntAddrRange();
}
Tick recvMessage(PacketPtr pkt)
@@ -134,8 +133,8 @@ class IntDev
return 0;
}
- virtual void
- getIntAddrRange(AddrRangeList &range_list)
+ virtual AddrRangeList
+ getIntAddrRange()
{
panic("intAddrRange not implemented.\n");
}