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/arch/x86/intmessage.hh | |
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/arch/x86/intmessage.hh')
-rw-r--r-- | src/arch/x86/intmessage.hh | 14 |
1 files changed, 5 insertions, 9 deletions
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); } } |