diff options
| author | Luc Michel <luc.michel@amd.com> | 2025-09-26 09:07:55 +0200 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2025-10-07 10:35:36 +0100 |
| commit | 268f7a3d24a73b94bfab1dd86c6b41f7afd196fc (patch) | |
| tree | 311385f798bfe6e3dafa934bd668c8738f387dd8 /hw | |
| parent | 00580a9d715138ec1560b91c596dedee07286fee (diff) | |
| download | focaccia-qemu-268f7a3d24a73b94bfab1dd86c6b41f7afd196fc.tar.gz focaccia-qemu-268f7a3d24a73b94bfab1dd86c6b41f7afd196fc.zip | |
hw/arm/xlnx-versal: add a per_cluster_gic switch to VersalCpuClusterMap
Add the per_cluster_gic switch to the VersalCpuClusterMap structure. When set, this indicates that a GIC instance should by created per-cluster instead of globally for the whole RPU or APU. This is in preparation for versal2. Signed-off-by: Luc Michel <luc.michel@amd.com> Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20250926070806.292065-38-luc.michel@amd.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/arm/xlnx-versal.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c index 49b5b24440..3d960ed263 100644 --- a/hw/arm/xlnx-versal.c +++ b/hw/arm/xlnx-versal.c @@ -88,6 +88,11 @@ enum StartPoweredOffMode { typedef struct VersalCpuClusterMap { VersalGicMap gic; + /* + * true: one GIC per cluster. + * false: one GIC for all CPUs + */ + bool per_cluster_gic; const char *name; const char *cpu_model; @@ -825,12 +830,18 @@ static void versal_create_cpu_cluster(Versal *s, const VersalCpuClusterMap *map) cpus[i * map->num_core + j] = cpu; } + if (map->per_cluster_gic) { + versal_create_and_connect_gic(s, map, mr, &cpus[i * map->num_core], + map->num_core); + } } qdev_realize_and_unref(cluster, NULL, &error_fatal); - versal_create_and_connect_gic(s, map, mr, cpus, - map->num_cluster * map->num_core); + if (!map->per_cluster_gic) { + versal_create_and_connect_gic(s, map, mr, cpus, + map->num_cluster * map->num_core); + } has_gtimer = arm_feature(&ARM_CPU(cpus[0])->env, ARM_FEATURE_GENERIC_TIMER); if (map->dtb_expose && has_gtimer) { |