diff --git a/src/cpu/thread_context.cc b/src/cpu/thread_context.cc index 1a78693753..00afe7c383 100644 --- a/src/cpu/thread_context.cc +++ b/src/cpu/thread_context.cc @@ -48,6 +48,7 @@ #include "cpu/base.hh" #include "debug/Context.hh" #include "debug/Quiesce.hh" +#include "mem/port.hh" #include "params/BaseCPU.hh" #include "sim/full_system.hh" @@ -127,6 +128,15 @@ ThreadContext::compare(ThreadContext *one, ThreadContext *two) } +void +ThreadContext::sendFunctional(PacketPtr pkt) +{ + const auto *port = + dynamic_cast(&getCpuPtr()->getDataPort()); + assert(port); + port->sendFunctional(pkt); +} + void ThreadContext::quiesce() { diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh index 145be587bc..921135c0f4 100644 --- a/src/cpu/thread_context.hh +++ b/src/cpu/thread_context.hh @@ -68,6 +68,8 @@ class Checkpoint; class PortProxy; class Process; class System; +class Packet; +using PacketPtr = Packet *; /** * ThreadContext is the external interface to all thread state for @@ -146,6 +148,8 @@ class ThreadContext : public PCEventScope virtual PortProxy &getVirtProxy() = 0; + virtual void sendFunctional(PacketPtr pkt); + /** * Initialise the physical and virtual port proxies and tie them to * the data port of the CPU.