diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-03-30 09:38:35 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-03-30 09:38:35 -0400 |
commit | a14013af3a9e04d68985aea7bcff6c1e70bdbb82 (patch) | |
tree | 67e1fcae84daca1bd507d439a24919d178f4d16e /src/cpu/simple/atomic.cc | |
parent | 390cfc7be9e5e477451a31a1dc8df82b42ee4011 (diff) | |
download | gem5-a14013af3a9e04d68985aea7bcff6c1e70bdbb82.tar.xz |
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.
Diffstat (limited to 'src/cpu/simple/atomic.cc')
-rw-r--r-- | src/cpu/simple/atomic.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index cc2c3576f..e5b3bd67d 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -80,6 +80,10 @@ void AtomicSimpleCPU::init() { BaseCPU::init(); + + // Initialise the ThreadContext's memory proxies + tcBase()->initMemProxies(tcBase()); + if (FullSystem) { ThreadID size = threadContexts.size(); for (ThreadID i = 0; i < size; ++i) { @@ -89,9 +93,6 @@ AtomicSimpleCPU::init() } } - // Initialise the ThreadContext's memory proxies - tcBase()->initMemProxies(tcBase()); - if (hasPhysMemPort) { AddrRangeList pmAddrList = physmemPort.getPeer()->getAddrRanges(); physMemAddr = *pmAddrList.begin(); |