summaryrefslogtreecommitdiff
path: root/src/dev/pciconfigall.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2013-07-11 21:56:24 -0500
committerSteve Reinhardt <stever@gmail.com>2013-07-11 21:56:24 -0500
commitb0b1c0205c438d382aaec54ee4b79b92e1a5e285 (patch)
treef490b704b90dfaba13254565a8d59770b9cddbed /src/dev/pciconfigall.cc
parent8e54c93222cd69dd4c388adc37cded7b7eebef76 (diff)
downloadgem5-b0b1c0205c438d382aaec54ee4b79b92e1a5e285.tar.xz
devices: make more classes derive from BasicPioDevice
A couple of devices that have single fixed memory mapped regions were not derived from BasicPioDevice, when that's exactly the functionality that BasicPioDevice provides. This patch gets rid of a little bit of redundant code by making those devices actually do so. Also fixed the weird case of X86ISA::Interrupts, where the class already did derive from BasicPioDevice but didn't actually use all the features it could have. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/dev/pciconfigall.cc')
-rw-r--r--src/dev/pciconfigall.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/dev/pciconfigall.cc b/src/dev/pciconfigall.cc
index 4fe3b4641..d5ebb7d57 100644
--- a/src/dev/pciconfigall.cc
+++ b/src/dev/pciconfigall.cc
@@ -44,9 +44,13 @@
#include "sim/system.hh"
PciConfigAll::PciConfigAll(const Params *p)
- : PioDevice(p)
+ : BasicPioDevice(p)
{
+ // the pio_addr Python parameter is ignored, and overridden by
+ // this caluclated value
pioAddr = p->platform->calcPciConfigAddr(params()->bus,0,0);
+
+ pioSize = params()->size;
}
@@ -73,26 +77,17 @@ PciConfigAll::read(PacketPtr pkt)
panic("invalid access size(?) for PCI configspace!\n");
}
pkt->makeAtomicResponse();
- return params()->pio_latency;
+ return pioDelay;
}
Tick
PciConfigAll::write(PacketPtr pkt)
{
- panic("Attempting to write to config space on non-existant device\n");
+ panic("Attempting to write to config space on non-existent device\n");
M5_DUMMY_RETURN
}
-AddrRangeList
-PciConfigAll::getAddrRanges() const
-{
- AddrRangeList ranges;
- ranges.push_back(RangeSize(pioAddr, params()->size));
- return ranges;
-}
-
-
#ifndef DOXYGEN_SHOULD_SKIP_THIS
PciConfigAll *