defaults.mk 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. #
  2. # Copyright (c) 2016-2022, 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. BL2_AT_EL3 := 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 BL2_AT_EL3 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 pointer authentication (ARMv8.3-PAuth) registers in cpu context. This
  49. # must be set to 1 if the platform wants to use this feature in the Secure
  50. # world. It is not needed to use it in the Non-secure world.
  51. CTX_INCLUDE_PAUTH_REGS := 0
  52. # Include Nested virtualization control (Armv8.4-NV) registers in cpu context.
  53. # This must be set to 1 if architecture implements Nested Virtualization
  54. # Extension and platform wants to use this feature in the Secure world
  55. CTX_INCLUDE_NEVE_REGS := 0
  56. # Debug build
  57. DEBUG := 0
  58. # By default disable authenticated decryption support.
  59. DECRYPTION_SUPPORT := none
  60. # Build platform
  61. DEFAULT_PLAT := fvp
  62. # Disable the generation of the binary image (ELF only).
  63. DISABLE_BIN_GENERATION := 0
  64. # Disable MTPMU if FEAT_MTPMU is supported. Default is 0 to keep backwards
  65. # compatibility.
  66. DISABLE_MTPMU := 0
  67. # Enable capability to disable authentication dynamically. Only meant for
  68. # development platforms.
  69. DYN_DISABLE_AUTH := 0
  70. # Build option to enable MPAM for lower ELs
  71. ENABLE_MPAM_FOR_LOWER_ELS := 0
  72. # Enable the Maximum Power Mitigation Mechanism on supporting cores.
  73. ENABLE_MPMM := 0
  74. # Enable MPMM configuration via FCONF.
  75. ENABLE_MPMM_FCONF := 0
  76. # Flag to Enable Position Independant support (PIE)
  77. ENABLE_PIE := 0
  78. # Flag to enable Performance Measurement Framework
  79. ENABLE_PMF := 0
  80. # Flag to enable PSCI STATs functionality
  81. ENABLE_PSCI_STAT := 0
  82. # Flag to enable Realm Management Extension (FEAT_RME)
  83. ENABLE_RME := 0
  84. # Flag to enable runtime instrumentation using PMF
  85. ENABLE_RUNTIME_INSTRUMENTATION := 0
  86. # Flag to enable stack corruption protection
  87. ENABLE_STACK_PROTECTOR := 0
  88. # Flag to enable exception handling in EL3
  89. EL3_EXCEPTION_HANDLING := 0
  90. # Flag to enable Branch Target Identification.
  91. # Internal flag not meant for direct setting.
  92. # Use BRANCH_PROTECTION to enable BTI.
  93. ENABLE_BTI := 0
  94. # Flag to enable Pointer Authentication.
  95. # Internal flag not meant for direct setting.
  96. # Use BRANCH_PROTECTION to enable PAUTH.
  97. ENABLE_PAUTH := 0
  98. # Flag to enable access to the HAFGRTR_EL2 register
  99. ENABLE_FEAT_AMUv1 := 0
  100. # Flag to enable AMUv1p1 extension.
  101. ENABLE_FEAT_AMUv1p1 := 0
  102. # Flag to enable CSV2_2 extension.
  103. ENABLE_FEAT_CSV2_2 := 0
  104. # Flag to enable access to the HCRX_EL2 register by setting SCR_EL3.HXEn.
  105. ENABLE_FEAT_HCX := 0
  106. # Flag to enable access to the HDFGRTR_EL2 register
  107. ENABLE_FEAT_FGT := 0
  108. # Flag to enable access to the CNTPOFF_EL2 register
  109. ENABLE_FEAT_ECV := 0
  110. # Flag to enable use of the DIT feature.
  111. ENABLE_FEAT_DIT := 0
  112. # Flag to enable access to Privileged Access Never bit of PSTATE.
  113. ENABLE_FEAT_PAN := 0
  114. # Flag to enable access to the Random Number Generator registers
  115. ENABLE_FEAT_RNG := 0
  116. # Flag to enable support for EL3 trapping of reads of the RNDR and RNDRRS
  117. # registers, by setting SCR_EL3.TRNDR.
  118. ENABLE_FEAT_RNG_TRAP := 0
  119. # Flag to enable Speculation Barrier Instruction
  120. ENABLE_FEAT_SB := 0
  121. # Flag to enable Secure EL-2 feature.
  122. ENABLE_FEAT_SEL2 := 0
  123. # Flag to enable Virtualization Host Extensions
  124. ENABLE_FEAT_VHE := 0
  125. # Flag to enable delayed trapping of WFE instruction (FEAT_TWED)
  126. ENABLE_FEAT_TWED := 0
  127. # By default BL31 encryption disabled
  128. ENCRYPT_BL31 := 0
  129. # By default BL32 encryption disabled
  130. ENCRYPT_BL32 := 0
  131. # Default dummy firmware encryption key
  132. ENC_KEY := 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
  133. # Default dummy nonce for firmware encryption
  134. ENC_NONCE := 1234567890abcdef12345678
  135. # Build flag to treat usage of deprecated platform and framework APIs as error.
  136. ERROR_DEPRECATED := 0
  137. # Fault injection support
  138. FAULT_INJECTION_SUPPORT := 0
  139. # Flag to enable architectural features detection mechanism
  140. FEATURE_DETECTION := 0
  141. # Byte alignment that each component in FIP is aligned to
  142. FIP_ALIGN := 0
  143. # Default FIP file name
  144. FIP_NAME := fip.bin
  145. # Default FWU_FIP file name
  146. FWU_FIP_NAME := fwu_fip.bin
  147. # By default firmware encryption with SSK
  148. FW_ENC_STATUS := 0
  149. # For Chain of Trust
  150. GENERATE_COT := 0
  151. # Hint platform interrupt control layer that Group 0 interrupts are for EL3. By
  152. # default, they are for Secure EL1.
  153. GICV2_G0_FOR_EL3 := 0
  154. # Route NS External Aborts to EL3. Disabled by default; External Aborts are handled
  155. # by lower ELs.
  156. HANDLE_EA_EL3_FIRST_NS := 0
  157. # Secure hash algorithm flag, accepts 3 values: sha256, sha384 and sha512.
  158. # The default value is sha256.
  159. HASH_ALG := sha256
  160. # Whether system coherency is managed in hardware, without explicit software
  161. # operations.
  162. HW_ASSISTED_COHERENCY := 0
  163. # Set the default algorithm for the generation of Trusted Board Boot keys
  164. KEY_ALG := rsa
  165. # Set the default key size in case KEY_ALG is rsa
  166. ifeq ($(KEY_ALG),rsa)
  167. KEY_SIZE := 2048
  168. endif
  169. # Option to build TF with Measured Boot support
  170. MEASURED_BOOT := 0
  171. # NS timer register save and restore
  172. NS_TIMER_SWITCH := 0
  173. # Include lib/libc in the final image
  174. OVERRIDE_LIBC := 0
  175. # Build PL011 UART driver in minimal generic UART mode
  176. PL011_GENERIC_UART := 0
  177. # By default, consider that the platform's reset address is not programmable.
  178. # The platform Makefile is free to override this value.
  179. PROGRAMMABLE_RESET_ADDRESS := 0
  180. # Flag used to choose the power state format: Extended State-ID or Original
  181. PSCI_EXTENDED_STATE_ID := 0
  182. # Enable RAS support
  183. RAS_EXTENSION := 0
  184. # By default, BL1 acts as the reset handler, not BL31
  185. RESET_TO_BL31 := 0
  186. # By default, clear the input registers when RESET_TO_BL31 is enabled
  187. RESET_TO_BL31_WITH_PARAMS := 0
  188. # For Chain of Trust
  189. SAVE_KEYS := 0
  190. # Software Delegated Exception support
  191. SDEI_SUPPORT := 0
  192. # True Random Number firmware Interface support
  193. TRNG_SUPPORT := 0
  194. # Check to see if Errata ABI is supported
  195. ERRATA_ABI_SUPPORT := 0
  196. # Check to enable Errata ABI for platforms with non-arm interconnect
  197. ERRATA_NON_ARM_INTERCONNECT := 0
  198. # SMCCC PCI support
  199. SMC_PCI_SUPPORT := 0
  200. # Whether code and read-only data should be put on separate memory pages. The
  201. # platform Makefile is free to override this value.
  202. SEPARATE_CODE_AND_RODATA := 0
  203. # Put NOBITS sections (.bss, stacks, page tables, and coherent memory) in a
  204. # separate memory region, which may be discontiguous from the rest of BL31.
  205. SEPARATE_NOBITS_REGION := 0
  206. # Put BL2 NOLOAD sections (.bss, stacks, page tables) in a separate memory
  207. # region, platform Makefile is free to override this value.
  208. SEPARATE_BL2_NOLOAD_REGION := 0
  209. # If the BL31 image initialisation code is recalimed after use for the secondary
  210. # cores stack
  211. RECLAIM_INIT_CODE := 0
  212. # SPD choice
  213. SPD := none
  214. # Enable the Management Mode (MM)-based Secure Partition Manager implementation
  215. SPM_MM := 0
  216. # Use the FF-A SPMC implementation in EL3.
  217. SPMC_AT_EL3 := 0
  218. # Use SPM at S-EL2 as a default config for SPMD
  219. SPMD_SPM_AT_SEL2 := 1
  220. # Flag to introduce an infinite loop in BL1 just before it exits into the next
  221. # image. This is meant to help debugging the post-BL2 phase.
  222. SPIN_ON_BL1_EXIT := 0
  223. # Flags to build TF with Trusted Boot support
  224. TRUSTED_BOARD_BOOT := 0
  225. # Build option to choose whether Trusted Firmware uses Coherent memory or not.
  226. USE_COHERENT_MEM := 1
  227. # Build option to add debugfs support
  228. USE_DEBUGFS := 0
  229. # Build option to fconf based io
  230. ARM_IO_IN_DTB := 0
  231. # Build option to support SDEI through fconf
  232. SDEI_IN_FCONF := 0
  233. # Build option to support Secure Interrupt descriptors through fconf
  234. SEC_INT_DESC_IN_FCONF := 0
  235. # Build option to choose whether Trusted Firmware uses library at ROM
  236. USE_ROMLIB := 0
  237. # Build option to choose whether the xlat tables of BL images can be read-only.
  238. # Note that this only serves as a higher level option to PLAT_RO_XLAT_TABLES,
  239. # which is the per BL-image option that actually enables the read-only tables
  240. # API. The reason for having this additional option is to have a common high
  241. # level makefile where we can check for incompatible features/build options.
  242. ALLOW_RO_XLAT_TABLES := 0
  243. # Chain of trust.
  244. COT := tbbr
  245. # Use tbbr_oid.h instead of platform_oid.h
  246. USE_TBBR_DEFS := 1
  247. # Build verbosity
  248. V := 0
  249. # Whether to enable D-Cache early during warm boot. This is usually
  250. # applicable for platforms wherein interconnect programming is not
  251. # required to enable cache coherency after warm reset (eg: single cluster
  252. # platforms).
  253. WARMBOOT_ENABLE_DCACHE_EARLY := 0
  254. # Build option to enable/disable the Statistical Profiling Extensions
  255. ENABLE_SPE_FOR_LOWER_ELS := 1
  256. # SPE is only supported on AArch64 so disable it on AArch32.
  257. ifeq (${ARCH},aarch32)
  258. override ENABLE_SPE_FOR_LOWER_ELS := 0
  259. endif
  260. # Include Memory Tagging Extension registers in cpu context. This must be set
  261. # to 1 if the platform wants to use this feature in the Secure world and MTE is
  262. # enabled at ELX.
  263. CTX_INCLUDE_MTE_REGS := 0
  264. ENABLE_AMU := 0
  265. ENABLE_AMU_AUXILIARY_COUNTERS := 0
  266. ENABLE_AMU_FCONF := 0
  267. AMU_RESTRICT_COUNTERS := 0
  268. # Enable SVE for non-secure world by default
  269. ENABLE_SVE_FOR_NS := 1
  270. # SVE is only supported on AArch64 so disable it on AArch32.
  271. ifeq (${ARCH},aarch32)
  272. override ENABLE_SVE_FOR_NS := 0
  273. endif
  274. ENABLE_SVE_FOR_SWD := 0
  275. # Default SVE vector length to maximum architected value
  276. SVE_VECTOR_LEN := 2048
  277. # SME defaults to disabled
  278. ENABLE_SME_FOR_NS := 0
  279. ENABLE_SME_FOR_SWD := 0
  280. # If SME is enabled then force SVE off
  281. ifeq (${ENABLE_SME_FOR_NS},1)
  282. override ENABLE_SVE_FOR_NS := 0
  283. override ENABLE_SVE_FOR_SWD := 0
  284. endif
  285. SANITIZE_UB := off
  286. # For ARMv8.1 (AArch64) platforms, enabling this option selects the spinlock
  287. # implementation variant using the ARMv8.1-LSE compare-and-swap instruction.
  288. # Default: disabled
  289. USE_SPINLOCK_CAS := 0
  290. # Enable Link Time Optimization
  291. ENABLE_LTO := 0
  292. # Build flag to include EL2 registers in cpu context save and restore during
  293. # S-EL2 firmware entry/exit. This flag is to be used with SPD=spmd option.
  294. # Default is 0.
  295. CTX_INCLUDE_EL2_REGS := 0
  296. # Enable Memory tag extension which is supported for architecture greater
  297. # than Armv8.5-A
  298. # By default it is set to "no"
  299. SUPPORT_STACK_MEMTAG := no
  300. # Select workaround for AT speculative behaviour.
  301. ERRATA_SPECULATIVE_AT := 0
  302. # Trap RAS error record access from Non secure
  303. RAS_TRAP_NS_ERR_REC_ACCESS := 0
  304. # Build option to create cot descriptors using fconf
  305. COT_DESC_IN_DTB := 0
  306. # Build option to provide OpenSSL directory path
  307. OPENSSL_DIR := /usr
  308. # Select the openssl binary provided in OPENSSL_DIR variable
  309. ifeq ("$(wildcard ${OPENSSL_DIR}/bin)", "")
  310. OPENSSL_BIN_PATH = ${OPENSSL_DIR}/apps
  311. else
  312. OPENSSL_BIN_PATH = ${OPENSSL_DIR}/bin
  313. endif
  314. # Build option to use the SP804 timer instead of the generic one
  315. USE_SP804_TIMER := 0
  316. # Build option to define number of firmware banks, used in firmware update
  317. # metadata structure.
  318. NR_OF_FW_BANKS := 2
  319. # Build option to define number of images in firmware bank, used in firmware
  320. # update metadata structure.
  321. NR_OF_IMAGES_IN_FW_BANK := 1
  322. # Disable Firmware update support by default
  323. PSA_FWU_SUPPORT := 0
  324. # By default, disable access of trace buffer control registers from NS
  325. # lower ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused
  326. # if FEAT_TRBE is implemented.
  327. # Note FEAT_TRBE is only supported on AArch64 - therefore do not enable in
  328. # AArch32.
  329. ifneq (${ARCH},aarch32)
  330. ENABLE_TRBE_FOR_NS := 0
  331. else
  332. override ENABLE_TRBE_FOR_NS := 0
  333. endif
  334. # By default, disable access to branch record buffer control registers from NS
  335. # lower ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused
  336. # if FEAT_BRBE is implemented.
  337. ENABLE_BRBE_FOR_NS := 0
  338. # By default, disable access of trace system registers from NS lower
  339. # ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused if
  340. # system register trace is implemented.
  341. ENABLE_SYS_REG_TRACE_FOR_NS := 0
  342. # By default, disable trace filter control registers access to NS
  343. # lower ELs, i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused
  344. # if FEAT_TRF is implemented.
  345. ENABLE_TRF_FOR_NS := 0
  346. # In v8.6+ platforms with delayed trapping of WFE being supported
  347. # via FEAT_TWED, this flag takes the delay value to be set in the
  348. # SCR_EL3.TWEDEL(4bit) field, when FEAT_TWED is implemented.
  349. # By default it takes 0, and need to be updated by the platforms.
  350. TWED_DELAY := 0
  351. # By default, disable the mocking of RSS provided services
  352. PLAT_RSS_NOT_SUPPORTED := 0
  353. # Dynamic Root of Trust for Measurement support
  354. DRTM_SUPPORT := 0
  355. # Check platform if cache management operations should be performed.
  356. # Disabled by default.
  357. CONDITIONAL_CMO := 0