From 5138092607ea86b9453f9e6889365fcddb206b20 Mon Sep 17 00:00:00 2001 From: Richard Cooper Date: Thu, 8 Sep 2022 20:57:03 +0100 Subject: [PATCH] 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 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini --- configs/example/arm/baremetal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py index 4af1ff17c9..345596d6e1 100644 --- a/configs/example/arm/baremetal.py +++ b/configs/example/arm/baremetal.py @@ -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