summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'cpu')
-rw-r--r--cpu/exec_context.cc2
-rw-r--r--cpu/exec_context.hh5
2 files changed, 6 insertions, 1 deletions
diff --git a/cpu/exec_context.cc b/cpu/exec_context.cc
index a281609f4..10894230b 100644
--- a/cpu/exec_context.cc
+++ b/cpu/exec_context.cc
@@ -37,6 +37,7 @@
#include "base/output.hh"
#include "cpu/profile.hh"
#include "kern/kernel_stats.hh"
+#include "mem/translating_port.hh"
#include "sim/serialize.hh"
#include "sim/sim_exit.hh"
#include "sim/system.hh"
@@ -85,6 +86,7 @@ ExecContext::ExecContext(BaseCPU *_cpu, int _thread_num, System *_system,
asid(_asid),
func_exe_inst(0), storeCondFailures(0)
{
+ port = new TranslatingPort(cpu->memPort, process->pTable);
memset(&regs, 0, sizeof(RegFile));
}
#endif
diff --git a/cpu/exec_context.hh b/cpu/exec_context.hh
index c40b00e4c..3d40c06f0 100644
--- a/cpu/exec_context.hh
+++ b/cpu/exec_context.hh
@@ -35,8 +35,8 @@
#include "sim/host.hh"
#include "sim/serialize.hh"
#include "targetarch/byte_swap.hh"
+#include "mem/translating_port.hh"
-class Memory;
class BaseCPU;
#if FULL_SYSTEM
@@ -122,6 +122,9 @@ class ExecContext
int cpu_id;
System *system;
+
+ /// Port that syscalls can use to access memory (provides translation step).
+ TranslatingPort *port;
// Memory *mem;
#if FULL_SYSTEM