From 47de86d65b3346f0ed9c5f84e9e30f6cf6a71729 Mon Sep 17 00:00:00 2001
From: Hugues KAMBA MPIANA <hugues.kambampiana@arm.com>
Date: Thu, 15 Jan 2026 18:33:04 +0000
Subject: [PATCH 1/3] plat-corstone1000: specify GIC version in plat specific
 conf.mk

The Generic Interrupt Controller architecture version is not core
specific. Therefore move the CFG_ARM_GICV3 definition from
cortex-a320.mk file to the Corstone-1000 specific file.

Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/7682]
Signed-off-by: Hugues KAMBA MPIANA <hugues.kambampiana@arm.com>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
---
 core/arch/arm/cpu/cortex-a320.mk        | 1 -
 core/arch/arm/plat-corstone1000/conf.mk | 6 ++++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/core/arch/arm/cpu/cortex-a320.mk b/core/arch/arm/cpu/cortex-a320.mk
index 12995012d..7ae513496 100644
--- a/core/arch/arm/cpu/cortex-a320.mk
+++ b/core/arch/arm/cpu/cortex-a320.mk
@@ -9,4 +9,3 @@ platform-aflags-debug-info = -gdwarf-2
 
 arm64-platform-cflags += -march=armv9.2-a
 arm64-platform-aflags += -march=armv9.2-a
-$(call force,CFG_ARM_GICV3,y)
diff --git a/core/arch/arm/plat-corstone1000/conf.mk b/core/arch/arm/plat-corstone1000/conf.mk
index 24a339a1f..e929d8233 100644
--- a/core/arch/arm/plat-corstone1000/conf.mk
+++ b/core/arch/arm/plat-corstone1000/conf.mk
@@ -33,3 +33,9 @@ CFG_DDR_SIZE ?= 0x7f000000
 CFG_DT_ADDR ?= 0x82100000
 CFG_DTB_MAX_SIZE ?= 0x100000
 CFG_CORE_HEAP_SIZE ?= 131072
+
+# Corstone-1000 with Cortex-A320 uses GIC-600 which supports
+# the GICv3 architecture
+ifeq ($(arm64-platform-cpuarch),cortex-a320)
+$(call force,CFG_ARM_GICV3,y)
+endif
-- 
2.50.1

