Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame] | 1 | Build Options Summary |
| 2 | ===================== |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 3 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame] | 4 | As far as possible, TF-A Tests dynamically detects the platform hardware |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 5 | components and available features. There are a few build options to select |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame] | 6 | specific features where the dynamic detection falls short. |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 7 | |
| 8 | Unless mentioned otherwise, these options are expected to be specified at the |
| 9 | build command line and are not to be modified in any component makefiles. |
| 10 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame] | 11 | .. note:: |
| 12 | The build system doesn't track dependencies for build options. Therefore, if |
| 13 | any of the build options are changed from a previous build, a clean build |
| 14 | must be performed. |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 15 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame] | 16 | Common (Shared) Build Options |
| 17 | ----------------------------- |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 18 | |
| 19 | Most of the build options listed in this section apply to TFTF, the FWU test |
| 20 | images and Cactus, unless otherwise specified. These do not influence the EL3 |
| 21 | payload, whose simplistic build system is mostly independent. |
| 22 | |
| 23 | - ``ARCH``: Choose the target build architecture for TF-A Tests. It can take |
| 24 | either ``aarch64`` or ``aarch32`` as values. By default, it is defined to |
| 25 | ``aarch64``. Not all test images support this build option. |
| 26 | |
Alexei Fedorov | d92f4ce | 2020-12-07 18:13:28 +0000 | [diff] [blame] | 27 | - ``ARM_ARCH_FEATURE``: Optional Arm Architecture build option which specifies |
| 28 | one or more feature modifiers. This option has the form ``[no]feature+...`` |
| 29 | and defaults to ``none``. It translates into compiler option |
| 30 | ``-march=armvX[.Y]-a+[no]feature+...``. See compiler's documentation for the |
| 31 | list of supported feature modifiers. |
| 32 | |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 33 | - ``ARM_ARCH_MAJOR``: The major version of Arm Architecture to target when |
| 34 | compiling TF-A Tests. Its value must be numeric, and defaults to 8. |
| 35 | |
| 36 | - ``ARM_ARCH_MINOR``: The minor version of Arm Architecture to target when |
| 37 | compiling TF-A Tests. Its value must be a numeric, and defaults to 0. |
| 38 | |
Alexei Fedorov | 7fac162 | 2020-06-19 14:25:43 +0100 | [diff] [blame] | 39 | - ``BRANCH_PROTECTION``: Numeric value to enable ARMv8.3 Pointer Authentication |
| 40 | (``ARMv8.3-PAuth``) and ARMv8.5 Branch Target Identification (``ARMv8.5-BTI``) |
| 41 | support in the Trusted Firmware-A Test Framework itself. |
| 42 | If enabled, it is needed to use a compiler that supports the option |
| 43 | ``-mbranch-protection`` (GCC 9 and later). |
| 44 | Selects the branch protection features to use: |
| 45 | - 0: Default value turns off all types of branch protection |
| 46 | - 1: Enables all types of branch protection features |
| 47 | - 2: Return address signing to its standard level |
| 48 | - 3: Extend the signing to include leaf functions |
| 49 | - 4: Turn on branch target identification mechanism |
| 50 | |
| 51 | The table below summarizes ``BRANCH_PROTECTION`` values, GCC compilation |
| 52 | options and resulting PAuth/BTI features. |
| 53 | |
| 54 | +-------+--------------+-------+-----+ |
| 55 | | Value | GCC option | PAuth | BTI | |
| 56 | +=======+==============+=======+=====+ |
| 57 | | 0 | none | N | N | |
| 58 | +-------+--------------+-------+-----+ |
| 59 | | 1 | standard | Y | Y | |
| 60 | +-------+--------------+-------+-----+ |
| 61 | | 2 | pac-ret | Y | N | |
| 62 | +-------+--------------+-------+-----+ |
| 63 | | 3 | pac-ret+leaf | Y | N | |
| 64 | +-------+--------------+-------+-----+ |
| 65 | | 4 | bti | N | Y | |
| 66 | +-------+--------------+-------+-----+ |
| 67 | |
| 68 | This option defaults to 0 and this is an experimental feature. |
| 69 | |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 70 | - ``DEBUG``: Chooses between a debug and a release build. A debug build |
| 71 | typically embeds assertions checking the validity of some assumptions and its |
| 72 | output is more verbose. The option can take either 0 (release) or 1 (debug) |
| 73 | as values. 0 is the default. |
| 74 | |
| 75 | - ``ENABLE_ASSERTIONS``: This option controls whether calls to ``assert()`` are |
| 76 | compiled out. |
| 77 | |
| 78 | - For debug builds, this option defaults to 1, and calls to ``assert()`` are |
| 79 | compiled in. |
| 80 | - For release builds, this option defaults to 0 and calls to ``assert()`` |
| 81 | are compiled out. |
| 82 | |
| 83 | This option can be set independently of ``DEBUG``. It can also be used to |
| 84 | hide any auxiliary code that is only required for the assertion and does not |
| 85 | fit in the assertion itself. |
| 86 | |
| 87 | - ``LOG_LEVEL``: Chooses the log level, which controls the amount of console log |
| 88 | output compiled into the build. This should be one of the following: |
| 89 | |
| 90 | :: |
| 91 | |
| 92 | 0 (LOG_LEVEL_NONE) |
| 93 | 10 (LOG_LEVEL_ERROR) |
| 94 | 20 (LOG_LEVEL_NOTICE) |
| 95 | 30 (LOG_LEVEL_WARNING) |
| 96 | 40 (LOG_LEVEL_INFO) |
| 97 | 50 (LOG_LEVEL_VERBOSE) |
| 98 | |
| 99 | All log output up to and including the selected log level is compiled into |
| 100 | the build. The default value is 40 in debug builds and 20 in release builds. |
| 101 | |
| 102 | - ``PLAT``: Choose a platform to build TF-A Tests for. The chosen platform name |
| 103 | must be a subdirectory of any depth under ``plat/``, and must contain a |
| 104 | platform makefile named ``platform.mk``. For example, to build TF-A Tests for |
| 105 | the Arm Juno board, select ``PLAT=juno``. |
| 106 | |
| 107 | - ``V``: Verbose build. If assigned anything other than 0, the build commands |
| 108 | are printed. Default is 0. |
| 109 | |
Alexei Fedorov | 7cc2587 | 2020-06-02 16:35:36 +0100 | [diff] [blame] | 110 | Arm FVP Platform Specific Build Options |
| 111 | --------------------------------------- |
| 112 | |
| 113 | - ``FVP_CLUSTER_COUNT`` : Configures the cluster count to be used to build the |
| 114 | topology tree within TFTF. By default TFTF is configured for dual cluster for |
| 115 | CPUs with single thread (ST) and single cluster for SMT CPUs. |
| 116 | For ST CPUs this option can be used to override the default number of clusters |
| 117 | with a value in the range 1-4. |
| 118 | |
| 119 | - ``FVP_MAX_CPUS_PER_CLUSTER``: Sets the maximum number of CPUs implemented in |
| 120 | a single cluster. This option defaults to the maximum value of 4 for ST CPUs |
| 121 | and maximum value of 8 for SMT CPUs. |
| 122 | |
| 123 | - ``FVP_MAX_PE_PER_CPU``: Sets the maximum number of PEs implemented on any CPU |
| 124 | in the system. This option defaults to 1 to select ST CPUs. For platforms with |
| 125 | SMT CPUs this value must be set to 2. |
| 126 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame] | 127 | TFTF-specific Build Options |
| 128 | --------------------------- |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 129 | |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 130 | - ``NEW_TEST_SESSION``: Choose whether a new test session should be started |
| 131 | every time or whether the framework should determine whether a previous |
| 132 | session was interrupted and resume it. It can take either 1 (always |
| 133 | start new session) or 0 (resume session as appropriate). 1 is the default. |
| 134 | |
| 135 | - ``TESTS``: Set of tests to run. Use the following command to list all |
| 136 | possible sets of tests: |
| 137 | |
| 138 | :: |
| 139 | |
| 140 | make help_tests |
| 141 | |
| 142 | If no set of tests is specified, the standard tests will be selected (see |
| 143 | ``tftf/tests/tests-standard.xml``). |
| 144 | |
| 145 | - ``USE_NVM``: Used to select the location of test results. It can take either 0 |
| 146 | (RAM) or 1 (non-volatile memory like flash) as test results storage. Default |
| 147 | value is 0, as writing to the flash significantly slows tests down. |
| 148 | |
Soby Mathew | 2a5b150 | 2022-11-02 04:29:07 +0000 | [diff] [blame^] | 149 | Realm payload specific Build Options |
| 150 | ------------------------------------ |
| 151 | |
| 152 | - ``TFTF_MAX_IMAGE_SIZE``: The option needs to be either set by the user or |
| 153 | by the platform makefile to specify the maximum size of TFTF binary. This |
| 154 | is needed so that the Realm payload binary can be appended to TFTF binary |
| 155 | via ``make pack_realm`` build command. |
| 156 | |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame] | 157 | FWU-specific Build Options |
| 158 | -------------------------- |
Jimmy Brisson | 0862f01 | 2020-04-02 15:19:12 -0500 | [diff] [blame] | 159 | |
| 160 | - ``FIRMWARE_UPDATE``: Whether the Firmware Update test images (i.e. |
| 161 | ``NS_BL1U`` and ``NS_BL2U``) should be built. The default value is 0. The |
| 162 | platform makefile is free to override this value if Firmware Update is |
| 163 | supported on this platform. |
Jimmy Brisson | ff08d3e | 2020-04-02 15:19:27 -0500 | [diff] [blame] | 164 | |
| 165 | -------------- |
| 166 | |
Alexei Fedorov | 7cc2587 | 2020-06-02 16:35:36 +0100 | [diff] [blame] | 167 | *Copyright (c) 2019-2020, Arm Limited. All rights reserved.* |