diff options
Diffstat (limited to 'src/dev/x86')
-rw-r--r-- | src/dev/x86/i82094aa.cc | 4 | ||||
-rw-r--r-- | src/dev/x86/i82094aa.hh | 2 | ||||
-rw-r--r-- | src/dev/x86/intdev.cc | 4 | ||||
-rw-r--r-- | src/dev/x86/intdev.hh | 11 |
4 files changed, 8 insertions, 13 deletions
diff --git a/src/dev/x86/i82094aa.cc b/src/dev/x86/i82094aa.cc index d9c07f5ae..3d7454dfd 100644 --- a/src/dev/x86/i82094aa.cc +++ b/src/dev/x86/i82094aa.cc @@ -222,8 +222,8 @@ X86ISA::I82094AA::signalInterrupt(int line) apics.push_back(selected); } } - intPort->sendMessage(apics, message, - sys->getMemoryMode() == Enums::timing); + intPort.sendMessage(apics, message, + sys->getMemoryMode() == Enums::timing); } } diff --git a/src/dev/x86/i82094aa.hh b/src/dev/x86/i82094aa.hh index 60ef27012..f0837cc27 100644 --- a/src/dev/x86/i82094aa.hh +++ b/src/dev/x86/i82094aa.hh @@ -124,7 +124,7 @@ class I82094AA : public PioDevice, public IntDev Port *getPort(const std::string &if_name, int idx = -1) { if (if_name == "int_master") - return intPort; + return &intPort; return PioDevice::getPort(if_name, idx); } diff --git a/src/dev/x86/intdev.cc b/src/dev/x86/intdev.cc index a991005bc..23ec20b9a 100644 --- a/src/dev/x86/intdev.cc +++ b/src/dev/x86/intdev.cc @@ -51,10 +51,10 @@ X86ISA::IntDev::IntPort::sendMessage(ApicList apics, void X86ISA::IntDev::init() { - if (!intPort) { + if (!intPort.isConnected()) { panic("Int port not connected to anything!"); } - intPort->sendRangeChange(); + intPort.sendRangeChange(); } X86ISA::IntSourcePin * diff --git a/src/dev/x86/intdev.hh b/src/dev/x86/intdev.hh index 05b4d12a1..5549df637 100644 --- a/src/dev/x86/intdev.hh +++ b/src/dev/x86/intdev.hh @@ -84,17 +84,12 @@ class IntDev TriggerIntMessage message, bool timing); }; - IntPort * intPort; + IntPort intPort; public: - IntDev(MemObject * parent, Tick latency = 0) + IntDev(MemObject * parent, Tick latency = 0) : + intPort(parent->name() + ".int_master", parent, this, latency) { - if (parent != NULL) { - intPort = new IntPort(parent->name() + ".int_master", - parent, this, latency); - } else { - intPort = NULL; - } } virtual ~IntDev() |