blob: 79a69934ecb51e2910889b832c6817d8e19cc433 [file] [log] [blame]
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001#!/usr/bin/env python3
2
3""" builtin_configs.py:
4
5 Default configuration files used as reference """
6
7from __future__ import print_function
8
9__copyright__ = """
10/*
Raef Coles61b43a42022-01-12 11:42:57 +000011 * Copyright (c) 2018-2022, Arm Limited. All rights reserved.
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010012 *
13 * SPDX-License-Identifier: BSD-3-Clause
14 *
15 */
16 """
Karl Zhang08681e62020-10-30 13:56:03 +080017
18__author__ = "tf-m@lists.trustedfirmware.org"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010019__project__ = "Trusted Firmware-M Open CI"
Xinyu Zhang06286a92021-07-22 14:00:51 +080020__version__ = "1.4.0"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010021
Paul Sokolovsky3e8fce02022-04-07 01:23:30 +030022from copy import deepcopy
23
24
Minos Galanakisea421232019-06-20 17:11:28 +010025# common parameters for tf-m build system
26# This configuration template will be passed into the tfm-builder module after
27# the template evaluation is converted to a command
28
29_common_tfm_builder_cfg = {
30 "config_type": "tf-m",
31 "codebase_root_dir": "tf-m",
32 # Order to which the variants are evaluated. This affects the name of
33 # variant configuration and the wildcard replacement logic in invalid
34 # configuration tuples
Xinyu Zhangb708f572020-09-15 11:43:46 +080035 "sort_order": ["tfm_platform",
Xinyu Zhang433771e2022-04-01 16:49:17 +080036 "compiler",
Xinyu Zhang73ed2992021-09-15 11:38:23 +080037 "lib_model",
Xinyu Zhangb708f572020-09-15 11:43:46 +080038 "isolation_level",
39 "test_regression",
40 "test_psa_api",
Minos Galanakisea421232019-06-20 17:11:28 +010041 "cmake_build_type",
Xinyu Zhangb708f572020-09-15 11:43:46 +080042 "with_otp",
43 "with_bl2",
44 "with_ns",
Xinyu Zhang9fd74242020-10-22 11:30:50 +080045 "profile",
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +080046 "partition_ps",
Xinyu Zhangfd2e1152021-12-17 18:09:01 +080047 "extra_params"],
Minos Galanakisea421232019-06-20 17:11:28 +010048
49 # Keys for the templace will come from the combinations of parameters
50 # provided in the seed dictionary.
51
Xinyu Zhangf3e19482022-01-11 15:48:13 +080052 "config_template": "cmake -G Ninja " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080053 "-DTFM_PLATFORM=%(tfm_platform)s " + \
Xinyu Zhang433771e2022-04-01 16:49:17 +080054 "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(compiler)s " + \
Xinyu Zhang73ed2992021-09-15 11:38:23 +080055 "-DTFM_LIB_MODEL=%(lib_model)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080056 "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
57 "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
Raef Coles61b43a42022-01-12 11:42:57 +000058 "-DTEST_BL2=%(test_regression)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080059 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080060 "-DTEST_PSA_API=%(test_psa_api)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080061 "-DBL2=%(with_bl2)s " + \
62 "-DNS=%(with_ns)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080063 "-DTFM_PROFILE=%(profile)s " + \
64 "-DCRYPTO_HW_ACCELERATOR_OTP_STATE=%(with_otp)s " + \
65 "-DTFM_PARTITION_PROTECTED_STORAGE=%(partition_ps)s " + \
66 "%(extra_params)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080067 "-DTFM_TEST_REPO_PATH=%(codebase_root_dir)s/../tf-m-tests " + \
68 "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
69 "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
70 "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080071 "%(codebase_root_dir)s",
Karl Zhangaff558a2020-05-15 14:28:23 +010072
Xinyu Zhang433771e2022-04-01 16:49:17 +080073 "set_compiler_path": "export PATH=$PATH:$%(compiler)s_PATH",
74
Minos Galanakisea421232019-06-20 17:11:28 +010075 # A small subset of string substitution params is allowed in commands.
76 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
77 # _tbm_target_platform_ with the paths set when building
78
Xinyu Zhangb708f572020-09-15 11:43:46 +080079 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/bin'
Minos Galanakisea421232019-06-20 17:11:28 +010080 r'/(\w+\.(?:axf|bin|hex))$'),
81
82 # ALL commands will be executed for every build.
83 # Other keys will append extra commands when matching target_platform
Fathi Boudra83e4f292020-12-04 22:33:40 +010084 "build_cmds": {"all": ["cmake --build ./ -- install"],
Summer Qin3c2b5722021-05-26 10:43:45 +080085 "arm/musca_b1/sse_200": [("srec_cat "
Mark Horvath8d281cd2020-12-07 15:20:26 +010086 "%(_tbm_build_dir_)s/bin/"
87 "bl2.bin "
88 "-Binary -offset 0xA000000 "
89 "-fill 0xFF 0xA000000 0xA020000 "
90 "%(_tbm_build_dir_)s/bin/"
91 "tfm_s_ns_signed.bin "
92 "-Binary -offset 0xA020000 "
93 "-fill 0xFF 0xA020000 0xA200000 "
94 "-o %(_tbm_build_dir_)s/bin/"
95 "tfm.hex -Intel")],
Summer Qin3c2b5722021-05-26 10:43:45 +080096 "arm/musca_s1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080097 "%(_tbm_build_dir_)s/bin/"
98 "bl2.bin "
Karl Zhangeffed972020-06-30 15:48:01 +080099 "-Binary -offset 0xA000000 "
Raef Coles543aab32020-12-03 11:12:02 +0000100 "-fill 0xFF 0xA000000 0xA020000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +0800101 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800102 "tfm_s_ns_signed.bin "
Raef Coles543aab32020-12-03 11:12:02 +0000103 "-Binary -offset 0xA020000 "
104 "-fill 0xFF 0xA020000 0xA200000 "
105 "-o %(_tbm_build_dir_)s/bin/"
Arthur She19c0e1a2021-06-02 11:06:19 -0700106 "tfm.hex -Intel")],
107 "stm/stm32l562e_dk": [("echo 'STM32L562E-DK board post process';"
108 "%(_tbm_build_dir_)s/postbuild.sh;"
109 "pushd %(_tbm_build_dir_)s;"
Arthur She07c91b52021-07-15 15:03:10 -0700110 "BIN_FILES=$(grep -o '\/.*\.bin' TFM_UPDATE.sh | sed 's/^/bin/');"
111 "tar jcf ./bin/stm32l562e-dk-tfm.tar.bz2 regression.sh TFM_UPDATE.sh ${BIN_FILES};"
Arthur She3c0dadd2021-11-18 21:17:48 -0800112 "popd")],
113 "nxp/lpcxpresso55s69": [("echo 'LPCXpresso55S69 board post process\n';"
114 "if [ -f \"%(_tbm_build_dir_)s/bin/bl2.hex\" ]; then FLASH_FILE='flash_bl2_JLink.py'; else FLASH_FILE='flash_JLink.py'; fi;"
115 "pushd %(_tbm_build_dir_)s/../platform/ext/target/nxp/lpcxpresso55s69/scripts;"
116 "LN=$(grep -n 'JLinkExe' ${FLASH_FILE}|awk -F: '{print $1}');"
117 "sed -i \"${LN}s/.*/ print('flash.jlink generated')/\" ${FLASH_FILE};"
118 "python3 ./${FLASH_FILE};"
119 "cd %(_tbm_build_dir_)s/bin;"
120 "BIN_FILES=$(grep loadfile flash.jlink | awk '{print $2}');"
121 "tar jcf lpcxpresso55s69-tfm.tar.bz2 flash.jlink ${BIN_FILES};"
Arthur She87602dc2022-02-06 14:42:18 -0800122 "popd")],
123 "cypress/psoc64": [("echo 'Sign binaries for Cypress PSoC64 platform';"
124 "pushd %(_tbm_build_dir_)s/..;"
125 "sudo /usr/local/bin/cysecuretools "
126 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
127 "--target cy8ckit-064s0s2-4343w "
128 "sign-image "
129 "--hex %(_tbm_build_dir_)s/bin/tfm_s.hex "
130 "--image-type BOOT --image-id 1;"
131 "sudo /usr/local/bin/cysecuretools "
132 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
133 "--target cy8ckit-064s0s2-4343w "
134 "sign-image "
135 "--hex %(_tbm_build_dir_)s/bin/tfm_ns.hex "
136 "--image-type BOOT --image-id 16;"
137 "mv %(_tbm_build_dir_)s/bin/tfm_s.hex %(_tbm_build_dir_)s/bin/tfm_s_signed.hex;"
138 "mv %(_tbm_build_dir_)s/bin/tfm_ns.hex %(_tbm_build_dir_)s/bin/tfm_ns_signed.hex;"
139 "popd")]
Minos Galanakisea421232019-06-20 17:11:28 +0100140 },
141
142 # (Optional) If set will fail if those artefacts are missing post build
143 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800144 "%(_tbm_build_dir_)s/bin/"
145 "tfm_s.bin",
146 "%(_tbm_build_dir_)s/bin/"
147 "tfm_ns.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800148 "arm/musca_b1/sse_200": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800149 "%(_tbm_build_dir_)s/bin/"
150 "tfm.hex",
151 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800152 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800153 "%(_tbm_build_dir_)s/bin/"
154 "tfm_sign.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800155 "arm/musca_s1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800156 "%(_tbm_build_dir_)s/bin/"
157 "tfm.hex",
158 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800159 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800160 "%(_tbm_build_dir_)s/bin/"
161 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100162 }
163}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100164
Xinyu Zhangb708f572020-09-15 11:43:46 +0800165# List of all build configs that are impossible under all circumstances
166_common_tfm_invalid_configs = [
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800167 # GCC defect
168 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang459a1982021-07-21 22:34:49 +0800169 # LR_CODE size exceeds limit on MUSCA_B1 & MUSCA_S1 with regression tests in Debug mode built with ARMCLANG
Xinyu Zhang433771e2022-04-01 16:49:17 +0800170 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*", "*"),
171 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*", "*"),
Karl Zhangc858a722021-03-22 21:38:19 +0800172 # Load range overlap on Musca for IPC Debug type: T895
Xinyu Zhang433771e2022-04-01 16:49:17 +0800173 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*", "*"),
174 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800175 # LVL2 and LVL3 requires IPC model
Feder Liang357b1602022-01-11 16:47:49 +0800176 ("*", "*", True, "2", "*", "*", "*", "*", "*", "*", "*", "*", "*"),
177 ("*", "*", True, "3", "*", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800178 # Regression requires NS
Feder Liang357b1602022-01-11 16:47:49 +0800179 ("*", "*", "*", "*", True, "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800180 # Musca requires BL2
Feder Liang357b1602022-01-11 16:47:49 +0800181 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*", "*"),
182 ("arm/musca_s1", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800183 # Only AN521 and MUSCA_B1 support Isolation Level 3
Feder Liang357b1602022-01-11 16:47:49 +0800184 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*", "*"),
185 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*", "*"),
186 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800187 ]
188
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100189# Configure build manager to build several combinations
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800190# Config group for per-patch job
191config_pp_test = {"seed_params": {
192 # AN519_ARMCLANG_IPC_1_REG_Debug_BL2_NS
193 "tfm_platform": ["arm/mps2/an519"],
194 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800195 "lib_model": [False],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800196 "isolation_level": ["1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800197 "test_regression": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800198 "test_psa_api": ["OFF"],
199 "cmake_build_type": ["Debug"],
200 "with_otp": ["off"],
201 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800202 "with_ns": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800203 "profile": [""],
204 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800205 "extra_params": [""]
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800206 },
207 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800208 "valid": [
209 # AN519_ARMCLANG_IPC_2_REG_Release_BL2_NS
210 ("arm/mps2/an519", "ARMCLANG_6_13", False, "2", True,
211 "OFF", "Release", "off", True, True, "", "ON", ""),
212 # AN519_GCC_IPC_1_REG_Debug_BL2_NS
213 ("arm/mps2/an519", "GCC_7_3_1", False, "1", True,
214 "OFF", "Debug", "off", True, True, "", "ON", ""),
215 # AN519_GCC_IPC_2_REG_Release_BL2_NS
216 ("arm/mps2/an519", "GCC_7_3_1", False, "2", True,
217 "OFF", "Release", "off", True, True, "", "ON", ""),
218 # AN519_GCC_LIB_1_REG_Debug_BL2_NS
219 ("arm/mps2/an519", "GCC_7_3_1", True, "1", True,
220 "OFF", "Debug", "off", True, True, "", "ON", ""),
221 # AN521_ARMCLANG_IPC_1_REG_Debug_BL2_NS
222 ("arm/mps2/an521", "ARMCLANG_6_13", False, "1", True,
223 "OFF", "Debug", "off", True, True, "", "ON", ""),
224 # AN521_ARMCLANG_IPC_2_Debug_BL2_NS
225 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2", False,
226 "OFF", "Debug", "off", True, True, "", "ON", ""),
227 # AN521_ARMCLANG_IPC_2_REG_Release_BL2_NS
228 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2", True,
229 "OFF", "Release", "off", True, True, "", "ON", ""),
230 # AN521_ARMCLANG_IPC_3_REG_Minsizerel_BL2_NS
231 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3", True,
232 "OFF", "Minsizerel", "off", True, True, "", "ON", ""),
233 # AN521_ARMCLANG_IPC_3_Release_BL2_NS
234 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3", False,
235 "OFF", "Release", "off", True, True, "", "ON", ""),
236 # AN521_GCC_IPC_1_REG_Debug_BL2_NS
237 ("arm/mps2/an521", "GCC_7_3_1", False, "1", True,
238 "OFF", "Debug", "off", True, True, "", "ON", ""),
239 # AN521_GCC_IPC_2_Debug_BL2_NS_MEDIUM
240 ("arm/mps2/an521", "GCC_7_3_1", False, "2", False, "OFF",
241 "Debug", "off", True, True, "profile_medium", "ON", ""),
242 # AN521_GCC_IPC_2_REG_Release_BL2_NS
243 ("arm/mps2/an521", "GCC_7_3_1", False, "2", True,
244 "OFF", "Release", "off", True, True, "", "ON", ""),
245 # AN521_GCC_IPC_3_Debug_BL2_NS_LARGE
246 ("arm/mps2/an521", "GCC_7_3_1", False, "3", False, "OFF",
247 "Debug", "off", True, True, "profile_large", "ON", ""),
248 # AN521_GCC_IPC_3_REG_Minsizerel_BL2_NS
249 ("arm/mps2/an521", "GCC_7_3_1", False, "3", True,
250 "OFF", "Minsizerel", "off", True, True, "", "ON", ""),
251 # AN521_GCC_LIB_1_Debug_BL2_NS
252 ("arm/mps2/an521", "GCC_7_3_1", True, "1", False,
253 "OFF", "Debug", "off", True, True, "", "ON", ""),
254 # AN521_GCC_LIB_1_REG_Debug_BL2_NS
255 ("arm/mps2/an521", "GCC_7_3_1", True, "1", True,
256 "OFF", "Debug", "off", True, True, "", "ON", ""),
257 # AN521_GCC_IPC_2_REG_Release_BL2_NS_MEDIUM_PSOFF
258 ("arm/mps2/an521", "GCC_7_3_1",
259 False, "2", True, "OFF", "Release",
260 "off", True, True, "profile_medium", "OFF", ""),
261 # AN552_GNUARM_IPC_1_REG_Debug_BL2_NS
262 ("arm/mps3/an552", "GCC_10_3", False, "1", True, "OFF",
263 "Debug", "off", True, True, "", "ON", ""),
264 # AN552_GNUARM_IPC_1_REG_Release_BL2_NS
265 ("arm/mps3/an552", "GCC_10_3", False, "1", True, "OFF",
266 "Release", "off", True, True, "", "ON", ""),
267 # MUSCA_B1_GCC_IPC_2_REG_Release_OTP_BL2_NS
268 ("arm/musca_b1/sse_200", "GCC_7_3_1", False, "2", True,
269 "OFF", "Release", "ENABLED", True, True, "", "ON", ""),
270 # MUSCA_B1_GCC_LIB_1_REG_Minsizerel_BL2_NS
271 ("arm/musca_b1/sse_200", "GCC_7_3_1", True, "1", True,
272 "OFF", "Minsizerel", "off", True, True, "", "ON", ""),
273 # MUSCA_S1_ARMCLANG_IPC_2_REG_Release_BL2_NS
274 ("arm/musca_s1", "ARMCLANG_6_13", False, "2", True, "OFF",
275 "Release", "off", True, True, "", "ON", ""),
276 # MUSCA_S1_GCC_IPC_1_REG_Debug_BL2_NS
277 ("arm/musca_s1", "GCC_10_3", False, "1", True, "OFF",
278 "Debug", "off", True, True, "", "ON", ""),
279 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_NS
280 ("arm/musca_s1", "GCC_10_3", False, "2", True, "OFF",
281 "Release", "off", True, True, "", "ON", ""),
282 # MUSCA_S1_GCC_LIB_1_REG_Debug_BL2_NS
283 ("arm/musca_s1", "GCC_10_3", True, "1", True, "OFF",
284 "Debug", "off", True, True, "", "ON", ""),
285 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_NS_FPHARD
286 ("arm/musca_s1", "GCC_10_3", False, "2", True, "OFF",
287 "Release", "off", True, True, "", "ON", "FPHARD"),
288 # MUSCA_S1_GCC_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
289 ("arm/musca_s1", "GCC_7_3_1", False, "1", True, "OFF",
290 "Release", "off", True, True, "", "ON", "CC_DRIVER_PSA"),
291 # stm32l562e_dk_ARMCLANG_IPC_1_REG_Release_BL2_NS
292 ("stm/stm32l562e_dk", "ARMCLANG_6_13", False, "1", True,
293 "OFF", "Release", "off", True, True, "", "ON", "CRYPTO_OFF"),
294 # stm32l562e_dk_GCC_IPC_2_REG_Release_BL2_NS
295 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "2", False, "OFF",
296 "Release", "off", True, True, "", "ON", "CRYPTO_ON"),
297 # stm32l562e_dk_GCC_IPC_3_REG_Release_BL2_NS
298 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "3", True, "OFF",
299 "Release", "off", True, True, "", "ON", "CRYPTO_OFF"),
300 # psoc64_GCC_IPC_2_REG_Release_NS
301 ("cypress/psoc64", "GCC_7_3_1", False, "2", True, "OFF",
302 "Release", "off", False, True, "", "ON", ""),
303 ],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800304 "invalid": _common_tfm_invalid_configs + []
305 }
306
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800307# Config group for nightly job
308config_nightly_test = {"seed_params": {
309 "tfm_platform": ["arm/mps2/an519",
310 "arm/mps2/an521",
311 "arm/mps3/an524",
312 "arm/musca_s1",
313 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800314 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800315 "lib_model": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800316 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800317 "test_regression": [True, False],
318 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800319 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800320 "with_otp": ["off"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800321 "with_bl2": [True],
322 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800323 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800324 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800325 "extra_params": [""]
Minos Galanakisea421232019-06-20 17:11:28 +0100326 },
327 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800328 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100329 }
330
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800331# Config group for release job
332config_release_test = {"seed_params": {
333 "tfm_platform": ["arm/mps2/an519",
334 "arm/mps2/an521",
335 "arm/mps3/an524",
336 "arm/musca_b1/sse_200",
337 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800338 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800339 "lib_model": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800340 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800341 "test_regression": [True, False],
342 "test_psa_api": ["OFF"],
343 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800344 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800345 "with_bl2": [True],
346 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800347 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800348 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800349 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800350 },
351 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800352 "valid": [
353 # sanity test for GCC v11.2
354 # AN521_GCC_IPC_3_REG_Relwithdebinfo_BL2_NS
355 ("arm/mps2/an521", "GCC_11_2",
356 False, "3", True, "OFF", "Relwithdebinfo",
357 "off", True, True, "", "ON", ""),
358 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800359 "invalid": _common_tfm_invalid_configs + []
360 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800361
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800362# Config groups for TF-M features
363config_profile_s = {"seed_params": {
David Huda27ae72022-03-28 15:32:19 +0800364 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800365 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
David Huda27ae72022-03-28 15:32:19 +0800366 "lib_model": [True],
367 "isolation_level": ["1"],
368 "test_regression": [True, False],
369 "test_psa_api": ["OFF"],
370 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
371 "with_otp": ["OFF"],
372 "with_bl2": [True],
373 "with_ns": [True],
374 "profile": ["profile_small"],
375 "partition_ps": ["OFF"],
376 "extra_params": [""]
377 },
378 "common_params": _common_tfm_builder_cfg,
379 "valid": [
380 # Profile Small also supports SFN model
381 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*", "*",
382 "*", "SFN_ENABLE")
383 ],
384 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhang433771e2022-04-01 16:49:17 +0800385 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
David Huda27ae72022-03-28 15:32:19 +0800386 "*", "Minsizerel", "*", "*", "*", "*", "*", "*")
387 ]
388 }
389
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800390config_profile_m = {"seed_params": {
391 "tfm_platform": ["arm/mps2/an519",
392 "arm/mps2/an521",
393 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800394 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800395 "lib_model": [False],
396 "isolation_level": ["2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800397 "test_regression": [True, False],
398 "test_psa_api": ["OFF"],
399 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800400 "with_otp": ["off"],
401 "with_bl2": [True],
402 "with_ns": [True],
403 "profile": ["profile_medium"],
404 "partition_ps": ["ON", "OFF"],
405 "extra_params": [""]
406 },
407 "common_params": _common_tfm_builder_cfg,
408 "invalid": _common_tfm_invalid_configs + []
409 }
410
411config_profile_l = {"seed_params": {
412 "tfm_platform": ["arm/mps2/an521"],
413 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
414 "lib_model": [False],
415 "isolation_level": ["3"],
416 "test_regression": [True, False],
417 "test_psa_api": ["OFF"],
418 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
419 "with_otp": ["off"],
420 "with_bl2": [True],
421 "with_ns": [True],
422 "profile": ["profile_large"],
423 "partition_ps": ["ON", "OFF"],
424 "extra_params": [""]
425 },
426 "common_params": _common_tfm_builder_cfg,
427 "invalid": _common_tfm_invalid_configs + []
428 }
429
430config_cc_driver_psa = {"seed_params": {
431 "tfm_platform": ["arm/musca_b1/sse_200",
432 "arm/musca_s1"],
433 "compiler": ["GCC_7_3_1"],
434 "lib_model": [False],
435 "isolation_level": ["1"],
436 "test_regression": [True],
437 "test_psa_api": ["OFF"],
438 "cmake_build_type": ["Release"],
439 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800440 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800441 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800442 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800443 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800444 "extra_params": ["CC_DRIVER_PSA"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800445 },
446 "common_params": _common_tfm_builder_cfg,
447 "invalid": _common_tfm_invalid_configs + []
448 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100449
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800450config_fp = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800451 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800452 "compiler": ["GCC_10_3"],
453 "lib_model": [False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800454 "isolation_level": ["1", "2"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800455 "test_regression": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800456 "test_psa_api": ["OFF"],
457 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800458 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800459 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800460 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800461 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800462 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800463 "extra_params": ["FPSOFT", "FPHARD", "FPHARD_LOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800464 },
465 "common_params": _common_tfm_builder_cfg,
466 "invalid": _common_tfm_invalid_configs + []
467 }
Karl Zhangeffed972020-06-30 15:48:01 +0800468
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800469config_psa_api = {"seed_params": {
470 "tfm_platform": ["arm/mps2/an521",
471 "arm/musca_b1/sse_200",
472 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800473 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800474 "lib_model": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800475 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800476 "test_regression": [False],
477 "test_psa_api": ["IPC",
478 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800479 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800480 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800481 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800482 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800483 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800484 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800485 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800486 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800487 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800488 },
489 "common_params": _common_tfm_builder_cfg,
490 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800491 # FF does not support library model
492 ("*", "*", True, "*", "*", "IPC", "*",
Feder Liang357b1602022-01-11 16:47:49 +0800493 "*", "*", "*", "*", "*", "*"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800494 # FF does not support L3
495 ("*", "*", "*", "3", "*", "IPC", "*",
Feder Liang357b1602022-01-11 16:47:49 +0800496 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800497 ]
498 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800499
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800500config_otp = {"seed_params": {
501 "tfm_platform": ["arm/musca_b1/sse_200"],
502 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
503 "lib_model": [True, False],
504 "isolation_level": ["1", "2", "3"],
505 "test_regression": [True],
506 "test_psa_api": ["OFF"],
507 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
508 "with_otp": ["ENABLED"],
509 "with_bl2": [True],
510 "with_ns": [True],
511 "profile": [""],
512 "partition_ps": ["ON"],
513 "extra_params": [""]
514 },
515 "common_params": _common_tfm_builder_cfg,
516 "invalid": _common_tfm_invalid_configs + []
517 }
518
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800519config_nsce = {"seed_params": {
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800520 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800521 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800522 "lib_model": [True, False],
523 "isolation_level": ["1", "2", "3"],
524 "test_regression": [True],
525 "test_psa_api": ["OFF"],
526 "cmake_build_type": ["Debug"],
527 "with_otp": ["off"],
528 "with_bl2": [True],
529 "with_ns": [True],
530 "profile": [""],
531 "partition_ps": ["ON"],
Xinyu Zhang67612992021-12-20 14:11:27 +0800532 "extra_params": ["NSCE"]
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800533 },
534 "common_params": _common_tfm_builder_cfg,
535 "invalid": _common_tfm_invalid_configs + []
536 }
537
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800538config_mmio = {"seed_params": {
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800539 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800540 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800541 "lib_model": [False],
542 "isolation_level": ["1"],
543 "test_regression": [True],
544 "test_psa_api": ["OFF"],
545 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
546 "with_otp": ["off"],
547 "with_bl2": [True],
548 "with_ns": [True],
549 "profile": [""],
550 "partition_ps": ["ON"],
Xinyu Zhang3bb01af2021-12-20 14:45:49 +0800551 "extra_params": ["MMIO"]
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800552 },
553 "common_params": _common_tfm_builder_cfg,
554 "invalid": _common_tfm_invalid_configs + []
555 }
556
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800557# Config groups for code coverage
558config_cov_profile_s = deepcopy(config_profile_s)
559config_cov_profile_s["seed_params"]["compiler"] = ["GCC_7_3_1"]
Xinyu Zhangbdc37e32022-04-06 17:47:44 +0800560
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800561config_cov_profile_m = deepcopy(config_profile_m)
562config_cov_profile_m["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800563
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800564config_cov_profile_l = deepcopy(config_profile_l)
565config_cov_profile_l["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800566
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800567config_cov_nsce = deepcopy(config_nsce)
568config_cov_nsce["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800569
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800570config_cov_mmio = deepcopy(config_mmio)
571config_cov_mmio["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800572
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800573# Config groups for platforms
574config_an519 = {"seed_params": {
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800575 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800576 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800577 "lib_model": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800578 "isolation_level": ["1", "2"],
579 "test_regression": [True, False],
580 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800581 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800582 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800583 "with_bl2": [True, False],
584 "with_ns": [True, False],
585 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800586 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800587 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800588 },
589 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800590 "invalid": _common_tfm_invalid_configs + []
591 }
592
593config_an521 = {"seed_params": {
594 "tfm_platform": ["arm/mps2/an521"],
595 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
596 "lib_model": [True, False],
597 "isolation_level": ["1", "2", "3"],
598 "test_regression": [True, False],
599 "test_psa_api": ["OFF"],
600 "cmake_build_type": ["Debug", "Release"],
601 "with_otp": ["off"],
602 "with_bl2": [True, False],
603 "with_ns": [True, False],
604 "profile": [""],
605 "partition_ps": ["ON"],
606 "extra_params": [""]
607 },
608 "common_params": _common_tfm_builder_cfg,
609 "invalid": _common_tfm_invalid_configs + []
610 }
611
612config_an524 = {"seed_params": {
613 "tfm_platform": ["arm/mps3/an524"],
614 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
615 "lib_model": [True, False],
616 "isolation_level": ["1", "2"],
617 "test_regression": [True, False],
618 "test_psa_api": ["OFF"],
619 "cmake_build_type": ["Debug", "Release"],
620 "with_otp": ["off"],
621 "with_bl2": [True, False],
622 "with_ns": [True, False],
623 "profile": [""],
624 "partition_ps": ["ON"],
625 "extra_params": [""]
626 },
627 "common_params": _common_tfm_builder_cfg,
628 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800629 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000630
Xinyu Zhang38b76742021-11-11 13:57:56 +0800631config_an547 = {"seed_params": {
632 "tfm_platform": ["arm/mps3/an547"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100633 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800634 "lib_model": [False],
635 "isolation_level": ["1"],
636 "test_regression": [False],
637 "test_psa_api": ["OFF"],
638 "cmake_build_type": ["Debug"],
639 "with_otp": ["off"],
640 "with_bl2": [True],
641 "with_ns": [False],
642 "profile": [""],
643 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800644 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800645 },
646 "common_params": _common_tfm_builder_cfg,
647 "invalid": _common_tfm_invalid_configs + []
648 }
649
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800650config_an552 = {"seed_params": {
651 "tfm_platform": ["arm/mps3/an552"],
652 "compiler": ["GCC_10_3"],
653 "lib_model": [True, False],
654 "isolation_level": ["1", "2"],
655 "test_regression": [True, False],
656 "test_psa_api": ["OFF"],
657 "cmake_build_type": ["Debug", "Release"],
658 "with_otp": ["off"],
659 "with_bl2": [True],
660 "with_ns": [True],
661 "profile": [""],
662 "partition_ps": ["ON"],
663 "extra_params": [""]
664 },
665 "common_params": _common_tfm_builder_cfg,
666 "invalid": _common_tfm_invalid_configs + []
667 }
668
669config_musca_b1 = {"seed_params": {
670 "tfm_platform": ["arm/musca_b1/sse_200"],
671 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
672 "lib_model": [True, False],
673 "isolation_level": ["1", "2", "3"],
674 "test_regression": [True, False],
675 "test_psa_api": ["OFF"],
676 "cmake_build_type": ["Debug", "Release"],
677 "with_otp": ["off"],
678 "with_bl2": [True],
679 "with_ns": [True, False],
680 "profile": [""],
681 "partition_ps": ["ON"],
682 "extra_params": [""]
683 },
684 "common_params": _common_tfm_builder_cfg,
685 "invalid": _common_tfm_invalid_configs + []
686 }
687
688config_musca_b1_se = {"seed_params": {
689 "tfm_platform": ["arm/musca_b1/secure_enclave"],
690 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
691 "lib_model": [False],
692 "isolation_level": ["1"],
693 "test_regression": [False],
694 "test_psa_api": ["OFF"],
695 "cmake_build_type": ["Debug", "Release"],
696 "with_otp": ["off"],
697 "with_bl2": [True],
698 "with_ns": [False],
699 "profile": [""],
700 "partition_ps": ["ON"],
701 "extra_params": [""]
702 },
703 "common_params": _common_tfm_builder_cfg,
704 "invalid": _common_tfm_invalid_configs + []
705 }
706
707config_musca_s1 = {"seed_params": {
708 "tfm_platform": ["arm/musca_s1"],
709 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
710 "lib_model": [True, False],
711 "isolation_level": ["1", "2"],
712 "test_regression": [True, False],
713 "test_psa_api": ["OFF"],
714 "cmake_build_type": ["Debug", "Release"],
715 "with_otp": ["off"],
716 "with_bl2": [True],
717 "with_ns": [True, False],
718 "profile": [""],
719 "partition_ps": ["ON"],
720 "extra_params": [""]
721 },
722 "common_params": _common_tfm_builder_cfg,
723 "invalid": _common_tfm_invalid_configs + []
724 }
725
Xinyu Zhang38b76742021-11-11 13:57:56 +0800726config_corstone_polaris = {"seed_params": {
727 "tfm_platform": ["arm/mps3/corstone_polaris"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100728 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800729 "lib_model": [False],
730 "isolation_level": ["1"],
731 "test_regression": [False],
732 "test_psa_api": ["OFF"],
733 "cmake_build_type": ["Debug"],
734 "with_otp": ["off"],
735 "with_bl2": [True],
736 "with_ns": [False],
737 "profile": [""],
738 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800739 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800740 },
741 "common_params": _common_tfm_builder_cfg,
742 "invalid": _common_tfm_invalid_configs + []
743 }
744
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800745config_psoc64 = {"seed_params": {
746 "tfm_platform": ["cypress/psoc64"],
747 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
748 "lib_model": [False],
749 "isolation_level": ["1", "2"],
750 "test_regression": [True],
751 "test_psa_api": ["OFF"],
752 "cmake_build_type": ["Release"],
753 "with_otp": ["off"],
754 "with_bl2": [False],
755 "with_ns": [True],
756 "profile": [""],
757 "partition_ps": ["ON"],
758 "extra_params": [""]
759 },
760 "common_params": _common_tfm_builder_cfg,
761 "invalid": _common_tfm_invalid_configs + []
762 }
763
764config_corstone1000 = {"seed_params": {
765 "tfm_platform": ["arm/corstone1000"],
766 "compiler": ["GCC_7_3_1"],
767 "lib_model": [False],
768 "isolation_level": ["1"],
769 "test_regression": [False],
770 "test_psa_api": ["OFF"],
771 "cmake_build_type": ["Debug"],
772 "with_otp": ["off"],
773 "with_bl2": [True],
774 "with_ns": [False],
775 "profile": [""],
776 "partition_ps": ["ON"],
777 "extra_params": ["FVP", "FPGA"]
778 },
779 "common_params": _common_tfm_builder_cfg,
780 "invalid": _common_tfm_invalid_configs + []
781 }
782
783config_stm32l562e_dk = {"seed_params": {
784 "tfm_platform": ["stm/stm32l562e_dk"],
785 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
786 "lib_model": [True, False],
787 "isolation_level": ["1", "2", "3"],
788 "test_regression": [True, False],
789 "test_psa_api": ["OFF"],
790 "cmake_build_type": ["Release"],
791 "with_otp": ["off"],
792 "with_bl2": [True],
793 "with_ns": [True],
794 "profile": [""],
795 "partition_ps": ["ON"],
796 "extra_params": ["CRYPTO_OFF", "CRYPTO_ON"]
797 },
798 "common_params": _common_tfm_builder_cfg,
799 "invalid": _common_tfm_invalid_configs + [
800 # Oversize issue on config stm32l562e_dk_ARMCLANG_LIB_1_REG_Release_BL2_NS
801 ("stm/stm32l562e_dk", "ARMCLANG_6_13", True, "1", True,
802 "OFF", "Release", "off", True, True, "", "ON", "*"),
803 # all other tests are off when CRYPTO is ON
804 ("stm/stm32l562e_dk", "*", "*", "*", True, "*", "*", "*",
805 "*", "*", "*", "*", "CRYPTO_ON"),
806 # all other tests are ON when CRYPTO is OFF
807 ("stm/stm32l562e_dk", "*", "*", "*", False, "*", "*", "*",
808 "*", "*", "*", "*", "CRYPTO_OFF"),
809 ]
810 }
811
812config_b_u585i_iot02a = {"seed_params": {
813 "tfm_platform": ["stm/b_u585i_iot02a"],
814 "compiler": ["GCC_7_3_1"],
815 "lib_model": [False],
816 "isolation_level": ["1"],
817 "test_regression": [False],
818 "test_psa_api": ["OFF"],
819 "cmake_build_type": ["Release"],
820 "with_otp": ["off"],
821 "with_bl2": [True],
822 "with_ns": [False],
823 "profile": [""],
824 "partition_ps": ["ON"],
825 "extra_params": [""]
826 },
827 "common_params": _common_tfm_builder_cfg,
828 "invalid": _common_tfm_invalid_configs + []
829 }
830
831config_nucleo_l552ze_q = {"seed_params": {
832 "tfm_platform": ["stm/nucleo_l552ze_q"],
833 "compiler": ["GCC_7_3_1"],
834 "lib_model": [False],
835 "isolation_level": ["1"],
836 "test_regression": [False],
837 "test_psa_api": ["OFF"],
838 "cmake_build_type": ["Release"],
839 "with_otp": ["off"],
840 "with_bl2": [True],
841 "with_ns": [False],
842 "profile": [""],
843 "partition_ps": ["ON"],
844 "extra_params": [""]
845 },
846 "common_params": _common_tfm_builder_cfg,
847 "invalid": _common_tfm_invalid_configs + []
848 }
849
850config_lpcxpresso55s69 = {"seed_params": {
851 "tfm_platform": ["nxp/lpcxpresso55s69"],
852 "compiler": ["GCC_7_3_1"],
853 "lib_model": [False],
854 "isolation_level": ["2"],
855 "test_regression": [True, False],
856 "test_psa_api": ["OFF"],
857 "cmake_build_type": ["Relwithdebinfo"],
858 "with_otp": ["off"],
859 "with_bl2": [False],
860 "with_ns": [True],
861 "profile": ["profile_medium"],
862 "partition_ps": ["ON"],
863 "extra_params": [""]
864 },
865 "common_params": _common_tfm_builder_cfg,
866 "invalid": _common_tfm_invalid_configs + []
867 }
868
Xinyu Zhang38b76742021-11-11 13:57:56 +0800869config_bl5340 = {"seed_params": {
870 "tfm_platform": ["lairdconnectivity/bl5340_dvk_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800871 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800872 "lib_model": [False],
873 "isolation_level": ["1"],
874 "test_regression": [False],
875 "test_psa_api": ["OFF"],
876 "cmake_build_type": ["Debug"],
877 "with_otp": ["off"],
878 "with_bl2": [True],
879 "with_ns": [False],
880 "profile": [""],
881 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800882 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800883 },
884 "common_params": _common_tfm_builder_cfg,
885 "invalid": _common_tfm_invalid_configs + []
886 }
887
888config_nrf5340dk = {"seed_params": {
889 "tfm_platform": ["nordic_nrf/nrf5340dk_nrf5340_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800890 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800891 "lib_model": [False],
892 "isolation_level": ["1"],
893 "test_regression": [False],
894 "test_psa_api": ["OFF"],
895 "cmake_build_type": ["Debug"],
896 "with_otp": ["off"],
897 "with_bl2": [True],
898 "with_ns": [False],
899 "profile": [""],
900 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800901 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800902 },
903 "common_params": _common_tfm_builder_cfg,
904 "invalid": _common_tfm_invalid_configs + []
905 }
906
907config_nrf9160dk = {"seed_params": {
908 "tfm_platform": ["nordic_nrf/nrf9160dk_nrf9160"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800909 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800910 "lib_model": [False],
911 "isolation_level": ["1"],
912 "test_regression": [False],
913 "test_psa_api": ["OFF"],
914 "cmake_build_type": ["Debug"],
915 "with_otp": ["off"],
916 "with_bl2": [True],
917 "with_ns": [False],
918 "profile": [""],
919 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800920 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800921 },
922 "common_params": _common_tfm_builder_cfg,
923 "invalid": _common_tfm_invalid_configs + []
924 }
925
926config_m2351 = {"seed_params": {
927 "tfm_platform": ["nuvoton/m2351"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800928 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800929 "lib_model": [False],
930 "isolation_level": ["1"],
931 "test_regression": [False],
932 "test_psa_api": ["OFF"],
933 "cmake_build_type": ["Release"],
934 "with_otp": ["off"],
935 "with_bl2": [True],
936 "with_ns": [False],
937 "profile": [""],
938 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800939 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800940 },
941 "common_params": _common_tfm_builder_cfg,
942 "invalid": _common_tfm_invalid_configs + []
943 }
944
945config_m2354 = {"seed_params": {
946 "tfm_platform": ["nuvoton/m2354"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800947 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800948 "lib_model": [False],
949 "isolation_level": ["1"],
950 "test_regression": [False],
951 "test_psa_api": ["OFF"],
952 "cmake_build_type": ["Debug"],
953 "with_otp": ["off"],
954 "with_bl2": [True],
955 "with_ns": [False],
956 "profile": [""],
957 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800958 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800959 },
960 "common_params": _common_tfm_builder_cfg,
961 "invalid": _common_tfm_invalid_configs + []
962 }
963
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800964# Config groups for debug
965config_debug = {"seed_params": {
966 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800967 "compiler": ["GCC_7_3_1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800968 "lib_model": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800969 "isolation_level": ["1"],
970 "test_regression": [False],
971 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800972 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800973 "with_otp": ["off"],
974 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800975 "with_ns": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800976 "profile": [""],
977 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800978 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800979 },
980 "common_params": _common_tfm_builder_cfg,
981 "invalid": _common_tfm_invalid_configs + []
982 }
983
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800984config_debug_regr = deepcopy(config_debug)
985config_debug_regr["seed_params"]["test_regression"] = [True]
986
987config_debug_PSA_API = {"seed_params": {
988 "tfm_platform": ["arm/mps2/an521"],
989 "compiler": ["ARMCLANG_6_13"],
990 "lib_model": [True],
991 "isolation_level": ["1"],
992 "test_regression": [False],
993 "test_psa_api": ["CRYPTO",
994 "INITIAL_ATTESTATION",
995 "STORAGE",
996 "IPC"],
997 "cmake_build_type": ["Debug"],
998 "with_otp": ["off"],
999 "with_bl2": [True],
1000 "with_ns": [True],
1001 "profile": [""],
1002 "partition_ps": ["ON"],
1003 "extra_params": [""]
1004 },
1005 "common_params": _common_tfm_builder_cfg,
1006 "invalid": _common_tfm_invalid_configs + []
1007 }
1008
1009config_debug_PSA_API_nolib = {"seed_params": {
1010 "tfm_platform": ["arm/mps2/an521"],
1011 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang38b76742021-11-11 13:57:56 +08001012 "lib_model": [False],
1013 "isolation_level": ["1"],
1014 "test_regression": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001015 "test_psa_api": ["CRYPTO",
1016 "INITIAL_ATTESTATION",
1017 "STORAGE",
1018 "IPC"],
1019 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +08001020 "with_otp": ["off"],
1021 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001022 "with_ns": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +08001023 "profile": [""],
1024 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +08001025 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +08001026 },
1027 "common_params": _common_tfm_builder_cfg,
1028 "invalid": _common_tfm_invalid_configs + []
1029 }
1030
Karl Zhangaff558a2020-05-15 14:28:23 +01001031_builtin_configs = {
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001032 # per-patch test groups
1033 "pp_test": config_pp_test,
1034 "pp_corstone1000": config_corstone1000,
Karl Zhang14573bc2020-06-08 09:23:21 +08001035
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001036 # nightly test groups
1037 "nightly_test": config_nightly_test,
1038 "nightly_profile_s": config_profile_s,
1039 "nightly_profile_m": config_profile_m,
1040 "nightly_profile_l": config_profile_l,
1041 "nightly_cc_driver_psa": config_cc_driver_psa,
1042 "nightly_fp":config_fp,
1043 "nightly_psa_api": config_psa_api,
1044 "nightly_otp": config_otp,
Xinyu Zhang050e39a2021-11-16 14:38:15 +08001045 "nightly_nsce": config_nsce,
1046 "nightly_mmio": config_mmio,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001047 "nightly_an547": config_an547,
1048 "nightly_an552": config_an552,
1049 "nightly_musca_b1_se": config_musca_b1_se,
1050 "nightly_polaris": config_corstone_polaris,
1051 "nightly_corstone1000": config_corstone1000,
1052 "nightly_psoc64": config_psoc64,
1053 "nightly_stm32l562e_dk": config_stm32l562e_dk,
1054 "nightly_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +08001055
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001056 # release test groups
1057 "release_test": config_release_test,
1058 "release_profile_s": config_profile_s,
1059 "release_profile_m": config_profile_m,
1060 "release_profile_l": config_profile_l,
1061 "release_cc_driver_psa": config_cc_driver_psa,
1062 "release_fp": config_fp,
1063 "release_psa_api": config_psa_api,
1064 "release_otp": config_otp,
1065 "release_nsce": config_nsce,
1066 "release_mmio": config_mmio,
1067 "release_an547": config_an547,
1068 "release_an552": config_an552,
1069 "release_polaris": config_corstone_polaris,
1070 "release_psoc64": config_psoc64,
1071 "release_stm32l562e_dk": config_stm32l562e_dk,
1072 "release_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +08001073
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001074 # code coverage test groups
1075 "coverage_profile_s": config_cov_profile_s,
1076 "coverage_profile_m": config_cov_profile_m,
1077 "coverage_profile_l": config_cov_profile_l,
1078 "coverage_nsce": config_cov_nsce,
1079 "coverage_mmio": config_cov_mmio,
1080 "coverage_fp": config_fp,
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001081
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001082 # platform groups
1083 "an521": config_an521,
1084 "an519": config_an519,
1085 "an524": config_an524,
1086 "an547": config_an547,
1087 "an552": config_an552,
1088 "musca_b1": config_musca_b1,
1089 "musca_b1_se": config_musca_b1_se,
1090 "musca_s1": config_musca_s1,
1091 "corstone_polaris": config_corstone_polaris,
1092 "cypress_psoc64": config_psoc64,
1093 "corstone1000": config_corstone1000,
1094 "stm_stm32l562e_dk": config_stm32l562e_dk,
1095 "stm_b_u585i_iot02a": config_b_u585i_iot02a,
1096 "stm_nucleo_l552ze_q": config_nucleo_l552ze_q,
1097 "nxp_lpcxpresso55s69": config_lpcxpresso55s69,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001098 "laird_bl5340": config_bl5340,
1099 "nordic_nrf5340dk": config_nrf5340dk,
1100 "nordic_nrf9160dk": config_nrf9160dk,
1101 "nuvoton_m2351": config_m2351,
1102 "nuvoton_m2354": config_m2354,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001103
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001104 # config groups for debug
Dean Birch4c6ad622020-03-13 11:28:03 +00001105 "debug": config_debug,
Paul Sokolovsky6c3c6562022-04-04 23:23:02 +03001106 "debug_regr": config_debug_regr,
Paul Sokolovsky1ec752b2022-01-22 19:50:58 +03001107 "debug_PSA_API": config_debug_PSA_API,
Paul Sokolovsky49a99282022-02-02 23:43:37 +03001108 "debug_PSA_API_nolib": config_debug_PSA_API_nolib,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001109 }
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001110
1111if __name__ == '__main__':
1112 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001113
Minos Galanakisea421232019-06-20 17:11:28 +01001114 # Default behavior is to export refference config when called
1115 _dir = os.getcwd()
1116 from utils import save_json
1117 for _cname, _cfg in _builtin_configs.items():
1118 _fname = os.path.join(_dir, _cname + ".json")
1119 print("Exporting config %s" % _fname)
1120 save_json(_fname, _cfg)