summaryrefslogtreecommitdiff
path: root/src/dev/x86/i82094aa.hh
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/x86/i82094aa.hh
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/x86/i82094aa.hh')
-rw-r--r--src/dev/x86/i82094aa.hh29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/dev/x86/i82094aa.hh b/src/dev/x86/i82094aa.hh
index f5e292baa..a8d79fde1 100644
--- a/src/dev/x86/i82094aa.hh
+++ b/src/dev/x86/i82094aa.hh
@@ -44,7 +44,7 @@ namespace X86ISA
class I8259;
class Interrupts;
-class I82094AA : public PioDevice, public IntDev
+class I82094AA : public BasicPioDevice, public IntDev
{
public:
BitUnion64(RedirTableEntry)
@@ -64,9 +64,6 @@ class I82094AA : public PioDevice, public IntDev
EndBitUnion(RedirTableEntry)
protected:
- Tick latency;
- Addr pioAddr;
-
I8259 * extIntPic;
uint8_t regSel;
@@ -100,33 +97,13 @@ class I82094AA : public PioDevice, public IntDev
Tick read(PacketPtr pkt);
Tick write(PacketPtr pkt);
- AddrRangeList getAddrRanges() const
- {
- AddrRangeList ranges;
- ranges.push_back(RangeEx(pioAddr, pioAddr + 4));
- ranges.push_back(RangeEx(pioAddr + 16, pioAddr + 20));
- return ranges;
- }
-
- AddrRangeList getIntAddrRange() const
- {
- AddrRangeList ranges;
- ranges.push_back(RangeEx(x86InterruptAddress(initialApicId, 0),
- x86InterruptAddress(initialApicId, 0) +
- PhysAddrAPICRangeSize));
- return ranges;
- }
+ AddrRangeList getIntAddrRange() const;
void writeReg(uint8_t offset, uint32_t value);
uint32_t readReg(uint8_t offset);
BaseMasterPort &getMasterPort(const std::string &if_name,
- PortID idx = InvalidPortID)
- {
- if (if_name == "int_master")
- return intMasterPort;
- return PioDevice::getMasterPort(if_name, idx);
- }
+ PortID idx = InvalidPortID);
void signalInterrupt(int line);
void raiseInterruptPin(int number);