From 3d24a07c6b74ac55c25d982eeb8d74b0f139ada4 Mon Sep 17 00:00:00 2001 From: Evgeniy Paltsev Date: Fri, 28 Oct 2022 19:50:05 +0400 Subject: [PATCH] ARC: disallow build for secure configuration with firq Such configuration isn't supported by HW. Signed-off-by: Eugeniy Paltsev Signed-off-by: Evgeniy Paltsev --- arch/arc/Kconfig | 1 + include/zephyr/arch/arc/arch.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 18d2db79990..bcb558db876 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -171,6 +171,7 @@ config ARC_FIRQ bool "FIRQ enable" depends on ISA_ARCV2 depends on NUM_IRQ_PRIO_LEVELS > 1 + depends on !ARC_HAS_SECURE default y help Fast interrupts are supported (FIRQ). If FIRQ enabled, for interrupts diff --git a/include/zephyr/arch/arc/arch.h b/include/zephyr/arch/arc/arch.h index 50e211641d3..dae82ceedf2 100644 --- a/include/zephyr/arch/arc/arch.h +++ b/include/zephyr/arch/arc/arch.h @@ -77,6 +77,11 @@ #error "Unsupported configuration: ARC_FIRQ_STACK and (RGF_NUM_BANKS < 2)" #endif +/* In case of ARC 2+2 secure mode enabled the firq are not supported by HW */ +#if defined(CONFIG_ARC_FIRQ) && defined(CONFIG_ARC_HAS_SECURE) +#error "Unsupported configuration: ARC_FIRQ and ARC_HAS_SECURE" +#endif + #if defined(CONFIG_SMP) && !defined(CONFIG_MULTITHREADING) #error "Non-multithreading mode isn't supported on SMP targets" #endif