cpu: Don't init simple and inorder CPUs if they are defered.
initCPU() will be called to initialize switched out CPUs for the simple and inorder CPU models. this patch prevents those CPUs from being initialized because they should get their state from the active CPU when it is switched out.
This commit is contained in:
@@ -792,7 +792,7 @@ InOrderCPU::init()
|
||||
thread[tid]->initMemProxies(thread[tid]->getTC());
|
||||
}
|
||||
|
||||
if (FullSystem) {
|
||||
if (FullSystem && !params()->defer_registration) {
|
||||
for (ThreadID tid = 0; tid < numThreads; tid++) {
|
||||
ThreadContext *src_tc = threadContexts[tid];
|
||||
TheISA::initCPU(src_tc, src_tc->contextId());
|
||||
|
||||
@@ -86,7 +86,7 @@ AtomicSimpleCPU::init()
|
||||
// Initialise the ThreadContext's memory proxies
|
||||
tcBase()->initMemProxies(tcBase());
|
||||
|
||||
if (FullSystem) {
|
||||
if (FullSystem && !params()->defer_registration) {
|
||||
ThreadID size = threadContexts.size();
|
||||
for (ThreadID i = 0; i < size; ++i) {
|
||||
ThreadContext *tc = threadContexts[i];
|
||||
|
||||
@@ -68,7 +68,7 @@ TimingSimpleCPU::init()
|
||||
// Initialise the ThreadContext's memory proxies
|
||||
tcBase()->initMemProxies(tcBase());
|
||||
|
||||
if (FullSystem) {
|
||||
if (FullSystem && !params()->defer_registration) {
|
||||
for (int i = 0; i < threadContexts.size(); ++i) {
|
||||
ThreadContext *tc = threadContexts[i];
|
||||
// initialize CPU, including PC
|
||||
|
||||
Reference in New Issue
Block a user