blob: f4077ff2123f38ed86c6c37e72042e54b1f7ca44 [file] [log] [blame]
Jianliang Shen710cb952022-10-08 11:32:35 +08001#-------------------------------------------------------------------------------
Kevin Peng5cba61c2023-01-06 14:23:15 +08002# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
Jianliang Shen710cb952022-10-08 11:32:35 +08003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
Kevin Peng5cba61c2023-01-06 14:23:15 +08008menu "SPM"
9config TFM_ISOLATION_LEVEL
10 int "Isolation level"
11 default 1
Kevin Peng5cba61c2023-01-06 14:23:15 +080012 range 1 3 if PLATFORM_HAS_ISOLATION_L3_SUPPORT
13 range 1 2
Jianliang Shen1229c092023-02-20 14:06:08 +080014 help
15 SFN backend only supports level 1.
16 IPC backend can support all 3 levels.
17 Isolation level 3 requires platform support.
Jianliang Shen710cb952022-10-08 11:32:35 +080018
Kevin Peng5cba61c2023-01-06 14:23:15 +080019choice
20 prompt "SPM Backend"
Jianliang Shen710cb952022-10-08 11:32:35 +080021
Kevin Peng5cba61c2023-01-06 14:23:15 +080022 config CONFIG_TFM_SPM_BACKEND_SFN
23 bool "SFN Backend"
Jianliang Shen1229c092023-02-20 14:06:08 +080024 # Multi-core platform based on inter-core communication cannot fully work with SFN
25 # backend yet.
26 # TO-DO: Check whether it depends on TFM_PARTITION_NS_AGENT_MAILBOX or TFM_MULTI_CORE_TOPOLOGY
27 depends on !TFM_PARTITION_NS_AGENT_MAILBOX && TFM_ISOLATION_LEVEL = 1
Kevin Peng5cba61c2023-01-06 14:23:15 +080028
29 config CONFIG_TFM_SPM_BACKEND_IPC
30 bool "IPC Backend"
Kevin Peng54e31d02023-01-06 18:03:19 +080031 select CONFIG_TFM_PARTITION_META
Kevin Peng5cba61c2023-01-06 14:23:15 +080032endchoice
33
34config CONFIG_TFM_SPM_BACKEND
35 string
36 default "IPC" if CONFIG_TFM_SPM_BACKEND_IPC
37 default "SFN" if CONFIG_TFM_SPM_BACKEND_SFN
38 default ""
39
40choice
Jianliang Shen1229c092023-02-20 14:06:08 +080041 prompt "FIH Profile"
42 default TFM_FIH_PROFILE_OFF
43 help
44 Fault injection hardening profile
Kevin Peng5cba61c2023-01-06 14:23:15 +080045
46 config TFM_FIH_PROFILE_OFF
47 bool "OFF"
48
49 config TFM_FIH_PROFILE_LOW
50 bool "Low"
51
52 config TFM_FIH_PROFILE_MEDIUM
53 bool "Medium"
54
55 config TFM_FIH_PROFILE_HIGH
56 bool "High"
57endchoice
58
59config TFM_FIH_PROFILE
60 string
61 default "OFF" if TFM_FIH_PROFILE_OFF
62 default "LOW" if TFM_FIH_PROFILE_LOW
63 default "MEDIUM" if TFM_FIH_PROFILE_MEDIUM
64 default "HIGH" if TFM_FIH_PROFILE_HIGH
65
66config PSA_FRAMEWORK_HAS_MM_IOVEC
Jianliang Shen1229c092023-02-20 14:06:08 +080067 bool "MM-IOVEC"
Kevin Peng5cba61c2023-01-06 14:23:15 +080068 default n
69 depends on TFM_ISOLATION_LEVEL = 1
Jianliang Shen1229c092023-02-20 14:06:08 +080070 help
71 Memory-mapped IOVECs feature, supported only for isolation level 1
72
73################################# Misc #########################################
74
75config TFM_CODE_SHARING
76 bool "Enable code sharing between MCUboot and secure firmware"
77 #FIXME: Shall check IAR
78 default n
79
80config TFM_EXCEPTION_INFO_DUMP
81 bool "Exception information dump"
82 default n
83 help
84 On fatal errors in the secure firmware, capture info about the
85 exception. Print the info if the "SPM Log Level" is sufficient.
86
87config CONFIG_TFM_HALT_ON_CORE_PANIC
88 bool "Halt instead of rebooting"
89 default n
90 help
91 On fatal errors in the secure firmware, halt instead of rebooting.
92 This would be helpful for debugging.
93
94config TFM_PXN_ENABLE
95 bool "PXN"
96 depends on ARCH_ARM_V81MM
97 default n
98 help
99 Privileged eXecute-Never.
100 Enables the PXN feature in common MPU driver and isolation setup.
101
102config CONFIG_TFM_STACK_WATERMARKS
103 bool "Stack Watermarks"
104 depends on TFM_ISOLATION_LEVEL != 3
105 help
106 Whether to pre-fill partition stacks with a set value to help
107 determine stack usage.
108 Not supported for isolation level 3 yet.
109
110config NUM_MAILBOX_QUEUE_SLOT
111 int "Number of mailbox queue slots"
112 depends on TFM_PARTITION_NS_AGENT_MAILBOX
113 default 1
114
115################################# SPM log level ################################
116
117choice
118 prompt "SPM Log Level"
119 default SPM_LOG_LEVEL_SILENCE
120
121 config SPM_LOG_LEVEL_DEBUG
122 bool "Debug"
123
124 config SPM_LOG_LEVEL_INFO
125 bool "Info"
126
127 config SPM_LOG_LEVEL_ERROR
128 bool "Error"
129
130 config SPM_LOG_LEVEL_SILENCE
131 bool "Silence"
132endchoice
133
134config TFM_SPM_LOG_LEVEL
135 int
136 default 3 if SPM_LOG_LEVEL_DEBUG
137 default 2 if SPM_LOG_LEVEL_INFO
138 default 1 if SPM_LOG_LEVEL_ERROR
139 default 0 if SPM_LOG_LEVEL_SILENCE
140
Jianliang Shen710cb952022-10-08 11:32:35 +0800141endmenu
Kevin Peng54e31d02023-01-06 18:03:19 +0800142
143######################## Promptless (non-user) config options ##################
144########### Do NOT change the following config options anywhere! ###############
145config CONFIG_TFM_PARTITION_META
146 def_bool n
147
148config TFM_PARTITION_NS_AGENT_MAILBOX
149 bool
150 default y if TFM_MULTI_CORE_TOPOLOGY
151 default n
152
153config TFM_PARTITION_NS_AGENT_TZ
154 bool
155 default y if CONFIG_TFM_USE_TRUSTZONE
156 default n