summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/null/utility.hh1
-rw-r--r--src/cpu/base.cc6
-rw-r--r--src/sim/system.cc6
3 files changed, 5 insertions, 8 deletions
diff --git a/src/arch/null/utility.hh b/src/arch/null/utility.hh
index cf65ef5cd..d92e55221 100644
--- a/src/arch/null/utility.hh
+++ b/src/arch/null/utility.hh
@@ -48,6 +48,7 @@ namespace NullISA {
inline uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size,
bool fp) { return 0; }
+inline void initCPU(ThreadContext *tc, int cpuId) {}
inline void startupCPU(ThreadContext *tc, int cpuId) {}
}
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 80726ac2b..ac0c7ac5b 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -318,12 +318,6 @@ BaseCPU::init()
verifyMemoryMode();
}
-
- //These calls eventually need to be moved to initState
- if (FullSystem && !params()->switched_out) {
- for (auto *tc: threadContexts)
- TheISA::initCPU(tc, tc->contextId());
- }
}
void
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 739b42278..e59c40477 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -349,8 +349,10 @@ void
System::initState()
{
if (FullSystem) {
- for (int i = 0; i < threadContexts.size(); i++)
- TheISA::startupCPU(threadContexts[i], i);
+ for (auto *tc: threadContexts) {
+ TheISA::initCPU(tc, tc->contextId());
+ TheISA::startupCPU(tc, tc->contextId());
+ }
// Moved from the constructor to here since it relies on the
// address map being resolved in the interconnect
/**