summaryrefslogtreecommitdiff
path: root/src/arch/x86
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/arch/x86
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/arch/x86')
-rw-r--r--src/arch/x86/interrupts.cc20
-rw-r--r--src/arch/x86/interrupts.hh3
2 files changed, 4 insertions, 19 deletions
diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc
index ad9d483c7..ae01f921f 100644
--- a/src/arch/x86/interrupts.cc
+++ b/src/arch/x86/interrupts.cc
@@ -222,7 +222,7 @@ X86ISA::Interrupts::read(PacketPtr pkt)
reg, offset, val);
pkt->setData(((uint8_t *)&val) + (offset & mask(3)));
pkt->makeAtomicResponse();
- return latency;
+ return pioDelay;
}
Tick
@@ -240,7 +240,7 @@ X86ISA::Interrupts::write(PacketPtr pkt)
reg, offset, gtoh(val));
setReg(reg, gtoh(val));
pkt->makeAtomicResponse();
- return latency;
+ return pioDelay;
}
void
X86ISA::Interrupts::requestInterrupt(uint8_t vector,
@@ -347,7 +347,7 @@ X86ISA::Interrupts::recvMessage(PacketPtr pkt)
break;
}
pkt->makeAtomicResponse();
- return latency;
+ return pioDelay;
}
@@ -368,18 +368,6 @@ X86ISA::Interrupts::recvResponse(PacketPtr pkt)
AddrRangeList
-X86ISA::Interrupts::getAddrRanges() const
-{
- AddrRangeList ranges;
- AddrRange range = RangeEx(x86LocalAPICAddress(initialApicId, 0),
- x86LocalAPICAddress(initialApicId, 0) +
- PageBytes);
- ranges.push_back(range);
- return ranges;
-}
-
-
-AddrRangeList
X86ISA::Interrupts::getIntAddrRange() const
{
AddrRangeList ranges;
@@ -619,7 +607,7 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val)
X86ISA::Interrupts::Interrupts(Params * p) :
- BasicPioDevice(p), IntDev(this, p->int_latency), latency(p->pio_latency),
+ BasicPioDevice(p), IntDev(this, p->int_latency),
apicTimerEvent(this),
pendingSmi(false), smiVector(0),
pendingNmi(false), nmiVector(0),
diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh
index de3eea1a6..959a61513 100644
--- a/src/arch/x86/interrupts.hh
+++ b/src/arch/x86/interrupts.hh
@@ -92,8 +92,6 @@ class Interrupts : public BasicPioDevice, IntDev
/*
* Timing related stuff.
*/
- Tick latency;
-
class ApicTimerEvent : public Event
{
private:
@@ -233,7 +231,6 @@ class Interrupts : public BasicPioDevice, IntDev
return entry.periodic;
}
- AddrRangeList getAddrRanges() const;
AddrRangeList getIntAddrRange() const;
BaseMasterPort &getMasterPort(const std::string &if_name,