arch-arm: Fix arm switcheroo regressions
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 25 Jun 2020 09:18:40 +0000 (10:18 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 25 Jun 2020 22:40:40 +0000 (22:40 +0000)
These were failing with the combination of:

https://gem5-review.googlesource.com/c/public/gem5/+/29233

with

https://gem5-review.googlesource.com/c/public/gem5/+/27967

Change-Id: I8d3c3701faf4828e76aaa2cb895b9589f057d370
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30616
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/isa.cc

index f88d2ef07960e35456442b3394949b89f42a816f..a48b3495ff4ed891ae8858f6f91c3da6ddca24ee 100644 (file)
@@ -428,7 +428,6 @@ ISA::startup()
         setupThreadContext();
 
     afterStartup = true;
-    selfDebug->init(tc);
 }
 
 void
@@ -439,6 +438,8 @@ ISA::setupThreadContext()
     if (!system)
         return;
 
+    selfDebug->init(tc);
+
     Gicv3 *gicv3 = dynamic_cast<Gicv3 *>(system->getGIC());
     if (!gicv3)
         return;