configs: Make the configuration of the gicv4 parameter robust

Only the GICv3 model has a `gicv4` parameter, causing the current
`baremetal.py` config to throw an exception when used with the
VExpress_GEM5_V1 platform containing a GICv2.

This patch checks for the existence of the `gicv4` parameter, allowing
all VExpress platforms to be used.

Change-Id: I72667a9caee64fa497bda516217cd424050eb242
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69685
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
Richard Cooper
2022-09-08 20:57:03 +01:00
parent a83f699f1d
commit 5138092607

View File

@@ -142,7 +142,8 @@ def create(args):
system.auto_reset_addr = True
# Using GICv3
system.realview.gic.gicv4 = False
if hasattr(system.realview.gic, "gicv4"):
system.realview.gic.gicv4 = False
system.highest_el_is_64 = True