Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 1 | Arm Fixed Virtual Platforms (FVP) |
| 2 | ================================= |
| 3 | |
| 4 | Fixed Virtual Platform (FVP) Support |
| 5 | ------------------------------------ |
| 6 | |
| 7 | This section lists the supported Arm |FVP| platforms. Please refer to the FVP |
| 8 | documentation for a detailed description of the model parameter options. |
| 9 | |
| 10 | The latest version of the AArch64 build of TF-A has been tested on the following |
| 11 | Arm FVPs without shifted affinities, and that do not support threaded CPU cores |
| 12 | (64-bit host machine only). |
| 13 | |
| 14 | .. note:: |
Maksims Svecovs | 208a886 | 2022-04-28 16:52:37 +0100 | [diff] [blame] | 15 | The FVP models used are Version 11.17 Build 21, unless otherwise stated. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 16 | |
Maksims Svecovs | fd115b6 | 2021-10-25 16:13:42 +0100 | [diff] [blame] | 17 | - ``Foundation_Platform`` |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 18 | - ``FVP_Base_AEMv8A-AEMv8A-AEMv8A-AEMv8A-CCN502`` |
Maksims Svecovs | fd115b6 | 2021-10-25 16:13:42 +0100 | [diff] [blame] | 19 | - ``FVP_Base_AEMv8A-AEMv8A`` (For certain configurations also uses 11.14/21) |
| 20 | - ``FVP_Base_AEMv8A-GIC600AE`` |
| 21 | - ``FVP_Base_AEMvA`` (For certain configurations also uses 0.0/6684) |
| 22 | - ``FVP_Base_Cortex-A32x4`` (Version 11.12/38) |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 23 | - ``FVP_Base_Cortex-A35x4`` |
| 24 | - ``FVP_Base_Cortex-A53x4`` |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 25 | - ``FVP_Base_Cortex-A55x4`` |
Maksims Svecovs | fd115b6 | 2021-10-25 16:13:42 +0100 | [diff] [blame] | 26 | - ``FVP_Base_Cortex-A55x4+Cortex-A75x4`` |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 27 | - ``FVP_Base_Cortex-A57x1-A53x1`` |
| 28 | - ``FVP_Base_Cortex-A57x2-A53x4`` |
| 29 | - ``FVP_Base_Cortex-A57x4-A53x4`` |
| 30 | - ``FVP_Base_Cortex-A57x4`` |
laurenw-arm | 0a9b8d0 | 2020-04-15 17:48:36 -0500 | [diff] [blame] | 31 | - ``FVP_Base_Cortex-A65AEx8`` |
Maksims Svecovs | fd115b6 | 2021-10-25 16:13:42 +0100 | [diff] [blame] | 32 | - ``FVP_Base_Cortex-A65x4`` |
| 33 | - ``FVP_Base_Cortex-A710x4`` |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 34 | - ``FVP_Base_Cortex-A72x4-A53x4`` |
| 35 | - ``FVP_Base_Cortex-A72x4`` |
| 36 | - ``FVP_Base_Cortex-A73x4-A53x4`` |
| 37 | - ``FVP_Base_Cortex-A73x4`` |
| 38 | - ``FVP_Base_Cortex-A75x4`` |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 39 | - ``FVP_Base_Cortex-A76AEx4`` |
| 40 | - ``FVP_Base_Cortex-A76AEx8`` |
Maksims Svecovs | fd115b6 | 2021-10-25 16:13:42 +0100 | [diff] [blame] | 41 | - ``FVP_Base_Cortex-A76x4`` |
laurenw-arm | 0a9b8d0 | 2020-04-15 17:48:36 -0500 | [diff] [blame] | 42 | - ``FVP_Base_Cortex-A77x4`` |
Manish V Badarkhe | bfd177e | 2020-10-02 07:27:27 +0100 | [diff] [blame] | 43 | - ``FVP_Base_Cortex-A78x4`` |
Alexei Fedorov | d6781fb | 2020-07-20 13:26:49 +0100 | [diff] [blame] | 44 | - ``FVP_Base_Neoverse-E1x1`` |
| 45 | - ``FVP_Base_Neoverse-E1x2`` |
| 46 | - ``FVP_Base_Neoverse-E1x4`` |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 47 | - ``FVP_Base_Neoverse-N1x4`` |
laurenw-arm | 74d3338 | 2021-05-04 10:23:14 -0500 | [diff] [blame] | 48 | - ``FVP_Base_Neoverse-N2x4`` (Version 11.12 build 38) |
Manish V Badarkhe | bfd177e | 2020-10-02 07:27:27 +0100 | [diff] [blame] | 49 | - ``FVP_Base_Neoverse-V1x4`` |
Maksims Svecovs | fd115b6 | 2021-10-25 16:13:42 +0100 | [diff] [blame] | 50 | - ``FVP_Base_RevC-2xAEMvA`` (For certain configurations also uses 0.0/6557) |
Maksims Svecovs | 208a886 | 2022-04-28 16:52:37 +0100 | [diff] [blame] | 51 | - ``FVP_CSS_SGI-575`` (Version 11.17/33) |
| 52 | - ``FVP_Morello`` (Version 0.11/33) |
| 53 | - ``FVP_RD_E1_edge`` (Version 11.17/33) |
| 54 | - ``FVP_RD_N1_edge_dual`` (Version 11.17/33) |
| 55 | - ``FVP_RD_N1_edge`` (Version 11.17/33) |
| 56 | - ``FVP_RD_V1`` (Version 11.17/33) |
Maksims Svecovs | fd115b6 | 2021-10-25 16:13:42 +0100 | [diff] [blame] | 57 | - ``FVP_TC0`` |
| 58 | - ``FVP_TC1`` |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 59 | |
| 60 | The latest version of the AArch32 build of TF-A has been tested on the |
| 61 | following Arm FVPs without shifted affinities, and that do not support threaded |
| 62 | CPU cores (64-bit host machine only). |
| 63 | |
Manish V Badarkhe | bfd177e | 2020-10-02 07:27:27 +0100 | [diff] [blame] | 64 | - ``FVP_Base_AEMvA`` |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 65 | - ``FVP_Base_AEMv8A-AEMv8A`` |
| 66 | - ``FVP_Base_Cortex-A32x4`` |
| 67 | |
| 68 | .. note:: |
| 69 | The ``FVP_Base_RevC-2xAEMv8A`` FVP only supports shifted affinities, which |
| 70 | is not compatible with legacy GIC configurations. Therefore this FVP does not |
| 71 | support these legacy GIC configurations. |
| 72 | |
| 73 | The *Foundation* and *Base* FVPs can be downloaded free of charge. See the `Arm |
| 74 | FVP website`_. The Cortex-A models listed above are also available to download |
| 75 | from `Arm's website`_. |
| 76 | |
| 77 | .. note:: |
| 78 | The build numbers quoted above are those reported by launching the FVP |
| 79 | with the ``--version`` parameter. |
| 80 | |
| 81 | .. note:: |
| 82 | Linaro provides a ramdisk image in prebuilt FVP configurations and full |
| 83 | file systems that can be downloaded separately. To run an FVP with a virtio |
| 84 | file system image an additional FVP configuration option |
| 85 | ``-C bp.virtioblockdevice.image_path="<path-to>/<file-system-image>`` can be |
| 86 | used. |
| 87 | |
| 88 | .. note:: |
| 89 | The software will not work on Version 1.0 of the Foundation FVP. |
| 90 | The commands below would report an ``unhandled argument`` error in this case. |
| 91 | |
| 92 | .. note:: |
| 93 | FVPs can be launched with ``--cadi-server`` option such that a |
| 94 | CADI-compliant debugger (for example, Arm DS-5) can connect to and control |
| 95 | its execution. |
| 96 | |
| 97 | .. warning:: |
| 98 | Since FVP model Version 11.0 Build 11.0.34 and Version 8.5 Build 0.8.5202 |
| 99 | the internal synchronisation timings changed compared to older versions of |
| 100 | the models. The models can be launched with ``-Q 100`` option if they are |
| 101 | required to match the run time characteristics of the older versions. |
| 102 | |
Zelalem | c005fdf | 2021-06-01 17:05:16 -0500 | [diff] [blame] | 103 | All the above platforms have been tested with `Linaro Release 20.01`_. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 104 | |
| 105 | .. _build_options_arm_fvp_platform: |
| 106 | |
| 107 | Arm FVP Platform Specific Build Options |
| 108 | --------------------------------------- |
| 109 | |
| 110 | - ``FVP_CLUSTER_COUNT`` : Configures the cluster count to be used to |
| 111 | build the topology tree within TF-A. By default TF-A is configured for dual |
| 112 | cluster topology and this option can be used to override the default value. |
| 113 | |
| 114 | - ``FVP_INTERCONNECT_DRIVER``: Selects the interconnect driver to be built. The |
| 115 | default interconnect driver depends on the value of ``FVP_CLUSTER_COUNT`` as |
| 116 | explained in the options below: |
| 117 | |
| 118 | - ``FVP_CCI`` : The CCI driver is selected. This is the default |
| 119 | if 0 < ``FVP_CLUSTER_COUNT`` <= 2. |
| 120 | - ``FVP_CCN`` : The CCN driver is selected. This is the default |
| 121 | if ``FVP_CLUSTER_COUNT`` > 2. |
| 122 | |
| 123 | - ``FVP_MAX_CPUS_PER_CLUSTER``: Sets the maximum number of CPUs implemented in |
| 124 | a single cluster. This option defaults to 4. |
| 125 | |
| 126 | - ``FVP_MAX_PE_PER_CPU``: Sets the maximum number of PEs implemented on any CPU |
| 127 | in the system. This option defaults to 1. Note that the build option |
| 128 | ``ARM_PLAT_MT`` doesn't have any effect on FVP platforms. |
| 129 | |
| 130 | - ``FVP_USE_GIC_DRIVER`` : Selects the GIC driver to be built. Options: |
| 131 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 132 | - ``FVP_GICV2`` : The GICv2 only driver is selected |
| 133 | - ``FVP_GICV3`` : The GICv3 only driver is selected (default option) |
| 134 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 135 | - ``FVP_HW_CONFIG_DTS`` : Specify the path to the DTS file to be compiled |
| 136 | to DTB and packaged in FIP as the HW_CONFIG. See :ref:`Firmware Design` for |
| 137 | details on HW_CONFIG. By default, this is initialized to a sensible DTS |
| 138 | file in ``fdts/`` folder depending on other build options. But some cases, |
| 139 | like shifted affinity format for MPIDR, cannot be detected at build time |
| 140 | and this option is needed to specify the appropriate DTS file. |
| 141 | |
| 142 | - ``FVP_HW_CONFIG`` : Specify the path to the HW_CONFIG blob to be packaged in |
| 143 | FIP. See :ref:`Firmware Design` for details on HW_CONFIG. This option is |
| 144 | similar to the ``FVP_HW_CONFIG_DTS`` option, but it directly specifies the |
| 145 | HW_CONFIG blob instead of the DTS file. This option is useful to override |
| 146 | the default HW_CONFIG selected by the build system. |
| 147 | |
Manish V Badarkhe | 2f4c044 | 2021-01-24 20:39:39 +0000 | [diff] [blame] | 148 | - ``FVP_GICR_REGION_PROTECTION``: Mark the redistributor pages of |
| 149 | inactive/fused CPU cores as read-only. The default value of this option |
| 150 | is ``0``, which means the redistributor pages of all CPU cores are marked |
| 151 | as read and write. |
| 152 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 153 | Booting Firmware Update images |
| 154 | ------------------------------ |
| 155 | |
| 156 | When Firmware Update (FWU) is enabled there are at least 2 new images |
| 157 | that have to be loaded, the Non-Secure FWU ROM (NS-BL1U), and the |
| 158 | FWU FIP. |
| 159 | |
| 160 | The additional fip images must be loaded with: |
| 161 | |
| 162 | :: |
| 163 | |
| 164 | --data cluster0.cpu0="<path_to>/ns_bl1u.bin"@0x0beb8000 [ns_bl1u_base_address] |
| 165 | --data cluster0.cpu0="<path_to>/fwu_fip.bin"@0x08400000 [ns_bl2u_base_address] |
| 166 | |
| 167 | The address ns_bl1u_base_address is the value of NS_BL1U_BASE. |
| 168 | In the same way, the address ns_bl2u_base_address is the value of |
| 169 | NS_BL2U_BASE. |
| 170 | |
| 171 | Booting an EL3 payload |
| 172 | ---------------------- |
| 173 | |
| 174 | The EL3 payloads boot flow requires the CPU's mailbox to be cleared at reset for |
| 175 | the secondary CPUs holding pen to work properly. Unfortunately, its reset value |
| 176 | is undefined on the FVP platform and the FVP platform code doesn't clear it. |
| 177 | Therefore, one must modify the way the model is normally invoked in order to |
| 178 | clear the mailbox at start-up. |
| 179 | |
| 180 | One way to do that is to create an 8-byte file containing all zero bytes using |
| 181 | the following command: |
| 182 | |
| 183 | .. code:: shell |
| 184 | |
| 185 | dd if=/dev/zero of=mailbox.dat bs=1 count=8 |
| 186 | |
| 187 | and pre-load it into the FVP memory at the mailbox address (i.e. ``0x04000000``) |
| 188 | using the following model parameters: |
| 189 | |
| 190 | :: |
| 191 | |
| 192 | --data cluster0.cpu0=mailbox.dat@0x04000000 [Base FVPs] |
| 193 | --data=mailbox.dat@0x04000000 [Foundation FVP] |
| 194 | |
| 195 | To provide the model with the EL3 payload image, the following methods may be |
| 196 | used: |
| 197 | |
| 198 | #. If the EL3 payload is able to execute in place, it may be programmed into |
| 199 | flash memory. On Base Cortex and AEM FVPs, the following model parameter |
| 200 | loads it at the base address of the NOR FLASH1 (the NOR FLASH0 is already |
| 201 | used for the FIP): |
| 202 | |
| 203 | :: |
| 204 | |
| 205 | -C bp.flashloader1.fname="<path-to>/<el3-payload>" |
| 206 | |
| 207 | On Foundation FVP, there is no flash loader component and the EL3 payload |
| 208 | may be programmed anywhere in flash using method 3 below. |
| 209 | |
| 210 | #. When using the ``SPIN_ON_BL1_EXIT=1`` loading method, the following DS-5 |
| 211 | command may be used to load the EL3 payload ELF image over JTAG: |
| 212 | |
| 213 | :: |
| 214 | |
| 215 | load <path-to>/el3-payload.elf |
| 216 | |
| 217 | #. The EL3 payload may be pre-loaded in volatile memory using the following |
| 218 | model parameters: |
| 219 | |
| 220 | :: |
| 221 | |
| 222 | --data cluster0.cpu0="<path-to>/el3-payload>"@address [Base FVPs] |
| 223 | --data="<path-to>/<el3-payload>"@address [Foundation FVP] |
| 224 | |
| 225 | The address provided to the FVP must match the ``EL3_PAYLOAD_BASE`` address |
| 226 | used when building TF-A. |
| 227 | |
| 228 | Booting a preloaded kernel image (Base FVP) |
| 229 | ------------------------------------------- |
| 230 | |
| 231 | The following example uses a simplified boot flow by directly jumping from the |
| 232 | TF-A to the Linux kernel, which will use a ramdisk as filesystem. This can be |
| 233 | useful if both the kernel and the device tree blob (DTB) are already present in |
| 234 | memory (like in FVP). |
| 235 | |
| 236 | For example, if the kernel is loaded at ``0x80080000`` and the DTB is loaded at |
| 237 | address ``0x82000000``, the firmware can be built like this: |
| 238 | |
| 239 | .. code:: shell |
| 240 | |
Madhukar Pappireddy | c0ba248 | 2020-01-10 16:11:18 -0600 | [diff] [blame] | 241 | CROSS_COMPILE=aarch64-none-elf- \ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 242 | make PLAT=fvp DEBUG=1 \ |
| 243 | RESET_TO_BL31=1 \ |
| 244 | ARM_LINUX_KERNEL_AS_BL33=1 \ |
| 245 | PRELOADED_BL33_BASE=0x80080000 \ |
| 246 | ARM_PRELOADED_DTB_BASE=0x82000000 \ |
| 247 | all fip |
| 248 | |
| 249 | Now, it is needed to modify the DTB so that the kernel knows the address of the |
| 250 | ramdisk. The following script generates a patched DTB from the provided one, |
| 251 | assuming that the ramdisk is loaded at address ``0x84000000``. Note that this |
| 252 | script assumes that the user is using a ramdisk image prepared for U-Boot, like |
| 253 | the ones provided by Linaro. If using a ramdisk without this header,the ``0x40`` |
| 254 | offset in ``INITRD_START`` has to be removed. |
| 255 | |
| 256 | .. code:: bash |
| 257 | |
| 258 | #!/bin/bash |
| 259 | |
| 260 | # Path to the input DTB |
| 261 | KERNEL_DTB=<path-to>/<fdt> |
| 262 | # Path to the output DTB |
| 263 | PATCHED_KERNEL_DTB=<path-to>/<patched-fdt> |
| 264 | # Base address of the ramdisk |
| 265 | INITRD_BASE=0x84000000 |
| 266 | # Path to the ramdisk |
| 267 | INITRD=<path-to>/<ramdisk.img> |
| 268 | |
| 269 | # Skip uboot header (64 bytes) |
| 270 | INITRD_START=$(printf "0x%x" $((${INITRD_BASE} + 0x40)) ) |
| 271 | INITRD_SIZE=$(stat -Lc %s ${INITRD}) |
| 272 | INITRD_END=$(printf "0x%x" $((${INITRD_BASE} + ${INITRD_SIZE})) ) |
| 273 | |
| 274 | CHOSEN_NODE=$(echo \ |
| 275 | "/ { \ |
| 276 | chosen { \ |
| 277 | linux,initrd-start = <${INITRD_START}>; \ |
| 278 | linux,initrd-end = <${INITRD_END}>; \ |
| 279 | }; \ |
| 280 | };") |
| 281 | |
| 282 | echo $(dtc -O dts -I dtb ${KERNEL_DTB}) ${CHOSEN_NODE} | \ |
| 283 | dtc -O dtb -o ${PATCHED_KERNEL_DTB} - |
| 284 | |
| 285 | And the FVP binary can be run with the following command: |
| 286 | |
| 287 | .. code:: shell |
| 288 | |
| 289 | <path-to>/FVP_Base_AEMv8A-AEMv8A \ |
| 290 | -C pctl.startup=0.0.0.0 \ |
| 291 | -C bp.secure_memory=1 \ |
| 292 | -C cluster0.NUM_CORES=4 \ |
| 293 | -C cluster1.NUM_CORES=4 \ |
| 294 | -C cache_state_modelled=1 \ |
Alexei Fedorov | ea0424f | 2020-02-17 13:38:35 +0000 | [diff] [blame] | 295 | -C cluster0.cpu0.RVBAR=0x04001000 \ |
| 296 | -C cluster0.cpu1.RVBAR=0x04001000 \ |
| 297 | -C cluster0.cpu2.RVBAR=0x04001000 \ |
| 298 | -C cluster0.cpu3.RVBAR=0x04001000 \ |
| 299 | -C cluster1.cpu0.RVBAR=0x04001000 \ |
| 300 | -C cluster1.cpu1.RVBAR=0x04001000 \ |
| 301 | -C cluster1.cpu2.RVBAR=0x04001000 \ |
| 302 | -C cluster1.cpu3.RVBAR=0x04001000 \ |
| 303 | --data cluster0.cpu0="<path-to>/bl31.bin"@0x04001000 \ |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 304 | --data cluster0.cpu0="<path-to>/<patched-fdt>"@0x82000000 \ |
| 305 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 306 | --data cluster0.cpu0="<path-to>/<ramdisk.img>"@0x84000000 |
| 307 | |
| 308 | Obtaining the Flattened Device Trees |
| 309 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 310 | |
| 311 | Depending on the FVP configuration and Linux configuration used, different |
| 312 | FDT files are required. FDT source files for the Foundation and Base FVPs can |
| 313 | be found in the TF-A source directory under ``fdts/``. The Foundation FVP has |
| 314 | a subset of the Base FVP components. For example, the Foundation FVP lacks |
| 315 | CLCD and MMC support, and has only one CPU cluster. |
| 316 | |
| 317 | .. note:: |
| 318 | It is not recommended to use the FDTs built along the kernel because not |
| 319 | all FDTs are available from there. |
| 320 | |
| 321 | The dynamic configuration capability is enabled in the firmware for FVPs. |
| 322 | This means that the firmware can authenticate and load the FDT if present in |
| 323 | FIP. A default FDT is packaged into FIP during the build based on |
| 324 | the build configuration. This can be overridden by using the ``FVP_HW_CONFIG`` |
| 325 | or ``FVP_HW_CONFIG_DTS`` build options (refer to |
| 326 | :ref:`build_options_arm_fvp_platform` for details on the options). |
| 327 | |
| 328 | - ``fvp-base-gicv2-psci.dts`` |
| 329 | |
Andre Przywara | 04cf78f | 2022-08-19 10:26:00 +0100 | [diff] [blame] | 330 | For use with models such as the Cortex-A57-A53 or Cortex-A32 Base FVPs |
| 331 | without shifted affinities and with Base memory map configuration. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 332 | |
| 333 | - ``fvp-base-gicv3-psci.dts`` |
| 334 | |
Andre Przywara | 04cf78f | 2022-08-19 10:26:00 +0100 | [diff] [blame] | 335 | For use with models such as the Cortex-A57-A53 or Cortex-A32 Base FVPs |
| 336 | without shifted affinities and with Base memory map configuration and |
| 337 | Linux GICv3 support. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 338 | |
| 339 | - ``fvp-base-gicv3-psci-1t.dts`` |
| 340 | |
| 341 | For use with models such as the AEMv8-RevC Base FVP with shifted affinities, |
| 342 | single threaded CPUs, Base memory map configuration and Linux GICv3 support. |
| 343 | |
| 344 | - ``fvp-base-gicv3-psci-dynamiq.dts`` |
| 345 | |
| 346 | For use with models as the Cortex-A55-A75 Base FVPs with shifted affinities, |
| 347 | single cluster, single threaded CPUs, Base memory map configuration and Linux |
| 348 | GICv3 support. |
| 349 | |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 350 | - ``fvp-foundation-gicv2-psci.dts`` |
| 351 | |
| 352 | For use with Foundation FVP with Base memory map configuration. |
| 353 | |
| 354 | - ``fvp-foundation-gicv3-psci.dts`` |
| 355 | |
| 356 | (Default) For use with Foundation FVP with Base memory map configuration |
| 357 | and Linux GICv3 support. |
| 358 | |
| 359 | |
| 360 | Running on the Foundation FVP with reset to BL1 entrypoint |
| 361 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 362 | |
| 363 | The following ``Foundation_Platform`` parameters should be used to boot Linux with |
| 364 | 4 CPUs using the AArch64 build of TF-A. |
| 365 | |
| 366 | .. code:: shell |
| 367 | |
| 368 | <path-to>/Foundation_Platform \ |
| 369 | --cores=4 \ |
| 370 | --arm-v8.0 \ |
| 371 | --secure-memory \ |
| 372 | --visualization \ |
| 373 | --gicv3 \ |
| 374 | --data="<path-to>/<bl1-binary>"@0x0 \ |
| 375 | --data="<path-to>/<FIP-binary>"@0x08000000 \ |
| 376 | --data="<path-to>/<kernel-binary>"@0x80080000 \ |
| 377 | --data="<path-to>/<ramdisk-binary>"@0x84000000 |
| 378 | |
| 379 | Notes: |
| 380 | |
| 381 | - BL1 is loaded at the start of the Trusted ROM. |
| 382 | - The Firmware Image Package is loaded at the start of NOR FLASH0. |
| 383 | - The firmware loads the FDT packaged in FIP to the DRAM. The FDT load address |
Manish V Badarkhe | 393caac | 2022-04-25 20:21:28 +0100 | [diff] [blame] | 384 | is specified via the ``load-address`` property in the ``hw-config`` node of |
| 385 | `FW_CONFIG for FVP`_. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 386 | - The default use-case for the Foundation FVP is to use the ``--gicv3`` option |
| 387 | and enable the GICv3 device in the model. Note that without this option, |
| 388 | the Foundation FVP defaults to legacy (Versatile Express) memory map which |
| 389 | is not supported by TF-A. |
| 390 | - In order for TF-A to run correctly on the Foundation FVP, the architecture |
| 391 | versions must match. The Foundation FVP defaults to the highest v8.x |
| 392 | version it supports but the default build for TF-A is for v8.0. To avoid |
| 393 | issues either start the Foundation FVP to use v8.0 architecture using the |
| 394 | ``--arm-v8.0`` option, or build TF-A with an appropriate value for |
| 395 | ``ARM_ARCH_MINOR``. |
| 396 | |
| 397 | Running on the AEMv8 Base FVP with reset to BL1 entrypoint |
| 398 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 399 | |
| 400 | The following ``FVP_Base_RevC-2xAEMv8A`` parameters should be used to boot Linux |
| 401 | with 8 CPUs using the AArch64 build of TF-A. |
| 402 | |
| 403 | .. code:: shell |
| 404 | |
| 405 | <path-to>/FVP_Base_RevC-2xAEMv8A \ |
| 406 | -C pctl.startup=0.0.0.0 \ |
| 407 | -C bp.secure_memory=1 \ |
| 408 | -C bp.tzc_400.diagnostics=1 \ |
| 409 | -C cluster0.NUM_CORES=4 \ |
| 410 | -C cluster1.NUM_CORES=4 \ |
| 411 | -C cache_state_modelled=1 \ |
| 412 | -C bp.secureflashloader.fname="<path-to>/<bl1-binary>" \ |
| 413 | -C bp.flashloader0.fname="<path-to>/<FIP-binary>" \ |
| 414 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 415 | --data cluster0.cpu0="<path-to>/<ramdisk>"@0x84000000 |
| 416 | |
| 417 | .. note:: |
| 418 | The ``FVP_Base_RevC-2xAEMv8A`` has shifted affinities and requires |
| 419 | a specific DTS for all the CPUs to be loaded. |
| 420 | |
| 421 | Running on the AEMv8 Base FVP (AArch32) with reset to BL1 entrypoint |
| 422 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 423 | |
| 424 | The following ``FVP_Base_AEMv8A-AEMv8A`` parameters should be used to boot Linux |
| 425 | with 8 CPUs using the AArch32 build of TF-A. |
| 426 | |
| 427 | .. code:: shell |
| 428 | |
| 429 | <path-to>/FVP_Base_AEMv8A-AEMv8A \ |
| 430 | -C pctl.startup=0.0.0.0 \ |
| 431 | -C bp.secure_memory=1 \ |
| 432 | -C bp.tzc_400.diagnostics=1 \ |
| 433 | -C cluster0.NUM_CORES=4 \ |
| 434 | -C cluster1.NUM_CORES=4 \ |
| 435 | -C cache_state_modelled=1 \ |
| 436 | -C cluster0.cpu0.CONFIG64=0 \ |
| 437 | -C cluster0.cpu1.CONFIG64=0 \ |
| 438 | -C cluster0.cpu2.CONFIG64=0 \ |
| 439 | -C cluster0.cpu3.CONFIG64=0 \ |
| 440 | -C cluster1.cpu0.CONFIG64=0 \ |
| 441 | -C cluster1.cpu1.CONFIG64=0 \ |
| 442 | -C cluster1.cpu2.CONFIG64=0 \ |
| 443 | -C cluster1.cpu3.CONFIG64=0 \ |
| 444 | -C bp.secureflashloader.fname="<path-to>/<bl1-binary>" \ |
| 445 | -C bp.flashloader0.fname="<path-to>/<FIP-binary>" \ |
| 446 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 447 | --data cluster0.cpu0="<path-to>/<ramdisk>"@0x84000000 |
| 448 | |
| 449 | Running on the Cortex-A57-A53 Base FVP with reset to BL1 entrypoint |
| 450 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 451 | |
| 452 | The following ``FVP_Base_Cortex-A57x4-A53x4`` model parameters should be used to |
| 453 | boot Linux with 8 CPUs using the AArch64 build of TF-A. |
| 454 | |
| 455 | .. code:: shell |
| 456 | |
| 457 | <path-to>/FVP_Base_Cortex-A57x4-A53x4 \ |
| 458 | -C pctl.startup=0.0.0.0 \ |
| 459 | -C bp.secure_memory=1 \ |
| 460 | -C bp.tzc_400.diagnostics=1 \ |
| 461 | -C cache_state_modelled=1 \ |
| 462 | -C bp.secureflashloader.fname="<path-to>/<bl1-binary>" \ |
| 463 | -C bp.flashloader0.fname="<path-to>/<FIP-binary>" \ |
| 464 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 465 | --data cluster0.cpu0="<path-to>/<ramdisk>"@0x84000000 |
| 466 | |
| 467 | Running on the Cortex-A32 Base FVP (AArch32) with reset to BL1 entrypoint |
| 468 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 469 | |
| 470 | The following ``FVP_Base_Cortex-A32x4`` model parameters should be used to |
| 471 | boot Linux with 4 CPUs using the AArch32 build of TF-A. |
| 472 | |
| 473 | .. code:: shell |
| 474 | |
| 475 | <path-to>/FVP_Base_Cortex-A32x4 \ |
| 476 | -C pctl.startup=0.0.0.0 \ |
| 477 | -C bp.secure_memory=1 \ |
| 478 | -C bp.tzc_400.diagnostics=1 \ |
| 479 | -C cache_state_modelled=1 \ |
| 480 | -C bp.secureflashloader.fname="<path-to>/<bl1-binary>" \ |
| 481 | -C bp.flashloader0.fname="<path-to>/<FIP-binary>" \ |
| 482 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 483 | --data cluster0.cpu0="<path-to>/<ramdisk>"@0x84000000 |
| 484 | |
| 485 | |
| 486 | Running on the AEMv8 Base FVP with reset to BL31 entrypoint |
| 487 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 488 | |
| 489 | The following ``FVP_Base_RevC-2xAEMv8A`` parameters should be used to boot Linux |
| 490 | with 8 CPUs using the AArch64 build of TF-A. |
| 491 | |
| 492 | .. code:: shell |
| 493 | |
| 494 | <path-to>/FVP_Base_RevC-2xAEMv8A \ |
| 495 | -C pctl.startup=0.0.0.0 \ |
| 496 | -C bp.secure_memory=1 \ |
| 497 | -C bp.tzc_400.diagnostics=1 \ |
| 498 | -C cluster0.NUM_CORES=4 \ |
| 499 | -C cluster1.NUM_CORES=4 \ |
| 500 | -C cache_state_modelled=1 \ |
| 501 | -C cluster0.cpu0.RVBAR=0x04010000 \ |
| 502 | -C cluster0.cpu1.RVBAR=0x04010000 \ |
| 503 | -C cluster0.cpu2.RVBAR=0x04010000 \ |
| 504 | -C cluster0.cpu3.RVBAR=0x04010000 \ |
| 505 | -C cluster1.cpu0.RVBAR=0x04010000 \ |
| 506 | -C cluster1.cpu1.RVBAR=0x04010000 \ |
| 507 | -C cluster1.cpu2.RVBAR=0x04010000 \ |
| 508 | -C cluster1.cpu3.RVBAR=0x04010000 \ |
| 509 | --data cluster0.cpu0="<path-to>/<bl31-binary>"@0x04010000 \ |
| 510 | --data cluster0.cpu0="<path-to>/<bl32-binary>"@0xff000000 \ |
| 511 | --data cluster0.cpu0="<path-to>/<bl33-binary>"@0x88000000 \ |
| 512 | --data cluster0.cpu0="<path-to>/<fdt>"@0x82000000 \ |
| 513 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 514 | --data cluster0.cpu0="<path-to>/<ramdisk>"@0x84000000 |
| 515 | |
| 516 | Notes: |
| 517 | |
Manish Pandey | 928da86 | 2021-06-10 15:22:48 +0100 | [diff] [blame] | 518 | - Position Independent Executable (PIE) support is enabled in this |
| 519 | config allowing BL31 to be loaded at any valid address for execution. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 520 | |
| 521 | - Since a FIP is not loaded when using BL31 as reset entrypoint, the |
| 522 | ``--data="<path-to><bl31|bl32|bl33-binary>"@<base-address-of-binary>`` |
| 523 | parameter is needed to load the individual bootloader images in memory. |
| 524 | BL32 image is only needed if BL31 has been built to expect a Secure-EL1 |
| 525 | Payload. For the same reason, the FDT needs to be compiled from the DT source |
| 526 | and loaded via the ``--data cluster0.cpu0="<path-to>/<fdt>"@0x82000000`` |
| 527 | parameter. |
| 528 | |
| 529 | - The ``FVP_Base_RevC-2xAEMv8A`` has shifted affinities and requires a |
| 530 | specific DTS for all the CPUs to be loaded. |
| 531 | |
| 532 | - The ``-C cluster<X>.cpu<Y>.RVBAR=@<base-address-of-bl31>`` parameter, where |
| 533 | X and Y are the cluster and CPU numbers respectively, is used to set the |
| 534 | reset vector for each core. |
| 535 | |
| 536 | - Changing the default value of ``ARM_TSP_RAM_LOCATION`` will also require |
| 537 | changing the value of |
| 538 | ``--data="<path-to><bl32-binary>"@<base-address-of-bl32>`` to the new value of |
| 539 | ``BL32_BASE``. |
| 540 | |
| 541 | |
| 542 | Running on the AEMv8 Base FVP (AArch32) with reset to SP_MIN entrypoint |
| 543 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 544 | |
| 545 | The following ``FVP_Base_AEMv8A-AEMv8A`` parameters should be used to boot Linux |
| 546 | with 8 CPUs using the AArch32 build of TF-A. |
| 547 | |
| 548 | .. code:: shell |
| 549 | |
| 550 | <path-to>/FVP_Base_AEMv8A-AEMv8A \ |
| 551 | -C pctl.startup=0.0.0.0 \ |
| 552 | -C bp.secure_memory=1 \ |
| 553 | -C bp.tzc_400.diagnostics=1 \ |
| 554 | -C cluster0.NUM_CORES=4 \ |
| 555 | -C cluster1.NUM_CORES=4 \ |
| 556 | -C cache_state_modelled=1 \ |
| 557 | -C cluster0.cpu0.CONFIG64=0 \ |
| 558 | -C cluster0.cpu1.CONFIG64=0 \ |
| 559 | -C cluster0.cpu2.CONFIG64=0 \ |
| 560 | -C cluster0.cpu3.CONFIG64=0 \ |
| 561 | -C cluster1.cpu0.CONFIG64=0 \ |
| 562 | -C cluster1.cpu1.CONFIG64=0 \ |
| 563 | -C cluster1.cpu2.CONFIG64=0 \ |
| 564 | -C cluster1.cpu3.CONFIG64=0 \ |
| 565 | -C cluster0.cpu0.RVBAR=0x04002000 \ |
| 566 | -C cluster0.cpu1.RVBAR=0x04002000 \ |
| 567 | -C cluster0.cpu2.RVBAR=0x04002000 \ |
| 568 | -C cluster0.cpu3.RVBAR=0x04002000 \ |
| 569 | -C cluster1.cpu0.RVBAR=0x04002000 \ |
| 570 | -C cluster1.cpu1.RVBAR=0x04002000 \ |
| 571 | -C cluster1.cpu2.RVBAR=0x04002000 \ |
| 572 | -C cluster1.cpu3.RVBAR=0x04002000 \ |
| 573 | --data cluster0.cpu0="<path-to>/<bl32-binary>"@0x04002000 \ |
| 574 | --data cluster0.cpu0="<path-to>/<bl33-binary>"@0x88000000 \ |
| 575 | --data cluster0.cpu0="<path-to>/<fdt>"@0x82000000 \ |
| 576 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 577 | --data cluster0.cpu0="<path-to>/<ramdisk>"@0x84000000 |
| 578 | |
| 579 | .. note:: |
Manish Pandey | 928da86 | 2021-06-10 15:22:48 +0100 | [diff] [blame] | 580 | Position Independent Executable (PIE) support is enabled in this |
| 581 | config allowing SP_MIN to be loaded at any valid address for execution. |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 582 | |
| 583 | Running on the Cortex-A57-A53 Base FVP with reset to BL31 entrypoint |
| 584 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 585 | |
| 586 | The following ``FVP_Base_Cortex-A57x4-A53x4`` model parameters should be used to |
| 587 | boot Linux with 8 CPUs using the AArch64 build of TF-A. |
| 588 | |
| 589 | .. code:: shell |
| 590 | |
| 591 | <path-to>/FVP_Base_Cortex-A57x4-A53x4 \ |
| 592 | -C pctl.startup=0.0.0.0 \ |
| 593 | -C bp.secure_memory=1 \ |
| 594 | -C bp.tzc_400.diagnostics=1 \ |
| 595 | -C cache_state_modelled=1 \ |
| 596 | -C cluster0.cpu0.RVBARADDR=0x04010000 \ |
| 597 | -C cluster0.cpu1.RVBARADDR=0x04010000 \ |
| 598 | -C cluster0.cpu2.RVBARADDR=0x04010000 \ |
| 599 | -C cluster0.cpu3.RVBARADDR=0x04010000 \ |
| 600 | -C cluster1.cpu0.RVBARADDR=0x04010000 \ |
| 601 | -C cluster1.cpu1.RVBARADDR=0x04010000 \ |
| 602 | -C cluster1.cpu2.RVBARADDR=0x04010000 \ |
| 603 | -C cluster1.cpu3.RVBARADDR=0x04010000 \ |
| 604 | --data cluster0.cpu0="<path-to>/<bl31-binary>"@0x04010000 \ |
| 605 | --data cluster0.cpu0="<path-to>/<bl32-binary>"@0xff000000 \ |
| 606 | --data cluster0.cpu0="<path-to>/<bl33-binary>"@0x88000000 \ |
| 607 | --data cluster0.cpu0="<path-to>/<fdt>"@0x82000000 \ |
| 608 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 609 | --data cluster0.cpu0="<path-to>/<ramdisk>"@0x84000000 |
| 610 | |
| 611 | Running on the Cortex-A32 Base FVP (AArch32) with reset to SP_MIN entrypoint |
| 612 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 613 | |
| 614 | The following ``FVP_Base_Cortex-A32x4`` model parameters should be used to |
| 615 | boot Linux with 4 CPUs using the AArch32 build of TF-A. |
| 616 | |
| 617 | .. code:: shell |
| 618 | |
| 619 | <path-to>/FVP_Base_Cortex-A32x4 \ |
| 620 | -C pctl.startup=0.0.0.0 \ |
| 621 | -C bp.secure_memory=1 \ |
| 622 | -C bp.tzc_400.diagnostics=1 \ |
| 623 | -C cache_state_modelled=1 \ |
| 624 | -C cluster0.cpu0.RVBARADDR=0x04002000 \ |
| 625 | -C cluster0.cpu1.RVBARADDR=0x04002000 \ |
| 626 | -C cluster0.cpu2.RVBARADDR=0x04002000 \ |
| 627 | -C cluster0.cpu3.RVBARADDR=0x04002000 \ |
| 628 | --data cluster0.cpu0="<path-to>/<bl32-binary>"@0x04002000 \ |
| 629 | --data cluster0.cpu0="<path-to>/<bl33-binary>"@0x88000000 \ |
| 630 | --data cluster0.cpu0="<path-to>/<fdt>"@0x82000000 \ |
| 631 | --data cluster0.cpu0="<path-to>/<kernel-binary>"@0x80080000 \ |
| 632 | --data cluster0.cpu0="<path-to>/<ramdisk>"@0x84000000 |
| 633 | |
| 634 | -------------- |
| 635 | |
Manish V Badarkhe | 393caac | 2022-04-25 20:21:28 +0100 | [diff] [blame] | 636 | *Copyright (c) 2019-2022, Arm Limited. All rights reserved.* |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 637 | |
Manish V Badarkhe | 393caac | 2022-04-25 20:21:28 +0100 | [diff] [blame] | 638 | .. _FW_CONFIG for FVP: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/arm/board/fvp/fdts/fvp_fw_config.dts |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 639 | .. _Arm's website: `FVP models`_ |
| 640 | .. _FVP models: https://developer.arm.com/products/system-design/fixed-virtual-platforms |
Zelalem | c005fdf | 2021-06-01 17:05:16 -0500 | [diff] [blame] | 641 | .. _Linaro Release 20.01: http://releases.linaro.org/members/arm/platforms/20.01 |
Paul Beesley | d2fcc4e | 2019-05-29 13:59:40 +0100 | [diff] [blame] | 642 | .. _Arm FVP website: https://developer.arm.com/products/system-design/fixed-virtual-platforms |