Hello Anouk Van Laer,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/16483
to review the following change.
Change subject: arch-arm: Move GICv3 detection at startup time
......................................................................
arch-arm: Move GICv3 detection at startup time
At the moment the haveGicV3 parameter is used only to signal its
presence when reading the MISCREG_ID_AA64PFR0_EL1 register. It depends
on the system->getGIC pointing to a GICv3 model. However this pointer
is set in the System only at init time (after construction), which means
that the haveGICv3CPUInterface will always be false.
This patch is fixing this by moving the parameter initialization at
startup time, together with the cpu interface registration.
Change-Id: I8da6711ea741ecd0f78ec8ca60a8c3ae3bca2421
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-by: Anouk Van Laer <[email protected]>
---
M src/arch/arm/isa.cc
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc
index 97de97e..3b10f68 100644
--- a/src/arch/arm/isa.cc
+++ b/src/arch/arm/isa.cc
@@ -64,6 +64,7 @@
_decoderFlavour(p->decoderFlavour),
_vecRegRenameMode(Enums::Full),
pmu(p->pmu),
+ haveGICv3CPUInterface(false),
impdefAsNop(p->impdef_nop)
{
miscRegs[MISCREG_SCTLR_RST] = 0;
@@ -96,13 +97,6 @@
physAddrRange = 32; // dummy value
}
- // GICv3 CPU interface system registers are supported
- haveGICv3CPUInterface = false;
-
- if (system && dynamic_cast<Gicv3 *>(system->getGIC())) {
- haveGICv3CPUInterface = true;
- }
-
// Initial rename mode depends on highestEL
const_cast<Enums::VecRegRenameMode&>(_vecRegRenameMode) =
highestELIs64 ? Enums::Full : Enums::Elem;
@@ -388,6 +382,7 @@
if (system) {
Gicv3 *gicv3 = dynamic_cast<Gicv3 *>(system->getGIC());
if (gicv3) {
+ haveGICv3CPUInterface = true;
gicv3CpuInterface.reset(gicv3->getCPUInterface(tc->contextId()));
gicv3CpuInterface->setISA(this);
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/16483
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I8da6711ea741ecd0f78ec8ca60a8c3ae3bca2421
Gerrit-Change-Number: 16483
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Anouk Van Laer <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev