xref: /rk3399_ARM-atf/docs/plat/arm/arm-build-options.rst (revision 2f5fd8267a2159338924d6fcaa0b30de98b1aa0c)
143f35ef5SPaul BeesleyArm Development Platform Build Options
243f35ef5SPaul Beesley======================================
343f35ef5SPaul Beesley
443f35ef5SPaul BeesleyArm Platform Build Options
543f35ef5SPaul Beesley--------------------------
643f35ef5SPaul Beesley
743f35ef5SPaul Beesley-  ``ARM_BL31_IN_DRAM``: Boolean option to select loading of BL31 in TZC secured
843f35ef5SPaul Beesley   DRAM. By default, BL31 is in the secure SRAM. Set this flag to 1 to load
943f35ef5SPaul Beesley   BL31 in TZC secured DRAM. If TSP is present, then setting this option also
1043f35ef5SPaul Beesley   sets the TSP location to DRAM and ignores the ``ARM_TSP_RAM_LOCATION`` build
1143f35ef5SPaul Beesley   flag.
1243f35ef5SPaul Beesley
1343f35ef5SPaul Beesley-  ``ARM_CONFIG_CNTACR``: boolean option to unlock access to the ``CNTBase<N>``
1443f35ef5SPaul Beesley   frame registers by setting the ``CNTCTLBase.CNTACR<N>`` register bits. The
1543f35ef5SPaul Beesley   frame number ``<N>`` is defined by ``PLAT_ARM_NSTIMER_FRAME_ID``, which
1643f35ef5SPaul Beesley   should match the frame used by the Non-Secure image (normally the Linux
1743f35ef5SPaul Beesley   kernel). Default is true (access to the frame is allowed).
1843f35ef5SPaul Beesley
19973e0b7fSDivin Raj-  ``ARM_FW_CONFIG_LOAD_ENABLE``: Boolean option to enable the loading of
20973e0b7fSDivin Raj   FW_CONFIG device trees from the Firmware Image Package (FIP). When enabled,
21973e0b7fSDivin Raj   BL2 calls the platform specific function `arm_bl2_el3_plat_config_load`.
22973e0b7fSDivin Raj   This function is responsible for loading, parsing, and validating the
23973e0b7fSDivin Raj   FW_CONFIG device trees from the FIP. The option depends on RESET_TO_BL2.
24973e0b7fSDivin Raj
2543f35ef5SPaul Beesley-  ``ARM_DISABLE_TRUSTED_WDOG``: boolean option to disable the Trusted Watchdog.
2643f35ef5SPaul Beesley   By default, Arm platforms use a watchdog to trigger a system reset in case
2743f35ef5SPaul Beesley   an error is encountered during the boot process (for example, when an image
2843f35ef5SPaul Beesley   could not be loaded or authenticated). The watchdog is enabled in the early
2943f35ef5SPaul Beesley   platform setup hook at BL1 and disabled in the BL1 prepare exit hook. The
3043f35ef5SPaul Beesley   Trusted Watchdog may be disabled at build time for testing or development
3143f35ef5SPaul Beesley   purposes.
3243f35ef5SPaul Beesley
3343f35ef5SPaul Beesley-  ``ARM_LINUX_KERNEL_AS_BL33``: The Linux kernel expects registers x0-x3 to
3443f35ef5SPaul Beesley   have specific values at boot. This boolean option allows the Trusted Firmware
3543f35ef5SPaul Beesley   to have a Linux kernel image as BL33 by preparing the registers to these
36*2f5fd826SHarrison Mutai   values before jumping to BL33. This option defaults to 0 (disabled). When
37*2f5fd826SHarrison Mutai   enabled (1), the address of the Linux image must be provided via the
38*2f5fd826SHarrison Mutai   ``PRELOADED_BL33_BASE`` option. Additionally, either the ``HW_CONFIG_BASE``
39*2f5fd826SHarrison Mutai   or ``ARM_PRELOADED_DTB_BASE`` option must specify the memory location of a
40*2f5fd826SHarrison Mutai   preloaded device tree blob (DTB). This option implies
41*2f5fd826SHarrison Mutai   ``USE_KERNEL_DT_CONVENTION``.
4243f35ef5SPaul Beesley
4343f35ef5SPaul Beesley-  ``ARM_PLAT_MT``: This flag determines whether the Arm platform layer has to
4443f35ef5SPaul Beesley   cater for the multi-threading ``MT`` bit when accessing MPIDR. When this flag
4543f35ef5SPaul Beesley   is set, the functions which deal with MPIDR assume that the ``MT`` bit in
4643f35ef5SPaul Beesley   MPIDR is set and access the bit-fields in MPIDR accordingly. Default value of
4743f35ef5SPaul Beesley   this flag is 0. Note that this option is not used on FVP platforms.
4843f35ef5SPaul Beesley
4943f35ef5SPaul Beesley-  ``ARM_RECOM_STATE_ID_ENC``: The PSCI1.0 specification recommends an encoding
5043f35ef5SPaul Beesley   for the construction of composite state-ID in the power-state parameter.
5143f35ef5SPaul Beesley   The existing PSCI clients currently do not support this encoding of
5243f35ef5SPaul Beesley   State-ID yet. Hence this flag is used to configure whether to use the
5343f35ef5SPaul Beesley   recommended State-ID encoding or not. The default value of this flag is 0,
5443f35ef5SPaul Beesley   in which case the platform is configured to expect NULL in the State-ID
5543f35ef5SPaul Beesley   field of power-state parameter.
5643f35ef5SPaul Beesley
5743f35ef5SPaul Beesley-  ``ARM_ROTPK_LOCATION``: used when ``TRUSTED_BOARD_BOOT=1``. It specifies the
589b1dad8bSlaurenw-arm   location of the ROTPK returned by the function ``plat_get_rotpk_info()``
5943f35ef5SPaul Beesley   for Arm platforms. Depending on the selected option, the proper private key
6043f35ef5SPaul Beesley   must be specified using the ``ROT_KEY`` option when building the Trusted
6143f35ef5SPaul Beesley   Firmware. This private key will be used by the certificate generation tool
6243f35ef5SPaul Beesley   to sign the BL2 and Trusted Key certificates. Available options for
6343f35ef5SPaul Beesley   ``ARM_ROTPK_LOCATION`` are:
6443f35ef5SPaul Beesley
6543f35ef5SPaul Beesley   -  ``regs`` : return the ROTPK hash stored in the Trusted root-key storage
66a6ffddecSMax Shvetsov      registers.
6743f35ef5SPaul Beesley   -  ``devel_rsa`` : return a development public key hash embedded in the BL1
684639f890SRyan Everett      and BL2 binaries. This hash corresponds to the development private key
694639f890SRyan Everett      ``plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem``.
704639f890SRyan Everett      The hashing algorithm is selected by ``HASH_ALG``; sha256 is used if
714639f890SRyan Everett      ``HASH_ALG`` is not specified. A different RSA key can be specified by setting
724639f890SRyan Everett      ``ROT_KEY``, there are 3k and 4k RSA keys in ``plat/arm/board/common/rotpk/``.
7343f35ef5SPaul Beesley   -  ``devel_ecdsa`` : return a development public key hash embedded in the BL1
744639f890SRyan Everett      and BL2 binaries. This hash corresponds to the development private key
754639f890SRyan Everett      ``plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem`` unless a different key
764639f890SRyan Everett      is specified with ``ROT_KEY``, such as the 384 bit key in the same directory.
774639f890SRyan Everett      he hashing algorithm is selected by ``HASH_ALG``; sha256 is used if ``HASH_ALG``
784639f890SRyan Everett      is not specified.
794639f890SRyan Everett   -  ``devel_full_dev_rsa_key`` : return a development public key embedded in
804639f890SRyan Everett      the BL1 and BL2 binaries. This key corresponds to the RSA private
814639f890SRyan Everett      key ``plat/arm/board/common/rotpk/arm_rotprivk.pem`` by default, but can
824639f890SRyan Everett      be changed by setting ``ROT_KEY``, there are 3k and 4k RSA keys in
834639f890SRyan Everett      ``plat/arm/board/common/rotpk/``.
844639f890SRyan Everett   - ``devel_full_dev_ecdsa_key`` : return a development public key embedded in
854639f890SRyan Everett      the BL1 and BL2 binaries. This key corresponds to the EC private key
864639f890SRyan Everett      ``plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem``, unless a different
874639f890SRyan Everett      ECDSA key is specified by ``ROT_KEY``, such as the 384 bit key in the same directory.
88a6ffddecSMax Shvetsov
8943f35ef5SPaul Beesley-  ``ARM_TSP_RAM_LOCATION``: location of the TSP binary. Options:
9043f35ef5SPaul Beesley
9143f35ef5SPaul Beesley   -  ``tsram`` : Trusted SRAM (default option when TBB is not enabled)
9243f35ef5SPaul Beesley   -  ``tdram`` : Trusted DRAM (if available)
9343f35ef5SPaul Beesley   -  ``dram`` : Secure region in DRAM (default option when TBB is enabled,
9443f35ef5SPaul Beesley      configured by the TrustZone controller)
9543f35ef5SPaul Beesley
9643f35ef5SPaul Beesley-  ``ARM_XLAT_TABLES_LIB_V1``: boolean option to compile TF-A with version 1
9743f35ef5SPaul Beesley   of the translation tables library instead of version 2. It is set to 0 by
9843f35ef5SPaul Beesley   default, which selects version 2.
9943f35ef5SPaul Beesley
100e3be1086SManish V Badarkhe-  ``ARM_GPT_SUPPORT``: Enable GPT parser to get the entry address and length of
101e3be1086SManish V Badarkhe   the various partitions present in the GPT image. This support is available
102e3be1086SManish V Badarkhe   only for the BL2 component, and it is disabled by default.
103e3be1086SManish V Badarkhe   The following diagram shows the view of the FIP partition inside the GPT
104e3be1086SManish V Badarkhe   image:
105e3be1086SManish V Badarkhe
106e3be1086SManish V Badarkhe   |FIP in a GPT image|
107e3be1086SManish V Badarkhe
10843f35ef5SPaul BeesleyFor a better understanding of these options, the Arm development platform memory
10943f35ef5SPaul Beesleymap is explained in the :ref:`Firmware Design`.
11043f35ef5SPaul Beesley
11143f35ef5SPaul Beesley.. _build_options_arm_css_platform:
11243f35ef5SPaul Beesley
11343f35ef5SPaul BeesleyArm CSS Platform-Specific Build Options
11443f35ef5SPaul Beesley---------------------------------------
11543f35ef5SPaul Beesley
11643f35ef5SPaul Beesley-  ``CSS_DETECT_PRE_1_7_0_SCP``: Boolean flag to detect SCP version
11743f35ef5SPaul Beesley   incompatibility. Version 1.7.0 of the SCP firmware made a non-backwards
11843f35ef5SPaul Beesley   compatible change to the MTL protocol, used for AP/SCP communication.
11943f35ef5SPaul Beesley   TF-A no longer supports earlier SCP versions. If this option is set to 1
12043f35ef5SPaul Beesley   then TF-A will detect if an earlier version is in use. Default is 1.
12143f35ef5SPaul Beesley
12243f35ef5SPaul Beesley-  ``CSS_LOAD_SCP_IMAGES``: Boolean flag, which when set, adds SCP_BL2 and
12343f35ef5SPaul Beesley   SCP_BL2U to the FIP and FWU_FIP respectively, and enables them to be loaded
12443f35ef5SPaul Beesley   during boot. Default is 1.
12543f35ef5SPaul Beesley
12643f35ef5SPaul Beesley-  ``CSS_USE_SCMI_SDS_DRIVER``: Boolean flag which selects SCMI/SDS drivers
12743f35ef5SPaul Beesley   instead of SCPI/BOM driver for communicating with the SCP during power
12843f35ef5SPaul Beesley   management operations and for SCP RAM Firmware transfer. If this option
12943f35ef5SPaul Beesley   is set to 1, then SCMI/SDS drivers will be used. Default is 0.
13043f35ef5SPaul Beesley
131158ed580SPranav Madhu- ``CSS_SYSTEM_GRACEFUL_RESET``: Build option to enable graceful powerdown of
132158ed580SPranav Madhu   CPU core on reset. This build option can be used on CSS platforms that
133158ed580SPranav Madhu   require all the CPUs to execute the CPU specific power down sequence to
134158ed580SPranav Madhu   complete a warm reboot sequence in which only the CPUs are power cycled.
135158ed580SPranav Madhu
13641e56f42SChris KayArm FVP Build Options
13741e56f42SChris Kay---------------------
13841e56f42SChris Kay
13941e56f42SChris Kay- ``FVP_TRUSTED_SRAM_SIZE``: Size (in kilobytes) of the Trusted SRAM region to
140aeec55c8SAlexeiFedorov  utilize when building for the FVP platform. This option defaults to 256 with
141aeec55c8SAlexeiFedorov  build option ENABLE_RME=0 and 384 for ENABLE_RME=1.
14241e56f42SChris Kay
14331df0632SManish V BadarkheArm Juno Build Options
14431df0632SManish V Badarkhe----------------------
14531df0632SManish V Badarkhe
14631df0632SManish V Badarkhe-  ``JUNO_AARCH32_EL3_RUNTIME``: This build flag enables you to execute EL3
14731df0632SManish V Badarkhe   runtime software in AArch32 mode, which is required to run AArch32 on Juno.
14831df0632SManish V Badarkhe   By default this flag is set to '0'. Enabling this flag builds BL1 and BL2 in
14931df0632SManish V Badarkhe   AArch64 and facilitates the loading of ``SP_MIN`` and BL33 as AArch32 executable
15031df0632SManish V Badarkhe   images.
15131df0632SManish V Badarkhe
152a1e6467bSRohit MathewArm Neoverse RD Platform Build Options
153a1e6467bSRohit Mathew--------------------------------------
154a1e6467bSRohit Mathew
155a1e6467bSRohit Mathew - ``NRD_CHIP_COUNT``: Configures the number of chips on a Neoverse RD platform
156a1e6467bSRohit Mathew   which supports multi-chip operation. If ``NRD_CHIP_COUNT`` is set to any
157a1e6467bSRohit Mathew   valid value greater than 1, the platform code performs required configuration
158a1e6467bSRohit Mathew   to support multi-chip operation.
159a1e6467bSRohit Mathew
160a1e6467bSRohit Mathew- ``NRD_PLATFORM_VARIANT``: Selects the variant of a Neoverse RD platform. A
161a1e6467bSRohit Mathew  particular Neoverse RD platform may have multiple variants which may differ in
162a1e6467bSRohit Mathew  core count, cluster count or other peripherals. This build option is used to
163a1e6467bSRohit Mathew  select the appropriate platform variant for the build. The range of valid
164a1e6467bSRohit Mathew  values is platform specific.
165a1e6467bSRohit Mathew
16643f35ef5SPaul Beesley--------------
16743f35ef5SPaul Beesley
168e3be1086SManish V Badarkhe.. |FIP in a GPT image| image:: ../../resources/diagrams/FIP_in_a_GPT_image.png
169e3be1086SManish V Badarkhe
170*2f5fd826SHarrison Mutai*Copyright (c) 2019-2025, Arm Limited. All rights reserved.*
171