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 |
| 17 | range 1 3 if PLATFORM_HAS_ISOLATION_L3_SUPPORT |
| 18 | range 1 2 |
| 19 | |
| 20 | choice |
| 21 | prompt "SPM Backend" |
| 22 | |
| 23 | config TFM_SPM_BACKEND_IPC |
| 24 | bool "IPC Backend" |
| 25 | |
| 26 | config TFM_SPM_BACKEND_SFN |
| 27 | bool "SFN Backend" |
| 28 | |
| 29 | endchoice |
| 30 | |
| 31 | config CONFIG_TFM_SPM_BACKEND |
| 32 | string |
| 33 | default "IPC" if TFM_SPM_BACKEND_IPC |
| 34 | default "SFN" if TFM_SPM_BACKEND_SFN |
| 35 | default "" |
| 36 | |
| 37 | choice |
| 38 | prompt "Fault injection hardening profile" |
| 39 | |
| 40 | config TFM_FIH_PROFILE_OFF |
| 41 | bool "OFF" |
| 42 | |
| 43 | config TFM_FIH_PROFILE_LOW |
| 44 | bool "Low" |
| 45 | |
| 46 | config TFM_FIH_PROFILE_MEDIUM |
| 47 | bool "Medium" |
| 48 | |
| 49 | config TFM_FIH_PROFILE_HIGH |
| 50 | bool "High" |
| 51 | endchoice |
| 52 | |
| 53 | config TFM_FIH_PROFILE |
| 54 | string |
| 55 | default "OFF" if TFM_FIH_PROFILE_OFF |
| 56 | default "LOW" if TFM_FIH_PROFILE_LOW |
| 57 | default "MEDIUM" if TFM_FIH_PROFILE_MEDIUM |
| 58 | default "HIGH" if TFM_FIH_PROFILE_HIGH |
| 59 | |
| 60 | config PSA_FRAMEWORK_HAS_MM_IOVEC |
| 61 | bool "Enable MM-IOVEC" |
| 62 | default n |
| 63 | depends on TFM_ISOLATION_LEVEL = 1 |
| 64 | endmenu |
| 65 | |
| 66 | ################################# Secure partitions ############################ |
| 67 | |
| 68 | # These are partition switches. |
| 69 | rsource "secure_fw/partitions/Kconfig" |
| 70 | |
| 71 | ################################# Platforms #################################### |
| 72 | |
| 73 | rsource "platform/Kconfig" |
| 74 | |
| 75 | ################################# NS ########################################### |
| 76 | |
| 77 | config NS |
| 78 | bool "NS app" |
| 79 | default y |
| 80 | |
| 81 | ################################# TEST ######################################### |
| 82 | |
| 83 | menu "TF-M tests" |
| 84 | rsource "lib/ext/tf-m-tests/Kconfig" |
| 85 | rsource "lib/ext/psa_arch_tests/Kconfig" |
| 86 | endmenu |
| 87 | |
| 88 | ################################# Component #################################### |
| 89 | |
| 90 | # These configs in this menu are are local to a component or externally |
| 91 | # referenced when components are coupled. Usually, such options are located in |
| 92 | # C header file. The Header File Config System has more details about it. |
| 93 | |
| 94 | # Other configs above which are not in component menu are TF-M build options to |
| 95 | # select which file or component to include into compilation. These are options, |
| 96 | # usually used by a build system to enable/disable modules, specify location of |
| 97 | # external dependency or other selection, global to a project. These options |
| 98 | # shall be considered while adopting TF-M to other build systems. |
| 99 | |
| 100 | menu "TF-M component configs" |
| 101 | rsource "secure_fw/spm/Kconfig" |
| 102 | |
| 103 | menu "Secure Partitions component configs" |
| 104 | rsource "secure_fw/partitions/*/Kconfig" |
| 105 | endmenu |
| 106 | endmenu |