Luming Wang has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/55486 )

Change subject: configs, cpu: fix crashes related to switch_cpus
......................................................................

configs, cpu: fix crashes related to switch_cpus

The decoder objects are turned into SimObjects. However,
the decoder objects vector is initialized by calling
`createThreads`(defined in BaseCPU.py). However, there is
no code calling `createThreads` for switch_cpus.
As a result, all functions related to it are broken
(e.g. fast-forward, checkpoint).

Related commits and JIRA issues:
https://gem5-review.googlesource.com/c/public/gem5/+/52080
https://gem5.atlassian.net/browse/GEM5-1145
https://gem5.atlassian.net/browse/GEM5-1156

Change-Id: I4afc326c466627a11fc764fce85394c66c39b59e
---
M configs/common/Simulation.py
1 file changed, 25 insertions(+), 0 deletions(-)



diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py
index 3b9efc0..74643f9 100644
--- a/configs/common/Simulation.py
+++ b/configs/common/Simulation.py
@@ -488,6 +488,7 @@
                     options.indirect_bp_type)
                 switch_cpus[i].branchPred.indirectBranchPred = \
                     IndirectBPClass()
+            switch_cpus[i].createThreads()

         # If elastic tracing is enabled attach the elastic trace probe
         # to the switch CPUs
@@ -521,6 +522,7 @@

             if options.checker:
                 repeat_switch_cpus[i].addCheckerCpu()
+            repeat_switch_cpus[i].createThreads()

         testsys.repeat_switch_cpus = repeat_switch_cpus

@@ -575,6 +577,8 @@
             if options.checker:
                 switch_cpus[i].addCheckerCpu()
                 switch_cpus_1[i].addCheckerCpu()
+            switch_cpus[i].createThreads()
+            switch_cpus_1[i].createThreads()

         testsys.switch_cpus = switch_cpus
         testsys.switch_cpus_1 = switch_cpus_1

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55486
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I4afc326c466627a11fc764fce85394c66c39b59e
Gerrit-Change-Number: 55486
Gerrit-PatchSet: 1
Gerrit-Owner: Luming Wang <wlm199...@126.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to