defaults.mk 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  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. # Enable HOB list to generate boot information
  114. HOB_LIST := 0
  115. # Enables support for the gcc compiler option "-mharden-sls=all".
  116. # By default, disables all SLS hardening.
  117. HARDEN_SLS := 0
  118. # Secure hash algorithm flag, accepts 3 values: sha256, sha384 and sha512.
  119. # The default value is sha256.
  120. HASH_ALG := sha256
  121. # Whether system coherency is managed in hardware, without explicit software
  122. # operations.
  123. HW_ASSISTED_COHERENCY := 0
  124. # Flag to enable trapping of implementation defined sytem registers
  125. IMPDEF_SYSREG_TRAP := 0
  126. # Set the default algorithm for the generation of Trusted Board Boot keys
  127. KEY_ALG := rsa
  128. # Set the default key size in case KEY_ALG is rsa
  129. ifeq ($(KEY_ALG),rsa)
  130. KEY_SIZE := 2048
  131. endif
  132. # Option to build TF with Measured Boot support
  133. MEASURED_BOOT := 0
  134. # Option to enable the DICE Protection Environmnet as a Measured Boot backend
  135. DICE_PROTECTION_ENVIRONMENT :=0
  136. # NS timer register save and restore
  137. NS_TIMER_SWITCH := 0
  138. # Include lib/libc in the final image
  139. OVERRIDE_LIBC := 0
  140. # Build PL011 UART driver in minimal generic UART mode
  141. PL011_GENERIC_UART := 0
  142. # By default, consider that the platform's reset address is not programmable.
  143. # The platform Makefile is free to override this value.
  144. PROGRAMMABLE_RESET_ADDRESS := 0
  145. # Flag used to choose the power state format: Extended State-ID or Original
  146. PSCI_EXTENDED_STATE_ID := 0
  147. # Enable PSCI OS-initiated mode support
  148. PSCI_OS_INIT_MODE := 0
  149. # By default, BL1 acts as the reset handler, not BL31
  150. RESET_TO_BL31 := 0
  151. # For Chain of Trust
  152. SAVE_KEYS := 0
  153. # Software Delegated Exception support
  154. SDEI_SUPPORT := 0
  155. # True Random Number firmware Interface support
  156. TRNG_SUPPORT := 0
  157. # Check to see if Errata ABI is supported
  158. ERRATA_ABI_SUPPORT := 0
  159. # Check to enable Errata ABI for platforms with non-arm interconnect
  160. ERRATA_NON_ARM_INTERCONNECT := 0
  161. # SMCCC PCI support
  162. SMC_PCI_SUPPORT := 0
  163. # Whether code and read-only data should be put on separate memory pages. The
  164. # platform Makefile is free to override this value.
  165. SEPARATE_CODE_AND_RODATA := 0
  166. # Put NOBITS sections (.bss, stacks, page tables, and coherent memory) in a
  167. # separate memory region, which may be discontiguous from the rest of BL31.
  168. SEPARATE_NOBITS_REGION := 0
  169. # Put BL2 NOLOAD sections (.bss, stacks, page tables) in a separate memory
  170. # region, platform Makefile is free to override this value.
  171. SEPARATE_BL2_NOLOAD_REGION := 0
  172. # Put RW DATA sections (.rwdata) in a separate memory region, which may be
  173. # discontiguous from the rest of BL31.
  174. SEPARATE_RWDATA_REGION := 0
  175. # Put SIMD context data structures in a separate memory region. Platforms
  176. # have the choice to put it outside of default BSS region of EL3 firmware.
  177. SEPARATE_SIMD_SECTION := 0
  178. # If the BL31 image initialisation code is recalimed after use for the secondary
  179. # cores stack
  180. RECLAIM_INIT_CODE := 0
  181. # SPD choice
  182. SPD := none
  183. # Enable the Management Mode (MM)-based Secure Partition Manager implementation
  184. SPM_MM := 0
  185. # Use the FF-A SPMC implementation in EL3.
  186. SPMC_AT_EL3 := 0
  187. # Enable SEL0 SP when SPMC is enabled at EL3
  188. SPMC_AT_EL3_SEL0_SP :=0
  189. # Use SPM at S-EL2 as a default config for SPMD
  190. SPMD_SPM_AT_SEL2 := 1
  191. # Flag to introduce an infinite loop in BL1 just before it exits into the next
  192. # image. This is meant to help debugging the post-BL2 phase.
  193. SPIN_ON_BL1_EXIT := 0
  194. # Flags to build TF with Trusted Boot support
  195. TRUSTED_BOARD_BOOT := 0
  196. # Build option to choose whether Trusted Firmware uses Coherent memory or not.
  197. USE_COHERENT_MEM := 1
  198. # Build option to add debugfs support
  199. USE_DEBUGFS := 0
  200. # Build option to fconf based io
  201. ARM_IO_IN_DTB := 0
  202. # Build option to support SDEI through fconf
  203. SDEI_IN_FCONF := 0
  204. # Build option to support Secure Interrupt descriptors through fconf
  205. SEC_INT_DESC_IN_FCONF := 0
  206. # Build option to choose whether Trusted Firmware uses library at ROM
  207. USE_ROMLIB := 0
  208. # Build option to choose whether the xlat tables of BL images can be read-only.
  209. # Note that this only serves as a higher level option to PLAT_RO_XLAT_TABLES,
  210. # which is the per BL-image option that actually enables the read-only tables
  211. # API. The reason for having this additional option is to have a common high
  212. # level makefile where we can check for incompatible features/build options.
  213. ALLOW_RO_XLAT_TABLES := 0
  214. # Chain of trust.
  215. COT := tbbr
  216. # Use tbbr_oid.h instead of platform_oid.h
  217. USE_TBBR_DEFS := 1
  218. # Whether to enable D-Cache early during warm boot. This is usually
  219. # applicable for platforms wherein interconnect programming is not
  220. # required to enable cache coherency after warm reset (eg: single cluster
  221. # platforms).
  222. WARMBOOT_ENABLE_DCACHE_EARLY := 0
  223. # Default SVE vector length to maximum architected value
  224. SVE_VECTOR_LEN := 2048
  225. SANITIZE_UB := off
  226. # For ARMv8.1 (AArch64) platforms, enabling this option selects the spinlock
  227. # implementation variant using the ARMv8.1-LSE compare-and-swap instruction.
  228. # Default: disabled
  229. USE_SPINLOCK_CAS := 0
  230. # Enable Link Time Optimization
  231. ENABLE_LTO := 0
  232. # This option will include EL2 registers in cpu context save and restore during
  233. # EL2 firmware entry/exit. Internal flag not meant for direct setting.
  234. # Use SPD=spmd and SPMD_SPM_AT_SEL2=1 or ENABLE_RME=1 to enable
  235. # CTX_INCLUDE_EL2_REGS.
  236. CTX_INCLUDE_EL2_REGS := 0
  237. # Enable Memory tag extension which is supported for architecture greater
  238. # than Armv8.5-A
  239. # By default it is set to "no"
  240. SUPPORT_STACK_MEMTAG := no
  241. # Select workaround for AT speculative behaviour.
  242. ERRATA_SPECULATIVE_AT := 0
  243. # Trap RAS error record access from Non secure
  244. RAS_TRAP_NS_ERR_REC_ACCESS := 0
  245. # Build option to create cot descriptors using fconf
  246. COT_DESC_IN_DTB := 0
  247. # Build option to provide OpenSSL directory path
  248. OPENSSL_DIR := /usr
  249. # Select the openssl binary provided in OPENSSL_DIR variable
  250. ifeq ("$(wildcard ${OPENSSL_DIR}/bin)", "")
  251. OPENSSL_BIN_PATH = ${OPENSSL_DIR}/apps
  252. else
  253. OPENSSL_BIN_PATH = ${OPENSSL_DIR}/bin
  254. endif
  255. # Build option to use the SP804 timer instead of the generic one
  256. USE_SP804_TIMER := 0
  257. # Build option to define number of firmware banks, used in firmware update
  258. # metadata structure.
  259. NR_OF_FW_BANKS := 2
  260. # Build option to define number of images in firmware bank, used in firmware
  261. # update metadata structure.
  262. NR_OF_IMAGES_IN_FW_BANK := 1
  263. # Disable Firmware update support by default
  264. PSA_FWU_SUPPORT := 0
  265. # Enable image description in FWU metadata by default when PSA_FWU_SUPPORT
  266. # is enabled.
  267. ifeq ($(PSA_FWU_SUPPORT),1)
  268. PSA_FWU_METADATA_FW_STORE_DESC := 1
  269. else
  270. PSA_FWU_METADATA_FW_STORE_DESC := 0
  271. endif
  272. # Dynamic Root of Trust for Measurement support
  273. DRTM_SUPPORT := 0
  274. # Check platform if cache management operations should be performed.
  275. # Disabled by default.
  276. CONDITIONAL_CMO := 0
  277. # By default, disable SPMD Logical partitions
  278. ENABLE_SPMD_LP := 0
  279. # By default, disable PSA crypto (use MbedTLS legacy crypto API).
  280. PSA_CRYPTO := 0
  281. # getc() support from the console(s).
  282. # Disabled by default because it constitutes an attack vector into TF-A. It
  283. # should only be enabled if there is a use case for it.
  284. ENABLE_CONSOLE_GETC := 0
  285. # Build option to disable EL2 when it is not used.
  286. # Most platforms switch from EL3 to NS-EL2 and hence the unused NS-EL2
  287. # functions must be enabled by platforms if they require it.
  288. # Disabled by default.
  289. INIT_UNUSED_NS_EL2 := 0
  290. # Disable including MPAM EL2 registers in context by default since currently
  291. # it's only enabled for NS world
  292. CTX_INCLUDE_MPAM_REGS := 0
  293. # Enable context memory usage reporting during BL31 setup.
  294. PLATFORM_REPORT_CTX_MEM_USE := 0
  295. # Enable early console
  296. EARLY_CONSOLE := 0
  297. # Allow platforms to save/restore DSU PMU registers over a power cycle.
  298. # Disabled by default and must be enabled by individual platforms.
  299. PRESERVE_DSU_PMU_REGS := 0
  300. # Enable RMMD to forward attestation requests from RMM to EL3.
  301. RMMD_ENABLE_EL3_TOKEN_SIGN := 0