}
}
+void
+BaseCPU::initState()
+{
+ if (FullSystem && !params()->switched_out) {
+ for (auto *tc: threadContexts)
+ TheISA::initCPU(tc, tc->contextId());
+ }
+}
+
void
BaseCPU::startup()
{
virtual ~BaseCPU();
void init() override;
+ void initState() override;
void startup() override;
void regStats() override;
fatal("KVM: Multithreading not supported");
tc->initMemProxies(tc);
-
- // initialize CPU, including PC
- if (FullSystem && !switchedOut())
- TheISA::initCPU(tc, tc->contextId());
}
void
tc->initMemProxies(tc);
}
-
- /* Initialise CPUs (== threads in the ISA) */
- if (FullSystem && !params()->switched_out) {
- for (ThreadID thread_id = 0; thread_id < threads.size(); thread_id++)
- {
- ThreadContext *tc = getContext(thread_id);
-
- /* Initialize CPU, including PC */
- TheISA::initCPU(tc, cpuId());
- }
- }
}
/** Stats interface from SimObject (by way of BaseCPU) */
thread[tid]->initMemProxies(thread[tid]->getTC());
}
- if (FullSystem && !params()->switched_out) {
- for (ThreadID tid = 0; tid < numThreads; tid++) {
- ThreadContext *src_tc = threadContexts[tid];
- TheISA::initCPU(src_tc, src_tc->contextId());
- }
- }
-
// Clear noSquashFromTC.
for (int tid = 0; tid < numThreads; ++tid)
thread[tid]->noSquashFromTC = false;
for (auto tc : threadContexts) {
// Initialise the ThreadContext's memory proxies
tc->initMemProxies(tc);
-
- if (FullSystem && !params()->switched_out) {
- // initialize CPU, including PC
- TheISA::initCPU(tc, tc->contextId());
- }
}
}