diff options
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/interrupts.cc | 8 | ||||
-rw-r--r-- | src/arch/x86/intmessage.hh | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc index d4ee9f6a6..1b21835c5 100644 --- a/src/arch/x86/interrupts.cc +++ b/src/arch/x86/interrupts.cc @@ -51,6 +51,7 @@ #include "arch/x86/interrupts.hh" +#include <list> #include <memory> #include "arch/x86/intmessage.hh" @@ -484,7 +485,7 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val) message.destMode = low.destMode; message.level = low.level; message.trigger = low.trigger; - ApicList apics; + std::list<int> apics; int numContexts = sys->numContexts(); switch (low.destShorthand) { case 0: @@ -545,7 +546,10 @@ X86ISA::Interrupts::setReg(ApicRegIndex reg, uint32_t val) pendingIPIs += apics.size(); } regs[APIC_INTERRUPT_COMMAND_LOW] = low; - intMasterPort.sendMessage(apics, message, sys->isTimingMode()); + for (auto id: apics) { + PacketPtr pkt = buildIntTriggerPacket(id, message); + intMasterPort.sendMessage(pkt, sys->isTimingMode()); + } newVal = regs[APIC_INTERRUPT_COMMAND_LOW]; } break; diff --git a/src/arch/x86/intmessage.hh b/src/arch/x86/intmessage.hh index d2a5dfa1c..bf1e5c44a 100644 --- a/src/arch/x86/intmessage.hh +++ b/src/arch/x86/intmessage.hh @@ -34,6 +34,7 @@ #include "arch/x86/x86_traits.hh" #include "base/bitunion.hh" #include "base/types.hh" +#include "dev/x86/intdev.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" #include "mem/request.hh" @@ -76,16 +77,11 @@ namespace X86ISA static const Addr TriggerIntOffset = 0; - template<class T> - PacketPtr - buildIntPacket(Addr addr, T payload) + static inline PacketPtr + buildIntTriggerPacket(int id, TriggerIntMessage message) { - RequestPtr req = std::make_shared<Request>( - addr, sizeof(T), Request::UNCACHEABLE, Request::intMasterId); - PacketPtr pkt = new Packet(req, MemCmd::WriteReq); - pkt->allocate(); - pkt->setRaw<T>(payload); - return pkt; + Addr addr = x86InterruptAddress(id, TriggerIntOffset); + return buildIntPacket(addr, message); } } |