cpu: move initCPU calls from initState to init
authorAyaz Akram <yazakram@ucdavis.edu>
Wed, 29 Jan 2020 00:22:03 +0000 (16:22 -0800)
committerAyaz Akram <yazakram@ucdavis.edu>
Wed, 29 Jan 2020 05:39:07 +0000 (05:39 +0000)
This commit moves the initCPU calls from initState to init
of base cpu (which were added in commit 0b8d02dec492215aa).
This is a temporary fix to solve the problem of X86System
initState getting called before initState of base cpu.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-292

Change-Id: I7434cd811536175562cfa2646f4326907fadad8c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24884
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/base.cc
src/cpu/base.hh

index 5d6a85703d3d7f6120b45ca25c109d6fbef1117b..80726ac2b1e24881605c33bfddf12a1fd67be1e3 100644 (file)
@@ -318,11 +318,8 @@ BaseCPU::init()
 
         verifyMemoryMode();
     }
-}
 
-void
-BaseCPU::initState()
-{
+    //These calls eventually need to be moved to initState
     if (FullSystem && !params()->switched_out) {
         for (auto *tc: threadContexts)
             TheISA::initCPU(tc, tc->contextId());
index f47bc8e7c2cf0f9abe5ad1c46314821f54a92b37..5b15f41860d3c3ec9a974a538e225bf068b05a08 100644 (file)
@@ -314,7 +314,6 @@ class BaseCPU : public ClockedObject
     virtual ~BaseCPU();
 
     void init() override;
-    void initState() override;
     void startup() override;
     void regStats() override;