From bd30d1a4d5fb1d0a1abfa1a0f7e65cb2fd06abe9 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 30 Jul 2023 22:17:58 +0800 Subject: [PATCH] arch: Move trustzone related setting to common place to share the security setting between arm32 and arm64 Signed-off-by: Xiang Xiao --- arch/Kconfig | 23 +++++++++++++++++++++++ arch/arm/Kconfig | 23 ----------------------- arch/arm64/Kconfig | 7 ------- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 7f5b0ac5548..797a0675cba 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -514,6 +514,29 @@ config ARCH_HAVE_ELF_EXECUTABLE bool default n +config ARCH_HAVE_TRUSTZONE + bool + default n + ---help--- + Automatically selected to indicate that the ARM CPU supports + TrustZone. + +choice + prompt "TrustZone Configuration" + default ARCH_TRUSTZONE_NONSECURE + depends on ARCH_HAVE_TRUSTZONE + +config ARCH_TRUSTZONE_SECURE + bool "All CPUs operate secure state" + +config ARCH_TRUSTZONE_NONSECURE + bool "All CPUs operate non-secure state" + +config ARCH_TRUSTZONE_BOTH + bool "CPUs operate in both secure and non-secure states" + +endchoice # TrustZone Configuration + config ARCH_FPU bool "FPU support" default y diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3200b5a0164..50f2423f4ce 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1034,29 +1034,6 @@ config ARCH_CHIP default "phy62xx" if ARCH_CHIP_PHY62XX default "tlsr82" if ARCH_CHIP_TLSR82 -config ARCH_HAVE_TRUSTZONE - bool - default n - ---help--- - Automatically selected to indicate that the ARM CPU supports - TrustZone. - -choice - prompt "TrustZone Configuration" - default ARCH_TRUSTZONE_NONSECURE - depends on ARCH_HAVE_TRUSTZONE - -config ARCH_TRUSTZONE_SECURE - bool "All CPUs operate secure state" - -config ARCH_TRUSTZONE_NONSECURE - bool "All CPUs operate non-secure state" - -config ARCH_TRUSTZONE_BOTH - bool "CPUs operate in both secure and non-secure states" - -endchoice # TrustZone Configuration - config ARM_THUMB bool "Thumb Mode" default n diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a3bc6c97e0a..1dbb40767ea 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -185,13 +185,6 @@ config ARCH_CHIP default "qemu" if ARCH_CHIP_QEMU default "fvp-v8r" if ARCH_CHIP_FVP_ARMV8R -config ARCH_HAVE_TRUSTZONE - bool - default n - ---help--- - Automatically selected to indicate that the ARM CPU supports - TrustZone. - config ARM_HAVE_NEON bool default n