Jianliang Shen | 710cb95 | 2022-10-08 11:32:35 +0800 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2022, Arm Limited. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | # Load platform Kconfig file if exists |
| 9 | osource "$(PLATFORM_PATH)/Kconfig" |
| 10 | |
| 11 | ################################# SPM ########################################## |
| 12 | |
| 13 | menu "SPM" |
| 14 | config TFM_ISOLATION_LEVEL |
| 15 | int "Isolation level" |
| 16 | default 1 |
Kevin Peng | 6727c04 | 2023-02-03 10:52:19 +0800 | [diff] [blame] | 17 | range 1 1 if CONFIG_TFM_SPM_BACKEND_SFN |
Jianliang Shen | 710cb95 | 2022-10-08 11:32:35 +0800 | [diff] [blame] | 18 | range 1 3 if PLATFORM_HAS_ISOLATION_L3_SUPPORT |
| 19 | range 1 2 |
| 20 | |
| 21 | choice |
| 22 | prompt "SPM Backend" |
Kevin Peng | 6727c04 | 2023-02-03 10:52:19 +0800 | [diff] [blame] | 23 | default CONFIG_TFM_SPM_BACKEND_SFN |
Jianliang Shen | 710cb95 | 2022-10-08 11:32:35 +0800 | [diff] [blame] | 24 | |
Kevin Peng | 6727c04 | 2023-02-03 10:52:19 +0800 | [diff] [blame] | 25 | config CONFIG_TFM_SPM_BACKEND_SFN |
Jianliang Shen | 710cb95 | 2022-10-08 11:32:35 +0800 | [diff] [blame] | 26 | bool "SFN Backend" |
| 27 | |
Kevin Peng | 6727c04 | 2023-02-03 10:52:19 +0800 | [diff] [blame] | 28 | config CONFIG_TFM_SPM_BACKEND_IPC |
Jianliang Shen | 2b24f25 | 2022-11-25 11:08:54 +0800 | [diff] [blame] | 29 | bool "IPC Backend" |
Jianliang Shen | 710cb95 | 2022-10-08 11:32:35 +0800 | [diff] [blame] | 30 | endchoice |
| 31 | |
| 32 | config CONFIG_TFM_SPM_BACKEND |
| 33 | string |
Kevin Peng | 6727c04 | 2023-02-03 10:52:19 +0800 | [diff] [blame] | 34 | default "IPC" if CONFIG_TFM_SPM_BACKEND_IPC |
| 35 | default "SFN" if CONFIG_TFM_SPM_BACKEND_SFN |
Jianliang Shen | 710cb95 | 2022-10-08 11:32:35 +0800 | [diff] [blame] | 36 | default "" |
| 37 | |
| 38 | choice |
| 39 | prompt "Fault injection hardening profile" |
| 40 | |
| 41 | config TFM_FIH_PROFILE_OFF |
| 42 | bool "OFF" |
| 43 | |
| 44 | config TFM_FIH_PROFILE_LOW |
| 45 | bool "Low" |
| 46 | |
| 47 | config TFM_FIH_PROFILE_MEDIUM |
| 48 | bool "Medium" |
| 49 | |
| 50 | config TFM_FIH_PROFILE_HIGH |
| 51 | bool "High" |
| 52 | endchoice |
| 53 | |
| 54 | config TFM_FIH_PROFILE |
| 55 | string |
| 56 | default "OFF" if TFM_FIH_PROFILE_OFF |
| 57 | default "LOW" if TFM_FIH_PROFILE_LOW |
| 58 | default "MEDIUM" if TFM_FIH_PROFILE_MEDIUM |
| 59 | default "HIGH" if TFM_FIH_PROFILE_HIGH |
| 60 | |
| 61 | config PSA_FRAMEWORK_HAS_MM_IOVEC |
| 62 | bool "Enable MM-IOVEC" |
| 63 | default n |
| 64 | depends on TFM_ISOLATION_LEVEL = 1 |
| 65 | endmenu |
| 66 | |
| 67 | ################################# Secure partitions ############################ |
| 68 | |
| 69 | # These are partition switches. |
| 70 | rsource "secure_fw/partitions/Kconfig" |
| 71 | |
| 72 | ################################# Platforms #################################### |
| 73 | |
| 74 | rsource "platform/Kconfig" |
| 75 | |
Jianliang Shen | 710cb95 | 2022-10-08 11:32:35 +0800 | [diff] [blame] | 76 | ################################# TEST ######################################### |
| 77 | |
| 78 | menu "TF-M tests" |
| 79 | rsource "lib/ext/tf-m-tests/Kconfig" |
| 80 | rsource "lib/ext/psa_arch_tests/Kconfig" |
| 81 | endmenu |
| 82 | |
| 83 | ################################# Component #################################### |
| 84 | |
Jianliang Shen | 2b24f25 | 2022-11-25 11:08:54 +0800 | [diff] [blame] | 85 | # These configs in this menu are local to a component or externally referenced |
| 86 | # when components are coupled. Usually, such options are located in C header |
| 87 | # file. The Header File Config System has more details about it. |
Jianliang Shen | 710cb95 | 2022-10-08 11:32:35 +0800 | [diff] [blame] | 88 | |
| 89 | # Other configs above which are not in component menu are TF-M build options to |
| 90 | # select which file or component to include into compilation. These are options, |
| 91 | # usually used by a build system to enable/disable modules, specify location of |
| 92 | # external dependency or other selection, global to a project. These options |
| 93 | # shall be considered while adopting TF-M to other build systems. |
| 94 | |
| 95 | menu "TF-M component configs" |
| 96 | rsource "secure_fw/spm/Kconfig" |
| 97 | |
| 98 | menu "Secure Partitions component configs" |
| 99 | rsource "secure_fw/partitions/*/Kconfig" |
| 100 | endmenu |
| 101 | endmenu |