diff --git a/arch/Kconfig b/arch/Kconfig index 74fe13e3c36b0..a3fee92927684 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -573,14 +573,17 @@ config ARCH_HAVE_TRUSTZONE choice prompt "TrustZone Configuration" - default ARCH_TRUSTZONE_NONSECURE + default ARCH_TRUSTZONE_DISABLED depends on ARCH_HAVE_TRUSTZONE +config ARCH_TRUSTZONE_DISABLED + bool "TrustZone disabled, all CPUs operate in secure state" + config ARCH_TRUSTZONE_SECURE - bool "All CPUs operate secure state" + bool "TrustZone enabled, all CPUs operate secure state" config ARCH_TRUSTZONE_NONSECURE - bool "All CPUs operate non-secure state" + bool "TrustZone enabled, all CPUs operate non-secure state" endchoice # TrustZone Configuration diff --git a/arch/arm/src/armv7-a/arm_gicv2.c b/arch/arm/src/armv7-a/arm_gicv2.c index b6863d2b038cc..0dbe6be1708b7 100644 --- a/arch/arm/src/armv7-a/arm_gicv2.c +++ b/arch/arm/src/armv7-a/arm_gicv2.c @@ -35,6 +35,12 @@ #include "arm_internal.h" #include "gic.h" +#if defined(CONFIG_ARCH_TRUSTZONE_SECURE) || defined(CONFIG_ARCH_TRUSTZONE_NONSECURE) +# if defined(CONFIG_ARCH_HIPRI_INTERRUPT) +# error "ARCH_HIPRI_INTERRUPT must configure with ARCH_TRUSTZONE_DISABLED or no trustzone" +# endif +#endif + #ifdef CONFIG_ARMV7A_HAVE_GICv2 /****************************************************************************