#include "iris/detail/IrisCppAdapter.h"
#include "iris/detail/IrisObjects.h"
+#include "mem/fs_translating_port_proxy.hh"
+#include "mem/se_translating_port_proxy.hh"
namespace Iris
{
return count;
}
+void
+ThreadContext::initMemProxies(::ThreadContext *tc)
+{
+ if (FullSystem) {
+ assert(!physProxy && !virtProxy);
+ physProxy.reset(new PortProxy(_cpu->getSendFunctional(),
+ _cpu->cacheLineSize()));
+ virtProxy.reset(new FSTranslatingPortProxy(tc));
+ } else {
+ assert(!virtProxy);
+ virtProxy.reset(new SETranslatingPortProxy(
+ _cpu->getSendFunctional(), getProcessPtr(),
+ SETranslatingPortProxy::NextPage));
+ }
+}
+
ThreadContext::Status
ThreadContext::status() const
{
#ifndef __ARCH_ARM_FASTMODEL_IRIS_THREAD_CONTEXT_HH__
#define __ARCH_ARM_FASTMODEL_IRIS_THREAD_CONTEXT_HH__
+#include <memory>
+
#include "cpu/base.hh"
#include "cpu/thread_context.hh"
#include "iris/IrisInstance.h"
std::vector<iris::MemorySpaceInfo> memorySpaces;
std::vector<iris::MemorySupportedAddressTranslationResult> translations;
+ std::unique_ptr<PortProxy> virtProxy = nullptr;
+ std::unique_ptr<PortProxy> physProxy = nullptr;
+
// A queue to keep track of instruction count based events.
EventQueue comInstEventQueue;
{
panic("%s not implemented.", __FUNCTION__);
}
- PortProxy &
- getPhysProxy() override
- {
- panic("%s not implemented.", __FUNCTION__);
- }
- PortProxy &
- getVirtProxy() override
- {
- panic("%s not implemented.", __FUNCTION__);
- }
- void
- initMemProxies(::ThreadContext *tc) override
- {
- panic("%s not implemented.", __FUNCTION__);
- }
+
+ PortProxy &getPhysProxy() override { return *physProxy; }
+ PortProxy &getVirtProxy() override { return *virtProxy; }
+ void initMemProxies(::ThreadContext *tc) override;
+
Process *
getProcessPtr() override
{