From a14013af3a9e04d68985aea7bcff6c1e70bdbb82 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 30 Mar 2012 09:38:35 -0400 Subject: CPU: Unify initMemProxies across CPUs and simulation modes This patch unifies where initMemProxies is called, in the init() method of each BaseCPU subclass, before TheISA::initCPU is called. Moreover, it also ensures that initMemProxies is called in both full-system and syscall-emulation mode, thus unifying also across the modes. An additional check is added in the ThreadState to ensure that initMemProxies is only called once. --- src/cpu/thread_state.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cpu/thread_state.hh') diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh index 3f58e4f14..995a870f5 100644 --- a/src/cpu/thread_state.hh +++ b/src/cpu/thread_state.hh @@ -85,7 +85,7 @@ struct ThreadState { * Initialise the physical and virtual port proxies and tie them to * the data port of the CPU. * - * tc ThreadContext for the virtual-to-physical translation + * @param tc ThreadContext for the virtual-to-physical translation */ void initMemProxies(ThreadContext *tc); @@ -105,7 +105,7 @@ struct ThreadState { Process *getProcessPtr() { return process; } - SETranslatingPortProxy &getMemProxy(); + SETranslatingPortProxy &getMemProxy() { return *proxy; } /** Reads the number of instructions functionally executed and * committed. -- cgit v1.2.3