defaults.mk 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. #
  2. # Copyright (c) 2016-2024, Arm Limited. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Default, static values for build variables, listed in alphabetic order.
  7. # Dependencies between build options, if any, are handled in the top-level
  8. # Makefile, after this file is included. This ensures that the former is better
  9. # poised to handle dependencies, as all build variables would have a default
  10. # value by then.
  11. # Use T32 by default
  12. AARCH32_INSTRUCTION_SET := T32
  13. # The AArch32 Secure Payload to be built as BL32 image
  14. AARCH32_SP := none
  15. # The Target build architecture. Supported values are: aarch64, aarch32.
  16. ARCH := aarch64
  17. # ARM Architecture feature modifiers: none by default
  18. ARM_ARCH_FEATURE := none
  19. # ARM Architecture major and minor versions: 8.0 by default.
  20. ARM_ARCH_MAJOR := 8
  21. ARM_ARCH_MINOR := 0
  22. # Base commit to perform code check on
  23. BASE_COMMIT := origin/master
  24. # Execute BL2 at EL3
  25. RESET_TO_BL2 := 0
  26. # Only use SP packages if SP layout JSON is defined
  27. BL2_ENABLE_SP_LOAD := 0
  28. # BL2 image is stored in XIP memory, for now, this option is only supported
  29. # when RESET_TO_BL2 is 1.
  30. BL2_IN_XIP_MEM := 0
  31. # Do dcache invalidate upon BL2 entry at EL3
  32. BL2_INV_DCACHE := 1
  33. # Select the branch protection features to use.
  34. BRANCH_PROTECTION := 0
  35. # By default, consider that the platform may release several CPUs out of reset.
  36. # The platform Makefile is free to override this value.
  37. COLD_BOOT_SINGLE_CPU := 0
  38. # Flag to compile in coreboot support code. Exclude by default. The coreboot
  39. # Makefile system will set this when compiling TF as part of a coreboot image.
  40. COREBOOT := 0
  41. # For Chain of Trust
  42. CREATE_KEYS := 1
  43. # Build flag to include AArch32 registers in cpu context save and restore during
  44. # world switch. This flag must be set to 0 for AArch64-only platforms.
  45. CTX_INCLUDE_AARCH32_REGS := 1
  46. # Include FP registers in cpu context
  47. CTX_INCLUDE_FPREGS := 0
  48. # Include SVE registers in cpu context
  49. CTX_INCLUDE_SVE_REGS := 0
  50. # Debug build
  51. DEBUG := 0
  52. # By default disable authenticated decryption support.
  53. DECRYPTION_SUPPORT := none
  54. # Build platform
  55. DEFAULT_PLAT := fvp
  56. # Disable the generation of the binary image (ELF only).
  57. DISABLE_BIN_GENERATION := 0
  58. # Enable capability to disable authentication dynamically. Only meant for
  59. # development platforms.
  60. DYN_DISABLE_AUTH := 0
  61. # Enable the Maximum Power Mitigation Mechanism on supporting cores.
  62. ENABLE_MPMM := 0
  63. # Enable MPMM configuration via FCONF.
  64. ENABLE_MPMM_FCONF := 0
  65. # Flag to Enable Position Independant support (PIE)
  66. ENABLE_PIE := 0
  67. # Flag to enable Performance Measurement Framework
  68. ENABLE_PMF := 0
  69. # Flag to enable PSCI STATs functionality
  70. ENABLE_PSCI_STAT := 0
  71. # Flag to enable runtime instrumentation using PMF
  72. ENABLE_RUNTIME_INSTRUMENTATION := 0
  73. # Flag to enable stack corruption protection
  74. ENABLE_STACK_PROTECTOR := 0
  75. # Flag to enable exception handling in EL3
  76. EL3_EXCEPTION_HANDLING := 0
  77. # By default BL31 encryption disabled
  78. ENCRYPT_BL31 := 0
  79. # By default BL32 encryption disabled
  80. ENCRYPT_BL32 := 0
  81. # Default dummy firmware encryption key
  82. ENC_KEY := 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
  83. # Default dummy nonce for firmware encryption
  84. ENC_NONCE := 1234567890abcdef12345678
  85. # Build flag to treat usage of deprecated platform and framework APIs as error.
  86. ERROR_DEPRECATED := 0
  87. # Fault injection support
  88. FAULT_INJECTION_SUPPORT := 0
  89. # Flag to enable architectural features detection mechanism
  90. FEATURE_DETECTION := 0
  91. # Byte alignment that each component in FIP is aligned to
  92. FIP_ALIGN := 0
  93. # Default FIP file name
  94. FIP_NAME := fip.bin
  95. # Default FWU_FIP file name
  96. FWU_FIP_NAME := fwu_fip.bin
  97. # By default firmware encryption with SSK
  98. FW_ENC_STATUS := 0
  99. # For Chain of Trust
  100. GENERATE_COT := 0
  101. # Default number of 512 blocks per bitlock
  102. RME_GPT_BITLOCK_BLOCK := 1
  103. # Default maximum size of GPT contiguous block
  104. RME_GPT_MAX_BLOCK := 512
  105. # Hint platform interrupt control layer that Group 0 interrupts are for EL3. By
  106. # default, they are for Secure EL1.
  107. GICV2_G0_FOR_EL3 := 0
  108. # Route NS External Aborts to EL3. Disabled by default; External Aborts are handled
  109. # by lower ELs.
  110. HANDLE_EA_EL3_FIRST_NS := 0
  111. # Enable Handoff protocol using transfer lists
  112. TRANSFER_LIST := 0
  113. # Enables support for the gcc compiler option "-mharden-sls=all".
  114. # By default, disables all SLS hardening.
  115. HARDEN_SLS := 0
  116. # Secure hash algorithm flag, accepts 3 values: sha256, sha384 and sha512.
  117. # The default value is sha256.
  118. HASH_ALG := sha256
  119. # Whether system coherency is managed in hardware, without explicit software
  120. # operations.
  121. HW_ASSISTED_COHERENCY := 0
  122. # Flag to enable trapping of implementation defined sytem registers
  123. IMPDEF_SYSREG_TRAP := 0
  124. # Set the default algorithm for the generation of Trusted Board Boot keys
  125. KEY_ALG := rsa
  126. # Set the default key size in case KEY_ALG is rsa
  127. ifeq ($(KEY_ALG),rsa)
  128. KEY_SIZE := 2048
  129. endif
  130. # Option to build TF with Measured Boot support
  131. MEASURED_BOOT := 0
  132. # Option to enable the DICE Protection Environmnet as a Measured Boot backend
  133. DICE_PROTECTION_ENVIRONMENT :=0
  134. # NS timer register save and restore
  135. NS_TIMER_SWITCH := 0
  136. # Include lib/libc in the final image
  137. OVERRIDE_LIBC := 0
  138. # Build PL011 UART driver in minimal generic UART mode
  139. PL011_GENERIC_UART := 0
  140. # By default, consider that the platform's reset address is not programmable.
  141. # The platform Makefile is free to override this value.
  142. PROGRAMMABLE_RESET_ADDRESS := 0
  143. # Flag used to choose the power state format: Extended State-ID or Original
  144. PSCI_EXTENDED_STATE_ID := 0
  145. # Enable PSCI OS-initiated mode support
  146. PSCI_OS_INIT_MODE := 0
  147. # By default, BL1 acts as the reset handler, not BL31
  148. RESET_TO_BL31 := 0
  149. # For Chain of Trust
  150. SAVE_KEYS := 0
  151. # Software Delegated Exception support
  152. SDEI_SUPPORT := 0
  153. # True Random Number firmware Interface support
  154. TRNG_SUPPORT := 0
  155. # Check to see if Errata ABI is supported
  156. ERRATA_ABI_SUPPORT := 0
  157. # Check to enable Errata ABI for platforms with non-arm interconnect
  158. ERRATA_NON_ARM_INTERCONNECT := 0
  159. # SMCCC PCI support
  160. SMC_PCI_SUPPORT := 0
  161. # Whether code and read-only data should be put on separate memory pages. The
  162. # platform Makefile is free to override this value.
  163. SEPARATE_CODE_AND_RODATA := 0
  164. # Put NOBITS sections (.bss, stacks, page tables, and coherent memory) in a
  165. # separate memory region, which may be discontiguous from the rest of BL31.
  166. SEPARATE_NOBITS_REGION := 0
  167. # Put BL2 NOLOAD sections (.bss, stacks, page tables) in a separate memory
  168. # region, platform Makefile is free to override this value.
  169. SEPARATE_BL2_NOLOAD_REGION := 0
  170. # Put SIMD context data structures in a separate memory region. Platforms
  171. # have the choice to put it outside of default BSS region of EL3 firmware.
  172. SEPARATE_SIMD_SECTION := 0
  173. # If the BL31 image initialisation code is recalimed after use for the secondary
  174. # cores stack
  175. RECLAIM_INIT_CODE := 0
  176. # SPD choice
  177. SPD := none
  178. # Enable the Management Mode (MM)-based Secure Partition Manager implementation
  179. SPM_MM := 0
  180. # Use the FF-A SPMC implementation in EL3.
  181. SPMC_AT_EL3 := 0
  182. # Enable SEL0 SP when SPMC is enabled at EL3
  183. SPMC_AT_EL3_SEL0_SP :=0
  184. # Use SPM at S-EL2 as a default config for SPMD
  185. SPMD_SPM_AT_SEL2 := 1
  186. # Flag to introduce an infinite loop in BL1 just before it exits into the next
  187. # image. This is meant to help debugging the post-BL2 phase.
  188. SPIN_ON_BL1_EXIT := 0
  189. # Flags to build TF with Trusted Boot support
  190. TRUSTED_BOARD_BOOT := 0
  191. # Build option to choose whether Trusted Firmware uses Coherent memory or not.
  192. USE_COHERENT_MEM := 1
  193. # Build option to add debugfs support
  194. USE_DEBUGFS := 0
  195. # Build option to fconf based io
  196. ARM_IO_IN_DTB := 0
  197. # Build option to support SDEI through fconf
  198. SDEI_IN_FCONF := 0
  199. # Build option to support Secure Interrupt descriptors through fconf
  200. SEC_INT_DESC_IN_FCONF := 0
  201. # Build option to choose whether Trusted Firmware uses library at ROM
  202. USE_ROMLIB := 0
  203. # Build option to choose whether the xlat tables of BL images can be read-only.
  204. # Note that this only serves as a higher level option to PLAT_RO_XLAT_TABLES,
  205. # which is the per BL-image option that actually enables the read-only tables
  206. # API. The reason for having this additional option is to have a common high
  207. # level makefile where we can check for incompatible features/build options.
  208. ALLOW_RO_XLAT_TABLES := 0
  209. # Chain of trust.
  210. COT := tbbr
  211. # Use tbbr_oid.h instead of platform_oid.h
  212. USE_TBBR_DEFS := 1
  213. # Whether to enable D-Cache early during warm boot. This is usually
  214. # applicable for platforms wherein interconnect programming is not
  215. # required to enable cache coherency after warm reset (eg: single cluster
  216. # platforms).
  217. WARMBOOT_ENABLE_DCACHE_EARLY := 0
  218. # Default SVE vector length to maximum architected value
  219. SVE_VECTOR_LEN := 2048
  220. SANITIZE_UB := off
  221. # For ARMv8.1 (AArch64) platforms, enabling this option selects the spinlock
  222. # implementation variant using the ARMv8.1-LSE compare-and-swap instruction.
  223. # Default: disabled
  224. USE_SPINLOCK_CAS := 0
  225. # Enable Link Time Optimization
  226. ENABLE_LTO := 0
  227. # This option will include EL2 registers in cpu context save and restore during
  228. # EL2 firmware entry/exit. Internal flag not meant for direct setting.
  229. # Use SPD=spmd and SPMD_SPM_AT_SEL2=1 or ENABLE_RME=1 to enable
  230. # CTX_INCLUDE_EL2_REGS.
  231. CTX_INCLUDE_EL2_REGS := 0
  232. # Enable Memory tag extension which is supported for architecture greater
  233. # than Armv8.5-A
  234. # By default it is set to "no"
  235. SUPPORT_STACK_MEMTAG := no
  236. # Select workaround for AT speculative behaviour.
  237. ERRATA_SPECULATIVE_AT := 0
  238. # Trap RAS error record access from Non secure
  239. RAS_TRAP_NS_ERR_REC_ACCESS := 0
  240. # Build option to create cot descriptors using fconf
  241. COT_DESC_IN_DTB := 0
  242. # Build option to provide OpenSSL directory path
  243. OPENSSL_DIR := /usr
  244. # Select the openssl binary provided in OPENSSL_DIR variable
  245. ifeq ("$(wildcard ${OPENSSL_DIR}/bin)", "")
  246. OPENSSL_BIN_PATH = ${OPENSSL_DIR}/apps
  247. else
  248. OPENSSL_BIN_PATH = ${OPENSSL_DIR}/bin
  249. endif
  250. # Build option to use the SP804 timer instead of the generic one
  251. USE_SP804_TIMER := 0
  252. # Build option to define number of firmware banks, used in firmware update
  253. # metadata structure.
  254. NR_OF_FW_BANKS := 2
  255. # Build option to define number of images in firmware bank, used in firmware
  256. # update metadata structure.
  257. NR_OF_IMAGES_IN_FW_BANK := 1
  258. # Disable Firmware update support by default
  259. PSA_FWU_SUPPORT := 0
  260. # Enable image description in FWU metadata by default when PSA_FWU_SUPPORT
  261. # is enabled.
  262. ifeq ($(PSA_FWU_SUPPORT),1)
  263. PSA_FWU_METADATA_FW_STORE_DESC := 1
  264. else
  265. PSA_FWU_METADATA_FW_STORE_DESC := 0
  266. endif
  267. # Dynamic Root of Trust for Measurement support
  268. DRTM_SUPPORT := 0
  269. # Check platform if cache management operations should be performed.
  270. # Disabled by default.
  271. CONDITIONAL_CMO := 0
  272. # By default, disable SPMD Logical partitions
  273. ENABLE_SPMD_LP := 0
  274. # By default, disable PSA crypto (use MbedTLS legacy crypto API).
  275. PSA_CRYPTO := 0
  276. # getc() support from the console(s).
  277. # Disabled by default because it constitutes an attack vector into TF-A. It
  278. # should only be enabled if there is a use case for it.
  279. ENABLE_CONSOLE_GETC := 0
  280. # Build option to disable EL2 when it is not used.
  281. # Most platforms switch from EL3 to NS-EL2 and hence the unused NS-EL2
  282. # functions must be enabled by platforms if they require it.
  283. # Disabled by default.
  284. INIT_UNUSED_NS_EL2 := 0
  285. # Disable including MPAM EL2 registers in context by default since currently
  286. # it's only enabled for NS world
  287. CTX_INCLUDE_MPAM_REGS := 0
  288. # Enable context memory usage reporting during BL31 setup.
  289. PLATFORM_REPORT_CTX_MEM_USE := 0
  290. # Enable early console
  291. EARLY_CONSOLE := 0
  292. # Allow platforms to save/restore DSU PMU registers over a power cycle.
  293. # Disabled by default and must be enabled by individual platforms.
  294. PRESERVE_DSU_PMU_REGS := 0