From: Ayaz Akram Date: Wed, 29 Jan 2020 00:22:03 +0000 (-0800) Subject: cpu: move initCPU calls from initState to init X-Git-Tag: v19.0.0.0~64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1219b26f446d12cb3eca59af37fb9a5fa74f299;p=gem5.git cpu: move initCPU calls from initState to init 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 Reviewed-by: Jason Lowe-Power Maintainer: Gabe Black Tested-by: kokoro --- diff --git a/src/cpu/base.cc b/src/cpu/base.cc index 5d6a85703..80726ac2b 100644 --- a/src/cpu/base.cc +++ b/src/cpu/base.cc @@ -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()); diff --git a/src/cpu/base.hh b/src/cpu/base.hh index f47bc8e7c..5b15f4186 100644 --- a/src/cpu/base.hh +++ b/src/cpu/base.hh @@ -314,7 +314,6 @@ class BaseCPU : public ClockedObject virtual ~BaseCPU(); void init() override; - void initState() override; void startup() override; void regStats() override;