blob: 12db50c8fb06ea73905cf16d2c27169bb392e43f [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_bl2",
Xinyu Zhang9fd74242020-10-22 11:30:50 +080043 "profile",
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +080044 "partition_ps",
Xinyu Zhangfd2e1152021-12-17 18:09:01 +080045 "extra_params"],
Minos Galanakisea421232019-06-20 17:11:28 +010046
47 # Keys for the templace will come from the combinations of parameters
48 # provided in the seed dictionary.
49
Xinyu Zhangf3e19482022-01-11 15:48:13 +080050 "config_template": "cmake -G Ninja " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080051 "-DTFM_PLATFORM=%(tfm_platform)s " + \
Xinyu Zhang433771e2022-04-01 16:49:17 +080052 "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(compiler)s " + \
Xinyu Zhang73ed2992021-09-15 11:38:23 +080053 "-DTFM_LIB_MODEL=%(lib_model)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080054 "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
55 "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
Raef Coles61b43a42022-01-12 11:42:57 +000056 "-DTEST_BL2=%(test_regression)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080057 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080058 "-DTEST_PSA_API=%(test_psa_api)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080059 "-DBL2=%(with_bl2)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080060 "-DTFM_PROFILE=%(profile)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080061 "-DTFM_PARTITION_PROTECTED_STORAGE=%(partition_ps)s " + \
62 "%(extra_params)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080063 "-DTFM_TEST_REPO_PATH=%(codebase_root_dir)s/../tf-m-tests " + \
64 "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
65 "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
66 "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080067 "%(codebase_root_dir)s",
Karl Zhangaff558a2020-05-15 14:28:23 +010068
Xinyu Zhang433771e2022-04-01 16:49:17 +080069 "set_compiler_path": "export PATH=$PATH:$%(compiler)s_PATH",
70
Minos Galanakisea421232019-06-20 17:11:28 +010071 # A small subset of string substitution params is allowed in commands.
72 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
73 # _tbm_target_platform_ with the paths set when building
74
Xinyu Zhangb708f572020-09-15 11:43:46 +080075 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/bin'
Minos Galanakisea421232019-06-20 17:11:28 +010076 r'/(\w+\.(?:axf|bin|hex))$'),
77
78 # ALL commands will be executed for every build.
79 # Other keys will append extra commands when matching target_platform
Fathi Boudra83e4f292020-12-04 22:33:40 +010080 "build_cmds": {"all": ["cmake --build ./ -- install"],
Summer Qin3c2b5722021-05-26 10:43:45 +080081 "arm/musca_b1/sse_200": [("srec_cat "
Mark Horvath8d281cd2020-12-07 15:20:26 +010082 "%(_tbm_build_dir_)s/bin/"
83 "bl2.bin "
84 "-Binary -offset 0xA000000 "
85 "-fill 0xFF 0xA000000 0xA020000 "
86 "%(_tbm_build_dir_)s/bin/"
87 "tfm_s_ns_signed.bin "
88 "-Binary -offset 0xA020000 "
89 "-fill 0xFF 0xA020000 0xA200000 "
90 "-o %(_tbm_build_dir_)s/bin/"
91 "tfm.hex -Intel")],
Summer Qin3c2b5722021-05-26 10:43:45 +080092 "arm/musca_s1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080093 "%(_tbm_build_dir_)s/bin/"
94 "bl2.bin "
Karl Zhangeffed972020-06-30 15:48:01 +080095 "-Binary -offset 0xA000000 "
Raef Coles543aab32020-12-03 11:12:02 +000096 "-fill 0xFF 0xA000000 0xA020000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +080097 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +080098 "tfm_s_ns_signed.bin "
Raef Coles543aab32020-12-03 11:12:02 +000099 "-Binary -offset 0xA020000 "
100 "-fill 0xFF 0xA020000 0xA200000 "
101 "-o %(_tbm_build_dir_)s/bin/"
Arthur She19c0e1a2021-06-02 11:06:19 -0700102 "tfm.hex -Intel")],
103 "stm/stm32l562e_dk": [("echo 'STM32L562E-DK board post process';"
104 "%(_tbm_build_dir_)s/postbuild.sh;"
105 "pushd %(_tbm_build_dir_)s;"
Arthur She07c91b52021-07-15 15:03:10 -0700106 "BIN_FILES=$(grep -o '\/.*\.bin' TFM_UPDATE.sh | sed 's/^/bin/');"
107 "tar jcf ./bin/stm32l562e-dk-tfm.tar.bz2 regression.sh TFM_UPDATE.sh ${BIN_FILES};"
Arthur She3c0dadd2021-11-18 21:17:48 -0800108 "popd")],
109 "nxp/lpcxpresso55s69": [("echo 'LPCXpresso55S69 board post process\n';"
110 "if [ -f \"%(_tbm_build_dir_)s/bin/bl2.hex\" ]; then FLASH_FILE='flash_bl2_JLink.py'; else FLASH_FILE='flash_JLink.py'; fi;"
111 "pushd %(_tbm_build_dir_)s/../platform/ext/target/nxp/lpcxpresso55s69/scripts;"
112 "LN=$(grep -n 'JLinkExe' ${FLASH_FILE}|awk -F: '{print $1}');"
113 "sed -i \"${LN}s/.*/ print('flash.jlink generated')/\" ${FLASH_FILE};"
114 "python3 ./${FLASH_FILE};"
115 "cd %(_tbm_build_dir_)s/bin;"
116 "BIN_FILES=$(grep loadfile flash.jlink | awk '{print $2}');"
117 "tar jcf lpcxpresso55s69-tfm.tar.bz2 flash.jlink ${BIN_FILES};"
Arthur She87602dc2022-02-06 14:42:18 -0800118 "popd")],
119 "cypress/psoc64": [("echo 'Sign binaries for Cypress PSoC64 platform';"
120 "pushd %(_tbm_build_dir_)s/..;"
121 "sudo /usr/local/bin/cysecuretools "
122 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
123 "--target cy8ckit-064s0s2-4343w "
124 "sign-image "
125 "--hex %(_tbm_build_dir_)s/bin/tfm_s.hex "
126 "--image-type BOOT --image-id 1;"
127 "sudo /usr/local/bin/cysecuretools "
128 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
129 "--target cy8ckit-064s0s2-4343w "
130 "sign-image "
131 "--hex %(_tbm_build_dir_)s/bin/tfm_ns.hex "
132 "--image-type BOOT --image-id 16;"
133 "mv %(_tbm_build_dir_)s/bin/tfm_s.hex %(_tbm_build_dir_)s/bin/tfm_s_signed.hex;"
134 "mv %(_tbm_build_dir_)s/bin/tfm_ns.hex %(_tbm_build_dir_)s/bin/tfm_ns_signed.hex;"
135 "popd")]
Minos Galanakisea421232019-06-20 17:11:28 +0100136 },
137
138 # (Optional) If set will fail if those artefacts are missing post build
139 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800140 "%(_tbm_build_dir_)s/bin/"
141 "tfm_s.bin",
142 "%(_tbm_build_dir_)s/bin/"
143 "tfm_ns.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800144 "arm/musca_b1/sse_200": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800145 "%(_tbm_build_dir_)s/bin/"
146 "tfm.hex",
147 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800148 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800149 "%(_tbm_build_dir_)s/bin/"
150 "tfm_sign.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800151 "arm/musca_s1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800152 "%(_tbm_build_dir_)s/bin/"
153 "tfm.hex",
154 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800155 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800156 "%(_tbm_build_dir_)s/bin/"
157 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100158 }
159}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100160
Xinyu Zhangb708f572020-09-15 11:43:46 +0800161# List of all build configs that are impossible under all circumstances
162_common_tfm_invalid_configs = [
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800163 # GCC defect
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800164 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*", "*", "Minsizerel", "*", "*", "*", "*"),
Xinyu Zhang459a1982021-07-21 22:34:49 +0800165 # LR_CODE size exceeds limit on MUSCA_B1 & MUSCA_S1 with regression tests in Debug mode built with ARMCLANG
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800166 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "", "*", "*"),
167 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "", "*", "*"),
Karl Zhangc858a722021-03-22 21:38:19 +0800168 # Load range overlap on Musca for IPC Debug type: T895
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800169 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*"),
170 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*"),
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800171 # LVL2 and LVL3 requires IPC model
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800172 ("*", "*", True, "2", "*", "*", "*", "*", "*", "*", "*"),
173 ("*", "*", True, "3", "*", "*", "*", "*", "*", "*", "*"),
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300174 # FF does not support library model
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800175 ("*", "*", True, "*", "*", "IPC", "*", "*", "*", "*", "*"),
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300176 # FF does not support L3
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800177 ("*", "*", "*", "3", "*", "IPC", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800178 # Musca requires BL2
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800179 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
180 ("arm/musca_s1", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800181 # Only AN521 and MUSCA_B1 support Isolation Level 3
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800182 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*"),
183 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*"),
184 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800185 ]
186
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100187# Configure build manager to build several combinations
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800188# Config group for per-patch job
189config_pp_test = {"seed_params": {
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800190 # AN519_ARMCLANG_IPC_1_REG_Debug_BL2
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800191 "tfm_platform": ["arm/mps2/an519"],
192 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800193 "lib_model": [False],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800194 "isolation_level": ["1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800195 "test_regression": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800196 "test_psa_api": ["OFF"],
197 "cmake_build_type": ["Debug"],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800198 "with_bl2": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800199 "profile": [""],
200 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800201 "extra_params": [""]
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800202 },
203 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800204 "valid": [
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800205 # AN519_ARMCLANG_IPC_2_REG_Release_BL2
206 ("arm/mps2/an519", "ARMCLANG_6_13", False, "2",
207 True, "OFF", "Release", True, "", "ON", ""),
208 # AN519_GCC_IPC_1_REG_Debug_BL2
209 ("arm/mps2/an519", "GCC_7_3_1", False, "1",
210 True, "OFF", "Debug", True, "", "ON", ""),
211 # AN519_GCC_IPC_2_REG_Release_BL2
212 ("arm/mps2/an519", "GCC_7_3_1", False, "2",
213 True, "OFF", "Release", True, "", "ON", ""),
214 # AN519_GCC_LIB_1_REG_Debug_BL2
215 ("arm/mps2/an519", "GCC_7_3_1", True, "1",
216 True, "OFF", "Debug", True, "", "ON", ""),
217 # AN521_ARMCLANG_IPC_1_REG_Debug_BL2
218 ("arm/mps2/an521", "ARMCLANG_6_13", False, "1",
219 True, "OFF", "Debug", True, "", "ON", ""),
220 # AN521_ARMCLANG_IPC_2_Debug_BL2
221 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2",
222 False, "OFF", "Debug", True, "", "ON", ""),
223 # AN521_ARMCLANG_IPC_2_REG_Release_BL2
224 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2",
225 True, "OFF", "Release", True, "", "ON", ""),
226 # AN521_ARMCLANG_IPC_3_REG_Minsizerel_BL2
227 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3",
228 True, "OFF", "Minsizerel", True, "", "ON", ""),
229 # AN521_ARMCLANG_IPC_3_Release_BL2
230 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3",
231 False, "OFF", "Release", True, "", "ON", ""),
232 # AN521_GCC_IPC_1_REG_Debug_BL2
233 ("arm/mps2/an521", "GCC_7_3_1", False, "1",
234 True, "OFF", "Debug", True, "", "ON", ""),
235 # AN521_GCC_IPC_2_Debug_BL2_MEDIUM
236 ("arm/mps2/an521", "GCC_7_3_1", False, "2",
237 False, "OFF", "Debug", True, "profile_medium", "ON", ""),
238 # AN521_GCC_IPC_2_REG_Release_BL2
239 ("arm/mps2/an521", "GCC_7_3_1", False, "2",
240 True, "OFF", "Release", True, "", "ON", ""),
241 # AN521_GCC_IPC_3_Debug_BL2_LARGE
242 ("arm/mps2/an521", "GCC_7_3_1", False, "3",
243 False, "OFF", "Debug", True, "profile_large", "ON", ""),
244 # AN521_GCC_IPC_3_REG_Minsizerel_BL2
245 ("arm/mps2/an521", "GCC_7_3_1", False, "3",
246 True, "OFF", "Minsizerel", True, "", "ON", ""),
247 # AN521_GCC_LIB_1_Debug_BL2
248 ("arm/mps2/an521", "GCC_7_3_1", True, "1",
249 False, "OFF", "Debug", True, "", "ON", ""),
250 # AN521_GCC_LIB_1_REG_Debug_BL2
251 ("arm/mps2/an521", "GCC_7_3_1", True, "1",
252 True, "OFF", "Debug", True, "", "ON", ""),
253 # AN521_GCC_IPC_2_REG_Release_BL2_MEDIUM_PSOFF
254 ("arm/mps2/an521", "GCC_7_3_1", False, "2",
255 True, "OFF", "Release", True, "profile_medium", "OFF", ""),
256 # AN552_GNUARM_IPC_1_REG_Debug_BL2
257 ("arm/mps3/an552", "GCC_10_3", False, "1",
258 True, "OFF", "Debug", True, "", "ON", ""),
259 # AN552_GNUARM_IPC_1_REG_Release_BL2
260 ("arm/mps3/an552", "GCC_10_3", False, "1",
261 True, "OFF", "Release", True, "", "ON", ""),
262 # MUSCA_B1_GCC_LIB_1_REG_Minsizerel_BL2
263 ("arm/musca_b1/sse_200", "GCC_7_3_1", True, "1",
264 True, "OFF", "Minsizerel", True, "", "ON", ""),
265 # MUSCA_S1_ARMCLANG_IPC_2_REG_Release_BL2
266 ("arm/musca_s1", "ARMCLANG_6_13", False, "2",
267 True, "OFF", "Release", True, "", "ON", ""),
268 # MUSCA_S1_GCC_IPC_1_REG_Debug_BL2
269 ("arm/musca_s1", "GCC_10_3", False, "1",
270 True, "OFF", "Debug", True, "", "ON", ""),
271 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2
272 ("arm/musca_s1", "GCC_10_3", False, "2",
273 True, "OFF", "Release", True, "", "ON", ""),
274 # MUSCA_S1_GCC_LIB_1_REG_Debug_BL2
275 ("arm/musca_s1", "GCC_10_3", True, "1",
276 True, "OFF", "Debug", True, "", "ON", ""),
277 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_FPHARD
278 ("arm/musca_s1", "GCC_10_3", False, "2",
279 True, "OFF", "Release", True, "", "ON", "FPHARD"),
280 # MUSCA_S1_GCC_IPC_1_REG_Release_BL2_CC_DRIVER_PSA
281 ("arm/musca_s1", "GCC_7_3_1", False, "1",
282 True, "OFF", "Release", True, "", "ON", "CC_DRIVER_PSA"),
283 # stm32l562e_dk_ARMCLANG_IPC_1_REG_Release_BL2
284 ("stm/stm32l562e_dk", "ARMCLANG_6_13", False, "1",
285 True, "OFF", "Release", True, "", "ON", "CRYPTO_OFF"),
286 # stm32l562e_dk_GCC_IPC_2_REG_Release_BL2
287 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "2",
288 False, "OFF", "Release", True, "", "ON", "CRYPTO_ON"),
289 # stm32l562e_dk_GCC_IPC_3_REG_Release_BL2
290 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "3",
291 True, "OFF", "Release", True, "", "ON", "CRYPTO_OFF"),
292 # psoc64_GCC_IPC_2_REG_Release
293 ("cypress/psoc64", "GCC_7_3_1", False, "2",
294 True, "OFF", "Release", False, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800295 ],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800296 "invalid": _common_tfm_invalid_configs + []
297 }
298
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800299# Config group for nightly job
300config_nightly_test = {"seed_params": {
301 "tfm_platform": ["arm/mps2/an519",
302 "arm/mps2/an521",
303 "arm/mps3/an524",
304 "arm/musca_s1",
305 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800306 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800307 "lib_model": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800308 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800309 "test_regression": [True, False],
310 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800311 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800312 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800313 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800314 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800315 "extra_params": [""]
Minos Galanakisea421232019-06-20 17:11:28 +0100316 },
317 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800318 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100319 }
320
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800321# Config group for release job
322config_release_test = {"seed_params": {
323 "tfm_platform": ["arm/mps2/an519",
324 "arm/mps2/an521",
325 "arm/mps3/an524",
326 "arm/musca_b1/sse_200",
327 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800328 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800329 "lib_model": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800330 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800331 "test_regression": [True, False],
332 "test_psa_api": ["OFF"],
333 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800334 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800335 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800336 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800337 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800338 },
339 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800340 "valid": [
341 # sanity test for GCC v11.2
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800342 # AN521_GCC_IPC_3_REG_Relwithdebinfo_BL2
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800343 ("arm/mps2/an521", "GCC_11_2",
344 False, "3", True, "OFF", "Relwithdebinfo",
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800345 True, "", "ON", ""),
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800346 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800347 "invalid": _common_tfm_invalid_configs + []
348 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800349
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800350# Config groups for TF-M features
351config_profile_s = {"seed_params": {
David Huda27ae72022-03-28 15:32:19 +0800352 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800353 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
David Huda27ae72022-03-28 15:32:19 +0800354 "lib_model": [True],
355 "isolation_level": ["1"],
356 "test_regression": [True, False],
357 "test_psa_api": ["OFF"],
358 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
David Huda27ae72022-03-28 15:32:19 +0800359 "with_bl2": [True],
David Huda27ae72022-03-28 15:32:19 +0800360 "profile": ["profile_small"],
361 "partition_ps": ["OFF"],
362 "extra_params": [""]
363 },
364 "common_params": _common_tfm_builder_cfg,
365 "valid": [
366 # Profile Small also supports SFN model
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800367 ("*", "*", False, "*", "*", "*",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +0800368 "*", "*", "*", "*", "SFN")
David Huda27ae72022-03-28 15:32:19 +0800369 ],
370 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhang433771e2022-04-01 16:49:17 +0800371 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800372 "*", "Minsizerel", "*", "*", "*", "*")
David Huda27ae72022-03-28 15:32:19 +0800373 ]
374 }
375
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800376config_profile_m = {"seed_params": {
377 "tfm_platform": ["arm/mps2/an519",
378 "arm/mps2/an521",
379 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800380 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800381 "lib_model": [False],
382 "isolation_level": ["2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800383 "test_regression": [True, False],
384 "test_psa_api": ["OFF"],
385 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800386 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800387 "profile": ["profile_medium"],
388 "partition_ps": ["ON", "OFF"],
389 "extra_params": [""]
390 },
391 "common_params": _common_tfm_builder_cfg,
392 "invalid": _common_tfm_invalid_configs + []
393 }
394
395config_profile_l = {"seed_params": {
396 "tfm_platform": ["arm/mps2/an521"],
397 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
398 "lib_model": [False],
399 "isolation_level": ["3"],
400 "test_regression": [True, False],
401 "test_psa_api": ["OFF"],
402 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800403 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800404 "profile": ["profile_large"],
405 "partition_ps": ["ON", "OFF"],
406 "extra_params": [""]
407 },
408 "common_params": _common_tfm_builder_cfg,
409 "invalid": _common_tfm_invalid_configs + []
410 }
411
412config_cc_driver_psa = {"seed_params": {
413 "tfm_platform": ["arm/musca_b1/sse_200",
414 "arm/musca_s1"],
415 "compiler": ["GCC_7_3_1"],
416 "lib_model": [False],
417 "isolation_level": ["1"],
418 "test_regression": [True],
419 "test_psa_api": ["OFF"],
420 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800421 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800422 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800423 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800424 "extra_params": ["CC_DRIVER_PSA"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800425 },
426 "common_params": _common_tfm_builder_cfg,
427 "invalid": _common_tfm_invalid_configs + []
428 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100429
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800430config_fp = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800431 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800432 "compiler": ["GCC_10_3"],
433 "lib_model": [False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800434 "isolation_level": ["1", "2"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800435 "test_regression": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800436 "test_psa_api": ["OFF"],
437 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800438 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800439 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800440 "partition_ps": ["ON"],
Xinyu Zhangfc061dd2022-07-26 14:52:56 +0800441 "extra_params": ["FPSOFT", "FPHARD", "FPHARD, LZOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800442 },
443 "common_params": _common_tfm_builder_cfg,
444 "invalid": _common_tfm_invalid_configs + []
445 }
Karl Zhangeffed972020-06-30 15:48:01 +0800446
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800447config_psa_api = {"seed_params": {
448 "tfm_platform": ["arm/mps2/an521",
449 "arm/musca_b1/sse_200",
450 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800451 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800452 "lib_model": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800453 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800454 "test_regression": [False],
455 "test_psa_api": ["IPC",
456 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800457 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800458 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800459 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800460 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800461 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800462 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800463 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800464 },
465 "common_params": _common_tfm_builder_cfg,
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300466 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800467 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800468
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800469config_nsce = {"seed_params": {
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800470 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800471 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800472 "lib_model": [True, False],
473 "isolation_level": ["1", "2", "3"],
474 "test_regression": [True],
475 "test_psa_api": ["OFF"],
476 "cmake_build_type": ["Debug"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800477 "with_bl2": [True],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800478 "profile": [""],
479 "partition_ps": ["ON"],
Xinyu Zhang67612992021-12-20 14:11:27 +0800480 "extra_params": ["NSCE"]
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800481 },
482 "common_params": _common_tfm_builder_cfg,
483 "invalid": _common_tfm_invalid_configs + []
484 }
485
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800486config_mmio = {"seed_params": {
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800487 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800488 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800489 "lib_model": [False],
490 "isolation_level": ["1"],
491 "test_regression": [True],
492 "test_psa_api": ["OFF"],
493 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800494 "with_bl2": [True],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800495 "profile": [""],
496 "partition_ps": ["ON"],
Xinyu Zhang3bb01af2021-12-20 14:45:49 +0800497 "extra_params": ["MMIO"]
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800498 },
499 "common_params": _common_tfm_builder_cfg,
500 "invalid": _common_tfm_invalid_configs + []
501 }
502
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800503# Config groups for code coverage
504config_cov_profile_s = deepcopy(config_profile_s)
505config_cov_profile_s["seed_params"]["compiler"] = ["GCC_7_3_1"]
Xinyu Zhangbdc37e32022-04-06 17:47:44 +0800506
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800507config_cov_profile_m = deepcopy(config_profile_m)
508config_cov_profile_m["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800509
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800510config_cov_profile_l = deepcopy(config_profile_l)
511config_cov_profile_l["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800512
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800513config_cov_nsce = deepcopy(config_nsce)
514config_cov_nsce["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800515
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800516config_cov_mmio = deepcopy(config_mmio)
517config_cov_mmio["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800518
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800519# Config groups for platforms
520config_an519 = {"seed_params": {
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800521 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800522 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800523 "lib_model": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800524 "isolation_level": ["1", "2"],
525 "test_regression": [True, False],
526 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800527 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800528 "with_bl2": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800529 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800530 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800531 "extra_params": ["", "NSOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800532 },
533 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800534 "invalid": _common_tfm_invalid_configs + []
535 }
536
537config_an521 = {"seed_params": {
538 "tfm_platform": ["arm/mps2/an521"],
539 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
540 "lib_model": [True, False],
541 "isolation_level": ["1", "2", "3"],
542 "test_regression": [True, False],
543 "test_psa_api": ["OFF"],
544 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800545 "with_bl2": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800546 "profile": [""],
547 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800548 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800549 },
550 "common_params": _common_tfm_builder_cfg,
551 "invalid": _common_tfm_invalid_configs + []
552 }
553
554config_an524 = {"seed_params": {
555 "tfm_platform": ["arm/mps3/an524"],
556 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
557 "lib_model": [True, False],
558 "isolation_level": ["1", "2"],
559 "test_regression": [True, False],
560 "test_psa_api": ["OFF"],
561 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800562 "with_bl2": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800563 "profile": [""],
564 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800565 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800566 },
567 "common_params": _common_tfm_builder_cfg,
568 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800569 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000570
Xinyu Zhang38b76742021-11-11 13:57:56 +0800571config_an547 = {"seed_params": {
572 "tfm_platform": ["arm/mps3/an547"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100573 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800574 "lib_model": [False],
575 "isolation_level": ["1"],
576 "test_regression": [False],
577 "test_psa_api": ["OFF"],
578 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800579 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800580 "profile": [""],
581 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800582 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800583 },
584 "common_params": _common_tfm_builder_cfg,
585 "invalid": _common_tfm_invalid_configs + []
586 }
587
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800588config_an552 = {"seed_params": {
589 "tfm_platform": ["arm/mps3/an552"],
590 "compiler": ["GCC_10_3"],
591 "lib_model": [True, False],
592 "isolation_level": ["1", "2"],
593 "test_regression": [True, False],
594 "test_psa_api": ["OFF"],
595 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800596 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800597 "profile": [""],
598 "partition_ps": ["ON"],
599 "extra_params": [""]
600 },
601 "common_params": _common_tfm_builder_cfg,
602 "invalid": _common_tfm_invalid_configs + []
603 }
604
605config_musca_b1 = {"seed_params": {
606 "tfm_platform": ["arm/musca_b1/sse_200"],
607 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
608 "lib_model": [True, False],
609 "isolation_level": ["1", "2", "3"],
610 "test_regression": [True, False],
611 "test_psa_api": ["OFF"],
612 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800613 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800614 "profile": [""],
615 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800616 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800617 },
618 "common_params": _common_tfm_builder_cfg,
619 "invalid": _common_tfm_invalid_configs + []
620 }
621
622config_musca_b1_se = {"seed_params": {
623 "tfm_platform": ["arm/musca_b1/secure_enclave"],
624 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
625 "lib_model": [False],
626 "isolation_level": ["1"],
627 "test_regression": [False],
628 "test_psa_api": ["OFF"],
629 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800630 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800631 "profile": [""],
632 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800633 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800634 },
635 "common_params": _common_tfm_builder_cfg,
636 "invalid": _common_tfm_invalid_configs + []
637 }
638
639config_musca_s1 = {"seed_params": {
640 "tfm_platform": ["arm/musca_s1"],
641 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
642 "lib_model": [True, False],
643 "isolation_level": ["1", "2"],
644 "test_regression": [True, False],
645 "test_psa_api": ["OFF"],
646 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800647 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800648 "profile": [""],
649 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800650 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800651 },
652 "common_params": _common_tfm_builder_cfg,
653 "invalid": _common_tfm_invalid_configs + []
654 }
655
Bence Balogh8731a092022-05-24 17:24:54 +0200656config_corstone310 = {"seed_params": {
657 "tfm_platform": ["arm/mps3/corstone310_fvp"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100658 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800659 "lib_model": [False],
660 "isolation_level": ["1"],
661 "test_regression": [False],
662 "test_psa_api": ["OFF"],
663 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800664 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800665 "profile": [""],
666 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800667 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800668 },
669 "common_params": _common_tfm_builder_cfg,
670 "invalid": _common_tfm_invalid_configs + []
671 }
672
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800673config_psoc64 = {"seed_params": {
674 "tfm_platform": ["cypress/psoc64"],
675 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
676 "lib_model": [False],
677 "isolation_level": ["1", "2"],
678 "test_regression": [True],
679 "test_psa_api": ["OFF"],
680 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800681 "with_bl2": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800682 "profile": [""],
683 "partition_ps": ["ON"],
684 "extra_params": [""]
685 },
686 "common_params": _common_tfm_builder_cfg,
687 "invalid": _common_tfm_invalid_configs + []
688 }
689
690config_corstone1000 = {"seed_params": {
691 "tfm_platform": ["arm/corstone1000"],
692 "compiler": ["GCC_7_3_1"],
693 "lib_model": [False],
694 "isolation_level": ["1"],
695 "test_regression": [False],
696 "test_psa_api": ["OFF"],
697 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800698 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800699 "profile": [""],
700 "partition_ps": ["ON"],
Xinyu Zhangfc061dd2022-07-26 14:52:56 +0800701 "extra_params": ["S_PS_OFF, FVP", "FPGA"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800702 },
703 "common_params": _common_tfm_builder_cfg,
704 "invalid": _common_tfm_invalid_configs + []
705 }
706
707config_stm32l562e_dk = {"seed_params": {
708 "tfm_platform": ["stm/stm32l562e_dk"],
709 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
710 "lib_model": [True, False],
711 "isolation_level": ["1", "2", "3"],
712 "test_regression": [True, False],
713 "test_psa_api": ["OFF"],
714 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800715 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800716 "profile": [""],
717 "partition_ps": ["ON"],
718 "extra_params": ["CRYPTO_OFF", "CRYPTO_ON"]
719 },
720 "common_params": _common_tfm_builder_cfg,
721 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800722 # Oversize issue on config stm32l562e_dk_ARMCLANG_LIB_1_REG_Release_BL2
723 ("stm/stm32l562e_dk", "ARMCLANG_6_13", True, "1",
724 True, "OFF", "Release", True, "", "ON", "*"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800725 # all other tests are off when CRYPTO is ON
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800726 ("stm/stm32l562e_dk", "*", "*", "*", True, "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800727 "*", "*", "*", "*", "CRYPTO_ON"),
728 # all other tests are ON when CRYPTO is OFF
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800729 ("stm/stm32l562e_dk", "*", "*", "*", False, "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800730 "*", "*", "*", "*", "CRYPTO_OFF"),
731 ]
732 }
733
734config_b_u585i_iot02a = {"seed_params": {
735 "tfm_platform": ["stm/b_u585i_iot02a"],
736 "compiler": ["GCC_7_3_1"],
737 "lib_model": [False],
738 "isolation_level": ["1"],
739 "test_regression": [False],
740 "test_psa_api": ["OFF"],
741 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800742 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800743 "profile": [""],
744 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800745 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800746 },
747 "common_params": _common_tfm_builder_cfg,
748 "invalid": _common_tfm_invalid_configs + []
749 }
750
751config_nucleo_l552ze_q = {"seed_params": {
752 "tfm_platform": ["stm/nucleo_l552ze_q"],
753 "compiler": ["GCC_7_3_1"],
754 "lib_model": [False],
755 "isolation_level": ["1"],
756 "test_regression": [False],
757 "test_psa_api": ["OFF"],
758 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800759 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800760 "profile": [""],
761 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800762 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800763 },
764 "common_params": _common_tfm_builder_cfg,
765 "invalid": _common_tfm_invalid_configs + []
766 }
767
768config_lpcxpresso55s69 = {"seed_params": {
769 "tfm_platform": ["nxp/lpcxpresso55s69"],
770 "compiler": ["GCC_7_3_1"],
771 "lib_model": [False],
772 "isolation_level": ["2"],
773 "test_regression": [True, False],
774 "test_psa_api": ["OFF"],
775 "cmake_build_type": ["Relwithdebinfo"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800776 "with_bl2": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800777 "profile": ["profile_medium"],
778 "partition_ps": ["ON"],
779 "extra_params": [""]
780 },
781 "common_params": _common_tfm_builder_cfg,
782 "invalid": _common_tfm_invalid_configs + []
783 }
784
Xinyu Zhang38b76742021-11-11 13:57:56 +0800785config_bl5340 = {"seed_params": {
786 "tfm_platform": ["lairdconnectivity/bl5340_dvk_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800787 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800788 "lib_model": [False],
789 "isolation_level": ["1"],
790 "test_regression": [False],
791 "test_psa_api": ["OFF"],
792 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800793 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800794 "profile": [""],
795 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800796 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800797 },
798 "common_params": _common_tfm_builder_cfg,
799 "invalid": _common_tfm_invalid_configs + []
800 }
801
802config_nrf5340dk = {"seed_params": {
803 "tfm_platform": ["nordic_nrf/nrf5340dk_nrf5340_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800804 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800805 "lib_model": [False],
806 "isolation_level": ["1"],
807 "test_regression": [False],
808 "test_psa_api": ["OFF"],
809 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800810 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800811 "profile": [""],
812 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800813 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800814 },
815 "common_params": _common_tfm_builder_cfg,
816 "invalid": _common_tfm_invalid_configs + []
817 }
818
819config_nrf9160dk = {"seed_params": {
820 "tfm_platform": ["nordic_nrf/nrf9160dk_nrf9160"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800821 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800822 "lib_model": [False],
823 "isolation_level": ["1"],
824 "test_regression": [False],
825 "test_psa_api": ["OFF"],
826 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800827 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800828 "profile": [""],
829 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800830 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800831 },
832 "common_params": _common_tfm_builder_cfg,
833 "invalid": _common_tfm_invalid_configs + []
834 }
835
836config_m2351 = {"seed_params": {
837 "tfm_platform": ["nuvoton/m2351"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800838 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800839 "lib_model": [False],
840 "isolation_level": ["1"],
841 "test_regression": [False],
842 "test_psa_api": ["OFF"],
843 "cmake_build_type": ["Release"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800844 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800845 "profile": [""],
846 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800847 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800848 },
849 "common_params": _common_tfm_builder_cfg,
850 "invalid": _common_tfm_invalid_configs + []
851 }
852
853config_m2354 = {"seed_params": {
854 "tfm_platform": ["nuvoton/m2354"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800855 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800856 "lib_model": [False],
857 "isolation_level": ["1"],
858 "test_regression": [False],
859 "test_psa_api": ["OFF"],
860 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800861 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800862 "profile": [""],
863 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800864 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800865 },
866 "common_params": _common_tfm_builder_cfg,
867 "invalid": _common_tfm_invalid_configs + []
868 }
869
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800870# Config groups for debug
871config_debug = {"seed_params": {
872 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800873 "compiler": ["GCC_7_3_1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800874 "lib_model": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800875 "isolation_level": ["1"],
876 "test_regression": [False],
877 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800878 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800879 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800880 "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
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800888config_debug_regr = deepcopy(config_debug)
889config_debug_regr["seed_params"]["test_regression"] = [True]
890
891config_debug_PSA_API = {"seed_params": {
892 "tfm_platform": ["arm/mps2/an521"],
893 "compiler": ["ARMCLANG_6_13"],
894 "lib_model": [True],
895 "isolation_level": ["1"],
896 "test_regression": [False],
897 "test_psa_api": ["CRYPTO",
898 "INITIAL_ATTESTATION",
899 "STORAGE",
900 "IPC"],
901 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800902 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800903 "profile": [""],
904 "partition_ps": ["ON"],
905 "extra_params": [""]
906 },
907 "common_params": _common_tfm_builder_cfg,
908 "invalid": _common_tfm_invalid_configs + []
909 }
910
911config_debug_PSA_API_nolib = {"seed_params": {
912 "tfm_platform": ["arm/mps2/an521"],
913 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800914 "lib_model": [False],
915 "isolation_level": ["1"],
916 "test_regression": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800917 "test_psa_api": ["CRYPTO",
918 "INITIAL_ATTESTATION",
919 "STORAGE",
920 "IPC"],
921 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800922 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800923 "profile": [""],
924 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800925 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800926 },
927 "common_params": _common_tfm_builder_cfg,
928 "invalid": _common_tfm_invalid_configs + []
929 }
930
Karl Zhangaff558a2020-05-15 14:28:23 +0100931_builtin_configs = {
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800932 # per-patch test groups
933 "pp_test": config_pp_test,
934 "pp_corstone1000": config_corstone1000,
Karl Zhang14573bc2020-06-08 09:23:21 +0800935
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800936 # nightly test groups
937 "nightly_test": config_nightly_test,
938 "nightly_profile_s": config_profile_s,
939 "nightly_profile_m": config_profile_m,
940 "nightly_profile_l": config_profile_l,
941 "nightly_cc_driver_psa": config_cc_driver_psa,
942 "nightly_fp":config_fp,
943 "nightly_psa_api": config_psa_api,
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800944 "nightly_nsce": config_nsce,
945 "nightly_mmio": config_mmio,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800946 "nightly_an547": config_an547,
947 "nightly_an552": config_an552,
948 "nightly_musca_b1_se": config_musca_b1_se,
Bence Balogh8731a092022-05-24 17:24:54 +0200949 "nightly_corstone310": config_corstone310,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800950 "nightly_corstone1000": config_corstone1000,
951 "nightly_psoc64": config_psoc64,
952 "nightly_stm32l562e_dk": config_stm32l562e_dk,
953 "nightly_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +0800954
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800955 # release test groups
956 "release_test": config_release_test,
957 "release_profile_s": config_profile_s,
958 "release_profile_m": config_profile_m,
959 "release_profile_l": config_profile_l,
960 "release_cc_driver_psa": config_cc_driver_psa,
961 "release_fp": config_fp,
962 "release_psa_api": config_psa_api,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800963 "release_nsce": config_nsce,
964 "release_mmio": config_mmio,
965 "release_an547": config_an547,
966 "release_an552": config_an552,
Bence Balogh8731a092022-05-24 17:24:54 +0200967 "release_corstone310": config_corstone310,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800968 "release_psoc64": config_psoc64,
969 "release_stm32l562e_dk": config_stm32l562e_dk,
970 "release_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +0800971
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800972 # code coverage test groups
973 "coverage_profile_s": config_cov_profile_s,
974 "coverage_profile_m": config_cov_profile_m,
975 "coverage_profile_l": config_cov_profile_l,
976 "coverage_nsce": config_cov_nsce,
977 "coverage_mmio": config_cov_mmio,
978 "coverage_fp": config_fp,
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800979
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800980 # platform groups
981 "an521": config_an521,
982 "an519": config_an519,
983 "an524": config_an524,
984 "an547": config_an547,
985 "an552": config_an552,
986 "musca_b1": config_musca_b1,
987 "musca_b1_se": config_musca_b1_se,
988 "musca_s1": config_musca_s1,
Bence Balogh8731a092022-05-24 17:24:54 +0200989 "corstone310": config_corstone310,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800990 "cypress_psoc64": config_psoc64,
991 "corstone1000": config_corstone1000,
992 "stm_stm32l562e_dk": config_stm32l562e_dk,
993 "stm_b_u585i_iot02a": config_b_u585i_iot02a,
994 "stm_nucleo_l552ze_q": config_nucleo_l552ze_q,
995 "nxp_lpcxpresso55s69": config_lpcxpresso55s69,
Xinyu Zhang38b76742021-11-11 13:57:56 +0800996 "laird_bl5340": config_bl5340,
997 "nordic_nrf5340dk": config_nrf5340dk,
998 "nordic_nrf9160dk": config_nrf9160dk,
999 "nuvoton_m2351": config_m2351,
1000 "nuvoton_m2354": config_m2354,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001001
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001002 # config groups for debug
Dean Birch4c6ad622020-03-13 11:28:03 +00001003 "debug": config_debug,
Paul Sokolovsky6c3c6562022-04-04 23:23:02 +03001004 "debug_regr": config_debug_regr,
Paul Sokolovsky1ec752b2022-01-22 19:50:58 +03001005 "debug_PSA_API": config_debug_PSA_API,
Paul Sokolovsky49a99282022-02-02 23:43:37 +03001006 "debug_PSA_API_nolib": config_debug_PSA_API_nolib,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001007 }
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001008
1009if __name__ == '__main__':
1010 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001011
Minos Galanakisea421232019-06-20 17:11:28 +01001012 # Default behavior is to export refference config when called
1013 _dir = os.getcwd()
1014 from utils import save_json
1015 for _cname, _cfg in _builtin_configs.items():
1016 _fname = os.path.join(_dir, _cname + ".json")
1017 print("Exporting config %s" % _fname)
1018 save_json(_fname, _cfg)