diff options
author | Gabe Black <gabeblack@google.com> | 2019-09-11 15:17:38 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-10-15 00:47:23 +0000 |
commit | 3b58400b27629779a386ffb21e62473044d88680 (patch) | |
tree | d570553edb34ad2e1db78a9476e0f6fbb022b7a5 /src/dev/x86/i82094aa.cc | |
parent | 6518171f8204511d9c2ac26c8c203baba9276cd2 (diff) | |
download | gem5-3b58400b27629779a386ffb21e62473044d88680.tar.xz |
x86: De-x86ify the IntMasterPort.
The devices which host an IntMasterPort are very specific to x86 at the
moment, but the ports don't have to be. This change moves
responsibilities around so that the x86 specific aspects are handled
in the device, and the ports themselves are ISA agnostic.
Change-Id: I50141b66895be7d8f6303605505002ef424af7fd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20827
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/dev/x86/i82094aa.cc')
-rw-r--r-- | src/dev/x86/i82094aa.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dev/x86/i82094aa.cc b/src/dev/x86/i82094aa.cc index 5daebe7b6..17ac65f96 100644 --- a/src/dev/x86/i82094aa.cc +++ b/src/dev/x86/i82094aa.cc @@ -30,6 +30,8 @@ #include "dev/x86/i82094aa.hh" +#include <list> + #include "arch/x86/interrupts.hh" #include "arch/x86/intmessage.hh" #include "cpu/base.hh" @@ -205,7 +207,7 @@ X86ISA::I82094AA::signalInterrupt(int line) message.destMode = entry.destMode; message.level = entry.polarity; message.trigger = entry.trigger; - ApicList apics; + std::list<int> apics; int numContexts = sys->numContexts(); if (message.destMode == 0) { if (message.deliveryMode == DeliveryMode::LowestPriority) { @@ -237,7 +239,7 @@ X86ISA::I82094AA::signalInterrupt(int line) // through the set of APICs selected above. uint64_t modOffset = lowestPriorityOffset % apics.size(); lowestPriorityOffset++; - ApicList::iterator apicIt = apics.begin(); + auto apicIt = apics.begin(); while (modOffset--) { apicIt++; assert(apicIt != apics.end()); @@ -247,7 +249,10 @@ X86ISA::I82094AA::signalInterrupt(int line) apics.push_back(selected); } } - intMasterPort.sendMessage(apics, message, sys->isTimingMode()); + for (auto id: apics) { + PacketPtr pkt = buildIntTriggerPacket(id, message); + intMasterPort.sendMessage(pkt, sys->isTimingMode()); + } } } |