Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2023, Arm Limited. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | # This CMake script template contains the set of options settled on secure side |
| 9 | # build but necessary for building the non-secure side too. |
| 10 | |
| 11 | set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE @TFM_PARTITION_INTERNAL_TRUSTED_STORAGE@ CACHE BOOL "Enable Internal Trusted Storage partition") |
| 12 | set(TFM_PARTITION_CRYPTO @TFM_PARTITION_CRYPTO@ CACHE BOOL "Enable Crypto partition") |
| 13 | set(TFM_PARTITION_INITIAL_ATTESTATION @TFM_PARTITION_INITIAL_ATTESTATION@ CACHE BOOL "Enable Initial Attestation partition") |
| 14 | set(TFM_PARTITION_PROTECTED_STORAGE @TFM_PARTITION_PROTECTED_STORAGE@ CACHE BOOL "Enable Protected Storage partition") |
| 15 | set(TFM_PARTITION_PLATFORM @TFM_PARTITION_PLATFORM@ CACHE BOOL "Enable Platform partition") |
| 16 | set(TFM_PARTITION_FIRMWARE_UPDATE @TFM_PARTITION_FIRMWARE_UPDATE@ CACHE BOOL "Enable firmware update partition") |
| 17 | |
| 18 | # The options necessary for signing the final image |
| 19 | set(BL2 @BL2@) |
| 20 | set(BL2_HEADER_SIZE @BL2_HEADER_SIZE@) |
| 21 | set(BL2_TRAILER_SIZE @BL2_TRAILER_SIZE@) |
| 22 | set(MCUBOOT_IMAGE_NUMBER @MCUBOOT_IMAGE_NUMBER@) |
| 23 | set(MCUBOOT_CONFIRM_IMAGE @MCUBOOT_CONFIRM_IMAGE@) |
| 24 | set(MCUBOOT_ENC_IMAGES @MCUBOOT_ENC_IMAGES@) |
| 25 | set(MCUBOOT_ENC_KEY_LEN @MCUBOOT_ENC_KEY_LEN@) |
| 26 | set(MCUBOOT_MEASURED_BOOT @MCUBOOT_MEASURED_BOOT@) |
| 27 | set(MCUBOOT_ALIGN_VAL @MCUBOOT_ALIGN_VAL@) |
| 28 | set(MCUBOOT_UPGRADE_STRATEGY @MCUBOOT_UPGRADE_STRATEGY@) |
| 29 | set(MCUBOOT_S_IMAGE_MIN_VER @MCUBOOT_S_IMAGE_MIN_VER@) |
| 30 | |
| 31 | set(MCUBOOT_MEASURED_BOOT @MCUBOOT_MEASURED_BOOT@) |
| 32 | set(MCUBOOT_HW_KEY @MCUBOOT_HW_KEY@) |
| 33 | |
| 34 | set(MCUBOOT_SECURITY_COUNTER_S @MCUBOOT_SECURITY_COUNTER_S@) |
| 35 | set(MCUBOOT_IMAGE_VERSION_S @MCUBOOT_IMAGE_VERSION_S@) |
| 36 | set(MCUBOOT_KEY_S ${CONFIG_SPE_PATH}/image_signing/keys/root-RSA-3072.pem) |
| 37 | |
| 38 | set(MCUBOOT_SECURITY_COUNTER_NS @MCUBOOT_SECURITY_COUNTER_NS@) |
| 39 | set(MCUBOOT_IMAGE_VERSION_NS @MCUBOOT_IMAGE_VERSION_NS@) |
| 40 | set(MCUBOOT_KEY_NS ${CONFIG_SPE_PATH}/image_signing/keys/root-RSA-3072_1.pem) |
Dávid Házi | 34cf9b9 | 2023-10-11 11:10:41 +0200 | [diff] [blame] | 41 | set(PLATFORM_DEFAULT_IMAGE_SIGNING @PLATFORM_DEFAULT_IMAGE_SIGNING@) |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 42 | |
| 43 | # The common options describing a platfomr configuration |
| 44 | |
| 45 | set(TFM_PLATFORM @TFM_PLATFORM@ CACHE STRING "Platform to build TF-M for. Must be either a relative path from [TF-M]/platform/ext/target, or an absolute path.") |
| 46 | set(CONFIG_TFM_USE_TRUSTZONE @CONFIG_TFM_USE_TRUSTZONE@ CACHE BOOL "Use TrustZone") |
| 47 | set(CONFIG_TFM_SPM_BACKEND @CONFIG_TFM_SPM_BACKEND@ CACHE STRING "The SPM backend") |
| 48 | set(TFM_MULTI_CORE_TOPOLOGY @TFM_MULTI_CORE_TOPOLOGY@ CACHE BOOL "Platform has multi core") |
| 49 | set(TFM_PARTITION_NS_AGENT_MAILBOX @TFM_PARTITION_NS_AGENT_MAILBOX@ CACHE BOOL "Enable the Mailbox agents") |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 50 | set(PSA_FRAMEWORK_HAS_MM_IOVEC @PSA_FRAMEWORK_HAS_MM_IOVEC@ CACHE BOOL "Enable the MM-IOVEC feature") |
| 51 | set(TFM_ISOLATION_LEVEL @TFM_ISOLATION_LEVEL@ CACHE STRING "The TFM isolation level") |
| 52 | |
| 53 | #set(TFM_MULTI_CORE_NS_OS @TFM_MULTI_CORE_NS_OS@) |
| 54 | #set(TFM_MULTI_CORE_NS_OS_MAILBOX_THREAD @TFM_MULTI_CORE_NS_OS_MAILBOX_THREAD@) |
| 55 | |
David Hu | b27a663 | 2023-10-23 22:38:39 +0800 | [diff] [blame] | 56 | set(PLATFORM_DEFAULT_CRYPTO_KEYS @PLATFORM_DEFAULT_CRYPTO_KEYS@ CACHE BOOL "Use the default crypto keys") |
| 57 | set(PLATFORM_DEFAULT_UART_STDOUT @PLATFORM_DEFAULT_UART_STDOUT@ CACHE BOOL "Use default uart stdout implementation.") |
| 58 | |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 59 | # Testing related options. |
| 60 | |
Anton Komlev | 4f86480 | 2023-09-05 16:57:15 +0100 | [diff] [blame] | 61 | set(TEST_PSA_API "@TEST_PSA_API@" CACHE STRING "Which (if any) of the PSA API tests should be compiled") |
| 62 | set(PSA_ARCH_TESTS_PATH "@PSA_ARCH_TESTS_PATH@" CACHE PATH "Path to PSA arch test repository if it was give to SPE build") |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 63 | |
Kevin Peng | 2f4ef24 | 2023-09-11 09:35:51 +0800 | [diff] [blame] | 64 | set(ATTEST_KEY_BITS @ATTEST_KEY_BITS@ CACHE STRING "The size of the initial attestation key in bits") |
| 65 | set(SYMMETRIC_INITIAL_ATTESTATION @SYMMETRIC_INITIAL_ATTESTATION@ CACHE BOOL "Use symmetric crypto for inital attestation") |
| 66 | set(ATTEST_INCLUDE_TEST_CODE @ATTEST_INCLUDE_TEST_CODE@ CACHE BOOL "Include minimal development tests in the initial attestation regression test suite") |
| 67 | set(TFM_MBEDCRYPTO_PSA_CRYPTO_CONFIG_PATH @TFM_MBEDCRYPTO_PSA_CRYPTO_CONFIG_PATH@ CACHE STRING "Config to use psa crypto setting for Mbed Crypto") |
Anton Komlev | aee4b61 | 2023-05-14 17:38:36 +0100 | [diff] [blame] | 68 | # Other common options |
| 69 | |
| 70 | set(TFM_VERSION @TFM_VERSION@) |
| 71 | set(TFM_NS_MANAGE_NSID @TFM_NS_MANAGE_NSID@) |