defaults.mk 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  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. # Enables support for the gcc compiler option "-mharden-sls=all".
  158. # By default, disables all SLS hardening.
  159. HARDEN_SLS := 0
  160. # Secure hash algorithm flag, accepts 3 values: sha256, sha384 and sha512.
  161. # The default value is sha256.
  162. HASH_ALG := sha256
  163. # Whether system coherency is managed in hardware, without explicit software
  164. # operations.
  165. HW_ASSISTED_COHERENCY := 0
  166. # Set the default algorithm for the generation of Trusted Board Boot keys
  167. KEY_ALG := rsa
  168. # Set the default key size in case KEY_ALG is rsa
  169. ifeq ($(KEY_ALG),rsa)
  170. KEY_SIZE := 2048
  171. endif
  172. # Option to build TF with Measured Boot support
  173. MEASURED_BOOT := 0
  174. # NS timer register save and restore
  175. NS_TIMER_SWITCH := 0
  176. # Include lib/libc in the final image
  177. OVERRIDE_LIBC := 0
  178. # Build PL011 UART driver in minimal generic UART mode
  179. PL011_GENERIC_UART := 0
  180. # By default, consider that the platform's reset address is not programmable.
  181. # The platform Makefile is free to override this value.
  182. PROGRAMMABLE_RESET_ADDRESS := 0
  183. # Flag used to choose the power state format: Extended State-ID or Original
  184. PSCI_EXTENDED_STATE_ID := 0
  185. # Enable RAS support
  186. RAS_EXTENSION := 0
  187. # By default, BL1 acts as the reset handler, not BL31
  188. RESET_TO_BL31 := 0
  189. # By default, clear the input registers when RESET_TO_BL31 is enabled
  190. RESET_TO_BL31_WITH_PARAMS := 0
  191. # For Chain of Trust
  192. SAVE_KEYS := 0
  193. # Software Delegated Exception support
  194. SDEI_SUPPORT := 0
  195. # True Random Number firmware Interface support
  196. TRNG_SUPPORT := 0
  197. # Check to see if Errata ABI is supported
  198. ERRATA_ABI_SUPPORT := 0
  199. # Check to enable Errata ABI for platforms with non-arm interconnect
  200. ERRATA_NON_ARM_INTERCONNECT := 0
  201. # SMCCC PCI support
  202. SMC_PCI_SUPPORT := 0
  203. # Whether code and read-only data should be put on separate memory pages. The
  204. # platform Makefile is free to override this value.
  205. SEPARATE_CODE_AND_RODATA := 0
  206. # Put NOBITS sections (.bss, stacks, page tables, and coherent memory) in a
  207. # separate memory region, which may be discontiguous from the rest of BL31.
  208. SEPARATE_NOBITS_REGION := 0
  209. # Put BL2 NOLOAD sections (.bss, stacks, page tables) in a separate memory
  210. # region, platform Makefile is free to override this value.
  211. SEPARATE_BL2_NOLOAD_REGION := 0
  212. # If the BL31 image initialisation code is recalimed after use for the secondary
  213. # cores stack
  214. RECLAIM_INIT_CODE := 0
  215. # SPD choice
  216. SPD := none
  217. # Enable the Management Mode (MM)-based Secure Partition Manager implementation
  218. SPM_MM := 0
  219. # Use the FF-A SPMC implementation in EL3.
  220. SPMC_AT_EL3 := 0
  221. # Use SPM at S-EL2 as a default config for SPMD
  222. SPMD_SPM_AT_SEL2 := 1
  223. # Flag to introduce an infinite loop in BL1 just before it exits into the next
  224. # image. This is meant to help debugging the post-BL2 phase.
  225. SPIN_ON_BL1_EXIT := 0
  226. # Flags to build TF with Trusted Boot support
  227. TRUSTED_BOARD_BOOT := 0
  228. # Build option to choose whether Trusted Firmware uses Coherent memory or not.
  229. USE_COHERENT_MEM := 1
  230. # Build option to add debugfs support
  231. USE_DEBUGFS := 0
  232. # Build option to fconf based io
  233. ARM_IO_IN_DTB := 0
  234. # Build option to support SDEI through fconf
  235. SDEI_IN_FCONF := 0
  236. # Build option to support Secure Interrupt descriptors through fconf
  237. SEC_INT_DESC_IN_FCONF := 0
  238. # Build option to choose whether Trusted Firmware uses library at ROM
  239. USE_ROMLIB := 0
  240. # Build option to choose whether the xlat tables of BL images can be read-only.
  241. # Note that this only serves as a higher level option to PLAT_RO_XLAT_TABLES,
  242. # which is the per BL-image option that actually enables the read-only tables
  243. # API. The reason for having this additional option is to have a common high
  244. # level makefile where we can check for incompatible features/build options.
  245. ALLOW_RO_XLAT_TABLES := 0
  246. # Chain of trust.
  247. COT := tbbr
  248. # Use tbbr_oid.h instead of platform_oid.h
  249. USE_TBBR_DEFS := 1
  250. # Build verbosity
  251. V := 0
  252. # Whether to enable D-Cache early during warm boot. This is usually
  253. # applicable for platforms wherein interconnect programming is not
  254. # required to enable cache coherency after warm reset (eg: single cluster
  255. # platforms).
  256. WARMBOOT_ENABLE_DCACHE_EARLY := 0
  257. # Build option to enable/disable the Statistical Profiling Extensions
  258. ENABLE_SPE_FOR_LOWER_ELS := 1
  259. # SPE is only supported on AArch64 so disable it on AArch32.
  260. ifeq (${ARCH},aarch32)
  261. override ENABLE_SPE_FOR_LOWER_ELS := 0
  262. endif
  263. # Include Memory Tagging Extension registers in cpu context. This must be set
  264. # to 1 if the platform wants to use this feature in the Secure world and MTE is
  265. # enabled at ELX.
  266. CTX_INCLUDE_MTE_REGS := 0
  267. ENABLE_AMU := 0
  268. ENABLE_AMU_AUXILIARY_COUNTERS := 0
  269. ENABLE_AMU_FCONF := 0
  270. AMU_RESTRICT_COUNTERS := 0
  271. # Enable SVE for non-secure world by default
  272. ENABLE_SVE_FOR_NS := 1
  273. # SVE is only supported on AArch64 so disable it on AArch32.
  274. ifeq (${ARCH},aarch32)
  275. override ENABLE_SVE_FOR_NS := 0
  276. endif
  277. ENABLE_SVE_FOR_SWD := 0
  278. # Default SVE vector length to maximum architected value
  279. SVE_VECTOR_LEN := 2048
  280. # SME defaults to disabled
  281. ENABLE_SME_FOR_NS := 0
  282. ENABLE_SME_FOR_SWD := 0
  283. # If SME is enabled then force SVE off
  284. ifeq (${ENABLE_SME_FOR_NS},1)
  285. override ENABLE_SVE_FOR_NS := 0
  286. override ENABLE_SVE_FOR_SWD := 0
  287. endif
  288. SANITIZE_UB := off
  289. # For ARMv8.1 (AArch64) platforms, enabling this option selects the spinlock
  290. # implementation variant using the ARMv8.1-LSE compare-and-swap instruction.
  291. # Default: disabled
  292. USE_SPINLOCK_CAS := 0
  293. # Enable Link Time Optimization
  294. ENABLE_LTO := 0
  295. # Build flag to include EL2 registers in cpu context save and restore during
  296. # S-EL2 firmware entry/exit. This flag is to be used with SPD=spmd option.
  297. # Default is 0.
  298. CTX_INCLUDE_EL2_REGS := 0
  299. # Enable Memory tag extension which is supported for architecture greater
  300. # than Armv8.5-A
  301. # By default it is set to "no"
  302. SUPPORT_STACK_MEMTAG := no
  303. # Select workaround for AT speculative behaviour.
  304. ERRATA_SPECULATIVE_AT := 0
  305. # Trap RAS error record access from Non secure
  306. RAS_TRAP_NS_ERR_REC_ACCESS := 0
  307. # Build option to create cot descriptors using fconf
  308. COT_DESC_IN_DTB := 0
  309. # Build option to provide OpenSSL directory path
  310. OPENSSL_DIR := /usr
  311. # Select the openssl binary provided in OPENSSL_DIR variable
  312. ifeq ("$(wildcard ${OPENSSL_DIR}/bin)", "")
  313. OPENSSL_BIN_PATH = ${OPENSSL_DIR}/apps
  314. else
  315. OPENSSL_BIN_PATH = ${OPENSSL_DIR}/bin
  316. endif
  317. # Build option to use the SP804 timer instead of the generic one
  318. USE_SP804_TIMER := 0
  319. # Build option to define number of firmware banks, used in firmware update
  320. # metadata structure.
  321. NR_OF_FW_BANKS := 2
  322. # Build option to define number of images in firmware bank, used in firmware
  323. # update metadata structure.
  324. NR_OF_IMAGES_IN_FW_BANK := 1
  325. # Disable Firmware update support by default
  326. PSA_FWU_SUPPORT := 0
  327. # By default, disable access of trace buffer control registers from NS
  328. # lower ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused
  329. # if FEAT_TRBE is implemented.
  330. # Note FEAT_TRBE is only supported on AArch64 - therefore do not enable in
  331. # AArch32.
  332. ifneq (${ARCH},aarch32)
  333. ENABLE_TRBE_FOR_NS := 0
  334. else
  335. override ENABLE_TRBE_FOR_NS := 0
  336. endif
  337. # By default, disable access to branch record buffer control registers from NS
  338. # lower ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused
  339. # if FEAT_BRBE is implemented.
  340. ENABLE_BRBE_FOR_NS := 0
  341. # By default, disable access of trace system registers from NS lower
  342. # ELs i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused if
  343. # system register trace is implemented.
  344. ENABLE_SYS_REG_TRACE_FOR_NS := 0
  345. # By default, disable trace filter control registers access to NS
  346. # lower ELs, i.e. NS-EL2, or NS-EL1 if NS-EL2 implemented but unused
  347. # if FEAT_TRF is implemented.
  348. ENABLE_TRF_FOR_NS := 0
  349. # In v8.6+ platforms with delayed trapping of WFE being supported
  350. # via FEAT_TWED, this flag takes the delay value to be set in the
  351. # SCR_EL3.TWEDEL(4bit) field, when FEAT_TWED is implemented.
  352. # By default it takes 0, and need to be updated by the platforms.
  353. TWED_DELAY := 0
  354. # By default, disable the mocking of RSS provided services
  355. PLAT_RSS_NOT_SUPPORTED := 0
  356. # Dynamic Root of Trust for Measurement support
  357. DRTM_SUPPORT := 0
  358. # Check platform if cache management operations should be performed.
  359. # Disabled by default.
  360. CONDITIONAL_CMO := 0