dev-arm: FVPBasePwrCtrl, fix vector resizing
authorAdrian Herrera <adrian.herrera@arm.com>
Wed, 8 Jul 2020 16:03:34 +0000 (17:03 +0100)
committerAdrian Herrera <adrian.herrera@arm.com>
Thu, 24 Sep 2020 14:01:09 +0000 (14:01 +0000)
commit87328c2fc15746ed50619d7c1785ae737e04cb54
treeb0176754d6d0a32afe9a5bdf6c4db56672b52e4a
parent2e5ffdb7f3470cda8dc52adc1ac8014470349399
dev-arm: FVPBasePwrCtrl, fix vector resizing

(1) ThreadContexts are registered into System in BaseCPU::init.
(2) FVPBasePwrCtrl state is resized based on registered ThreadContexts
in FVPBasePwrCtrl::init.

FVPBasePwrCtrl::init may be called before BaseCPU::init based on the
model names alphabetical order, leading to segmentation faults.
To fix this, (2) is now carried out in FVPBasePwrCtrl::startup.

Change-Id: Ica6c5b7448da556d61aee53f8777a709fcad2212
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35075
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/arm/fvp_base_pwr_ctrl.cc
src/dev/arm/fvp_base_pwr_ctrl.hh