arm-build-options.rst 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. Arm Development Platform Build Options
  2. ======================================
  3. Arm Platform Build Options
  4. --------------------------
  5. - ``ARM_BL31_IN_DRAM``: Boolean option to select loading of BL31 in TZC secured
  6. DRAM. By default, BL31 is in the secure SRAM. Set this flag to 1 to load
  7. BL31 in TZC secured DRAM. If TSP is present, then setting this option also
  8. sets the TSP location to DRAM and ignores the ``ARM_TSP_RAM_LOCATION`` build
  9. flag.
  10. - ``ARM_CONFIG_CNTACR``: boolean option to unlock access to the ``CNTBase<N>``
  11. frame registers by setting the ``CNTCTLBase.CNTACR<N>`` register bits. The
  12. frame number ``<N>`` is defined by ``PLAT_ARM_NSTIMER_FRAME_ID``, which
  13. should match the frame used by the Non-Secure image (normally the Linux
  14. kernel). Default is true (access to the frame is allowed).
  15. - ``ARM_FW_CONFIG_LOAD_ENABLE``: Boolean option to enable the loading of
  16. FW_CONFIG device trees from the Firmware Image Package (FIP). When enabled,
  17. BL2 calls the platform specific function `arm_bl2_el3_plat_config_load`.
  18. This function is responsible for loading, parsing, and validating the
  19. FW_CONFIG device trees from the FIP. The option depends on RESET_TO_BL2.
  20. - ``ARM_DISABLE_TRUSTED_WDOG``: boolean option to disable the Trusted Watchdog.
  21. By default, Arm platforms use a watchdog to trigger a system reset in case
  22. an error is encountered during the boot process (for example, when an image
  23. could not be loaded or authenticated). The watchdog is enabled in the early
  24. platform setup hook at BL1 and disabled in the BL1 prepare exit hook. The
  25. Trusted Watchdog may be disabled at build time for testing or development
  26. purposes.
  27. - ``ARM_LINUX_KERNEL_AS_BL33``: The Linux kernel expects registers x0-x3 to
  28. have specific values at boot. This boolean option allows the Trusted Firmware
  29. to have a Linux kernel image as BL33 by preparing the registers to these
  30. values before jumping to BL33. This option defaults to 0 (disabled). For
  31. AArch64 ``RESET_TO_BL31`` and for AArch32 ``RESET_TO_SP_MIN`` must be 1 when
  32. using it. If this option is set to 1, ``ARM_PRELOADED_DTB_BASE`` must be set
  33. to the location of a device tree blob (DTB) already loaded in memory. The
  34. Linux Image address must be specified using the ``PRELOADED_BL33_BASE``
  35. option.
  36. - ``ARM_PLAT_MT``: This flag determines whether the Arm platform layer has to
  37. cater for the multi-threading ``MT`` bit when accessing MPIDR. When this flag
  38. is set, the functions which deal with MPIDR assume that the ``MT`` bit in
  39. MPIDR is set and access the bit-fields in MPIDR accordingly. Default value of
  40. this flag is 0. Note that this option is not used on FVP platforms.
  41. - ``ARM_RECOM_STATE_ID_ENC``: The PSCI1.0 specification recommends an encoding
  42. for the construction of composite state-ID in the power-state parameter.
  43. The existing PSCI clients currently do not support this encoding of
  44. State-ID yet. Hence this flag is used to configure whether to use the
  45. recommended State-ID encoding or not. The default value of this flag is 0,
  46. in which case the platform is configured to expect NULL in the State-ID
  47. field of power-state parameter.
  48. - ``ARM_ROTPK_LOCATION``: used when ``TRUSTED_BOARD_BOOT=1``. It specifies the
  49. location of the ROTPK returned by the function ``plat_get_rotpk_info()``
  50. for Arm platforms. Depending on the selected option, the proper private key
  51. must be specified using the ``ROT_KEY`` option when building the Trusted
  52. Firmware. This private key will be used by the certificate generation tool
  53. to sign the BL2 and Trusted Key certificates. Available options for
  54. ``ARM_ROTPK_LOCATION`` are:
  55. - ``regs`` : return the ROTPK hash stored in the Trusted root-key storage
  56. registers.
  57. - ``devel_rsa`` : return a development public key hash embedded in the BL1
  58. and BL2 binaries. This hash has been obtained from the RSA public key
  59. ``arm_rotpk_rsa.der``, located in ``plat/arm/board/common/rotpk``. To use
  60. this option, ``arm_rotprivk_rsa.pem`` must be specified as ``ROT_KEY``
  61. when creating the certificates.
  62. - ``devel_ecdsa`` : return a development public key hash embedded in the BL1
  63. and BL2 binaries. This hash has been obtained from the ECDSA public key
  64. ``arm_rotpk_ecdsa.der``, located in ``plat/arm/board/common/rotpk``. To
  65. use this option, ``arm_rotprivk_ecdsa.pem`` must be specified as
  66. ``ROT_KEY`` when creating the certificates.
  67. - ``devel_full_dev_rsa_key`` : returns a development public key embedded in
  68. the BL1 and BL2 binaries. This key has been obtained from the RSA public
  69. key ``arm_rotpk_rsa.der``, located in ``plat/arm/board/common/rotpk``.
  70. - ``ARM_ROTPK_HASH``: used when ``ARM_ROTPK_LOCATION=devel_*``, excluding
  71. ``devel_full_dev_rsa_key``. Specifies the location of the ROTPK hash. Not
  72. expected to be a build option. This defaults to
  73. ``plat/arm/board/common/rotpk/*_sha256.bin`` depending on the specified
  74. algorithm. Providing ``ROT_KEY`` enforces generation of the hash from the
  75. ``ROT_KEY`` and overwrites the default hash file.
  76. - ``ARM_TSP_RAM_LOCATION``: location of the TSP binary. Options:
  77. - ``tsram`` : Trusted SRAM (default option when TBB is not enabled)
  78. - ``tdram`` : Trusted DRAM (if available)
  79. - ``dram`` : Secure region in DRAM (default option when TBB is enabled,
  80. configured by the TrustZone controller)
  81. - ``ARM_XLAT_TABLES_LIB_V1``: boolean option to compile TF-A with version 1
  82. of the translation tables library instead of version 2. It is set to 0 by
  83. default, which selects version 2.
  84. - ``ARM_GPT_SUPPORT``: Enable GPT parser to get the entry address and length of
  85. the various partitions present in the GPT image. This support is available
  86. only for the BL2 component, and it is disabled by default.
  87. The following diagram shows the view of the FIP partition inside the GPT
  88. image:
  89. |FIP in a GPT image|
  90. For a better understanding of these options, the Arm development platform memory
  91. map is explained in the :ref:`Firmware Design`.
  92. .. _build_options_arm_css_platform:
  93. Arm CSS Platform-Specific Build Options
  94. ---------------------------------------
  95. - ``CSS_DETECT_PRE_1_7_0_SCP``: Boolean flag to detect SCP version
  96. incompatibility. Version 1.7.0 of the SCP firmware made a non-backwards
  97. compatible change to the MTL protocol, used for AP/SCP communication.
  98. TF-A no longer supports earlier SCP versions. If this option is set to 1
  99. then TF-A will detect if an earlier version is in use. Default is 1.
  100. - ``CSS_LOAD_SCP_IMAGES``: Boolean flag, which when set, adds SCP_BL2 and
  101. SCP_BL2U to the FIP and FWU_FIP respectively, and enables them to be loaded
  102. during boot. Default is 1.
  103. - ``CSS_USE_SCMI_SDS_DRIVER``: Boolean flag which selects SCMI/SDS drivers
  104. instead of SCPI/BOM driver for communicating with the SCP during power
  105. management operations and for SCP RAM Firmware transfer. If this option
  106. is set to 1, then SCMI/SDS drivers will be used. Default is 0.
  107. - ``CSS_SYSTEM_GRACEFUL_RESET``: Build option to enable graceful powerdown of
  108. CPU core on reset. This build option can be used on CSS platforms that
  109. require all the CPUs to execute the CPU specific power down sequence to
  110. complete a warm reboot sequence in which only the CPUs are power cycled.
  111. Arm FVP Build Options
  112. ---------------------
  113. - ``FVP_TRUSTED_SRAM_SIZE``: Size (in kilobytes) of the Trusted SRAM region to
  114. utilize when building for the FVP platform. This option defaults to 256.
  115. Arm Juno Build Options
  116. ----------------------
  117. - ``JUNO_AARCH32_EL3_RUNTIME``: This build flag enables you to execute EL3
  118. runtime software in AArch32 mode, which is required to run AArch32 on Juno.
  119. By default this flag is set to '0'. Enabling this flag builds BL1 and BL2 in
  120. AArch64 and facilitates the loading of ``SP_MIN`` and BL33 as AArch32 executable
  121. images.
  122. Arm Neoverse RD Platform Build Options
  123. --------------------------------------
  124. - ``NRD_CHIP_COUNT``: Configures the number of chips on a Neoverse RD platform
  125. which supports multi-chip operation. If ``NRD_CHIP_COUNT`` is set to any
  126. valid value greater than 1, the platform code performs required configuration
  127. to support multi-chip operation.
  128. - ``NRD_PLATFORM_VARIANT``: Selects the variant of a Neoverse RD platform. A
  129. particular Neoverse RD platform may have multiple variants which may differ in
  130. core count, cluster count or other peripherals. This build option is used to
  131. select the appropriate platform variant for the build. The range of valid
  132. values is platform specific.
  133. --------------
  134. .. |FIP in a GPT image| image:: ../../resources/diagrams/FIP_in_a_GPT_image.png
  135. *Copyright (c) 2019-2024, Arm Limited. All rights reserved.*