1*91f16700Schasinglulu# 2*91f16700Schasinglulu# Copyright (c) 2016-2023, Arm Limited. All rights reserved. 3*91f16700Schasinglulu# 4*91f16700Schasinglulu# SPDX-License-Identifier: BSD-3-Clause 5*91f16700Schasinglulu# 6*91f16700Schasinglulu 7*91f16700Schasinglulu# Default, static values for build variables, listed in alphabetic order. 8*91f16700Schasinglulu# Dependencies between build options, if any, are handled in the top-level 9*91f16700Schasinglulu# Makefile, after this file is included. This ensures that the former is better 10*91f16700Schasinglulu# poised to handle dependencies, as all build variables would have a default 11*91f16700Schasinglulu# value by then. 12*91f16700Schasinglulu 13*91f16700Schasinglulu# Use T32 by default 14*91f16700SchasingluluAARCH32_INSTRUCTION_SET := T32 15*91f16700Schasinglulu 16*91f16700Schasinglulu# The AArch32 Secure Payload to be built as BL32 image 17*91f16700SchasingluluAARCH32_SP := none 18*91f16700Schasinglulu 19*91f16700Schasinglulu# The Target build architecture. Supported values are: aarch64, aarch32. 20*91f16700SchasingluluARCH := aarch64 21*91f16700Schasinglulu 22*91f16700Schasinglulu# ARM Architecture feature modifiers: none by default 23*91f16700SchasingluluARM_ARCH_FEATURE := none 24*91f16700Schasinglulu 25*91f16700Schasinglulu# ARM Architecture major and minor versions: 8.0 by default. 26*91f16700SchasingluluARM_ARCH_MAJOR := 8 27*91f16700SchasingluluARM_ARCH_MINOR := 0 28*91f16700Schasinglulu 29*91f16700Schasinglulu# Base commit to perform code check on 30*91f16700SchasingluluBASE_COMMIT := origin/master 31*91f16700Schasinglulu 32*91f16700Schasinglulu# Execute BL2 at EL3 33*91f16700SchasingluluRESET_TO_BL2 := 0 34*91f16700Schasinglulu 35*91f16700Schasinglulu# Only use SP packages if SP layout JSON is defined 36*91f16700SchasingluluBL2_ENABLE_SP_LOAD := 0 37*91f16700Schasinglulu 38*91f16700Schasinglulu# BL2 image is stored in XIP memory, for now, this option is only supported 39*91f16700Schasinglulu# when RESET_TO_BL2 is 1. 40*91f16700SchasingluluBL2_IN_XIP_MEM := 0 41*91f16700Schasinglulu 42*91f16700Schasinglulu# Do dcache invalidate upon BL2 entry at EL3 43*91f16700SchasingluluBL2_INV_DCACHE := 1 44*91f16700Schasinglulu 45*91f16700Schasinglulu# Select the branch protection features to use. 46*91f16700SchasingluluBRANCH_PROTECTION := 0 47*91f16700Schasinglulu 48*91f16700Schasinglulu# By default, consider that the platform may release several CPUs out of reset. 49*91f16700Schasinglulu# The platform Makefile is free to override this value. 50*91f16700SchasingluluCOLD_BOOT_SINGLE_CPU := 0 51*91f16700Schasinglulu 52*91f16700Schasinglulu# Flag to compile in coreboot support code. Exclude by default. The coreboot 53*91f16700Schasinglulu# Makefile system will set this when compiling TF as part of a coreboot image. 54*91f16700SchasingluluCOREBOOT := 0 55*91f16700Schasinglulu 56*91f16700Schasinglulu# For Chain of Trust 57*91f16700SchasingluluCREATE_KEYS := 1 58*91f16700Schasinglulu 59*91f16700Schasinglulu# Build flag to include AArch32 registers in cpu context save and restore during 60*91f16700Schasinglulu# world switch. This flag must be set to 0 for AArch64-only platforms. 61*91f16700SchasingluluCTX_INCLUDE_AARCH32_REGS := 1 62*91f16700Schasinglulu 63*91f16700Schasinglulu# Include FP registers in cpu context 64*91f16700SchasingluluCTX_INCLUDE_FPREGS := 0 65*91f16700Schasinglulu 66*91f16700Schasinglulu# Debug build 67*91f16700SchasingluluDEBUG := 0 68*91f16700Schasinglulu 69*91f16700Schasinglulu# By default disable authenticated decryption support. 70*91f16700SchasingluluDECRYPTION_SUPPORT := none 71*91f16700Schasinglulu 72*91f16700Schasinglulu# Build platform 73*91f16700SchasingluluDEFAULT_PLAT := fvp 74*91f16700Schasinglulu 75*91f16700Schasinglulu# Disable the generation of the binary image (ELF only). 76*91f16700SchasingluluDISABLE_BIN_GENERATION := 0 77*91f16700Schasinglulu 78*91f16700Schasinglulu# Enable capability to disable authentication dynamically. Only meant for 79*91f16700Schasinglulu# development platforms. 80*91f16700SchasingluluDYN_DISABLE_AUTH := 0 81*91f16700Schasinglulu 82*91f16700Schasinglulu# Enable the Maximum Power Mitigation Mechanism on supporting cores. 83*91f16700SchasingluluENABLE_MPMM := 0 84*91f16700Schasinglulu 85*91f16700Schasinglulu# Enable MPMM configuration via FCONF. 86*91f16700SchasingluluENABLE_MPMM_FCONF := 0 87*91f16700Schasinglulu 88*91f16700Schasinglulu# Flag to Enable Position Independant support (PIE) 89*91f16700SchasingluluENABLE_PIE := 0 90*91f16700Schasinglulu 91*91f16700Schasinglulu# Flag to enable Performance Measurement Framework 92*91f16700SchasingluluENABLE_PMF := 0 93*91f16700Schasinglulu 94*91f16700Schasinglulu# Flag to enable PSCI STATs functionality 95*91f16700SchasingluluENABLE_PSCI_STAT := 0 96*91f16700Schasinglulu 97*91f16700Schasinglulu# Flag to enable runtime instrumentation using PMF 98*91f16700SchasingluluENABLE_RUNTIME_INSTRUMENTATION := 0 99*91f16700Schasinglulu 100*91f16700Schasinglulu# Flag to enable stack corruption protection 101*91f16700SchasingluluENABLE_STACK_PROTECTOR := 0 102*91f16700Schasinglulu 103*91f16700Schasinglulu# Flag to enable exception handling in EL3 104*91f16700SchasingluluEL3_EXCEPTION_HANDLING := 0 105*91f16700Schasinglulu 106*91f16700Schasinglulu# By default BL31 encryption disabled 107*91f16700SchasingluluENCRYPT_BL31 := 0 108*91f16700Schasinglulu 109*91f16700Schasinglulu# By default BL32 encryption disabled 110*91f16700SchasingluluENCRYPT_BL32 := 0 111*91f16700Schasinglulu 112*91f16700Schasinglulu# Default dummy firmware encryption key 113*91f16700SchasingluluENC_KEY := 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef 114*91f16700Schasinglulu 115*91f16700Schasinglulu# Default dummy nonce for firmware encryption 116*91f16700SchasingluluENC_NONCE := 1234567890abcdef12345678 117*91f16700Schasinglulu 118*91f16700Schasinglulu# Build flag to treat usage of deprecated platform and framework APIs as error. 119*91f16700SchasingluluERROR_DEPRECATED := 0 120*91f16700Schasinglulu 121*91f16700Schasinglulu# Fault injection support 122*91f16700SchasingluluFAULT_INJECTION_SUPPORT := 0 123*91f16700Schasinglulu 124*91f16700Schasinglulu# Flag to enable architectural features detection mechanism 125*91f16700SchasingluluFEATURE_DETECTION := 0 126*91f16700Schasinglulu 127*91f16700Schasinglulu# Byte alignment that each component in FIP is aligned to 128*91f16700SchasingluluFIP_ALIGN := 0 129*91f16700Schasinglulu 130*91f16700Schasinglulu# Default FIP file name 131*91f16700SchasingluluFIP_NAME := fip.bin 132*91f16700Schasinglulu 133*91f16700Schasinglulu# Default FWU_FIP file name 134*91f16700SchasingluluFWU_FIP_NAME := fwu_fip.bin 135*91f16700Schasinglulu 136*91f16700Schasinglulu# By default firmware encryption with SSK 137*91f16700SchasingluluFW_ENC_STATUS := 0 138*91f16700Schasinglulu 139*91f16700Schasinglulu# For Chain of Trust 140*91f16700SchasingluluGENERATE_COT := 0 141*91f16700Schasinglulu 142*91f16700Schasinglulu# Hint platform interrupt control layer that Group 0 interrupts are for EL3. By 143*91f16700Schasinglulu# default, they are for Secure EL1. 144*91f16700SchasingluluGICV2_G0_FOR_EL3 := 0 145*91f16700Schasinglulu 146*91f16700Schasinglulu# Route NS External Aborts to EL3. Disabled by default; External Aborts are handled 147*91f16700Schasinglulu# by lower ELs. 148*91f16700SchasingluluHANDLE_EA_EL3_FIRST_NS := 0 149*91f16700Schasinglulu 150*91f16700Schasinglulu# Enable Handoff protocol using transfer lists 151*91f16700SchasingluluTRANSFER_LIST := 0 152*91f16700Schasinglulu 153*91f16700Schasinglulu# Secure hash algorithm flag, accepts 3 values: sha256, sha384 and sha512. 154*91f16700Schasinglulu# The default value is sha256. 155*91f16700SchasingluluHASH_ALG := sha256 156*91f16700Schasinglulu 157*91f16700Schasinglulu# Whether system coherency is managed in hardware, without explicit software 158*91f16700Schasinglulu# operations. 159*91f16700SchasingluluHW_ASSISTED_COHERENCY := 0 160*91f16700Schasinglulu 161*91f16700Schasinglulu# Flag to enable trapping of implementation defined sytem registers 162*91f16700SchasingluluIMPDEF_SYSREG_TRAP := 0 163*91f16700Schasinglulu 164*91f16700Schasinglulu# Set the default algorithm for the generation of Trusted Board Boot keys 165*91f16700SchasingluluKEY_ALG := rsa 166*91f16700Schasinglulu 167*91f16700Schasinglulu# Set the default key size in case KEY_ALG is rsa 168*91f16700Schasingluluifeq ($(KEY_ALG),rsa) 169*91f16700SchasingluluKEY_SIZE := 2048 170*91f16700Schasingluluendif 171*91f16700Schasinglulu 172*91f16700Schasinglulu# Option to build TF with Measured Boot support 173*91f16700SchasingluluMEASURED_BOOT := 0 174*91f16700Schasinglulu 175*91f16700Schasinglulu# NS timer register save and restore 176*91f16700SchasingluluNS_TIMER_SWITCH := 0 177*91f16700Schasinglulu 178*91f16700Schasinglulu# Include lib/libc in the final image 179*91f16700SchasingluluOVERRIDE_LIBC := 0 180*91f16700Schasinglulu 181*91f16700Schasinglulu# Build PL011 UART driver in minimal generic UART mode 182*91f16700SchasingluluPL011_GENERIC_UART := 0 183*91f16700Schasinglulu 184*91f16700Schasinglulu# By default, consider that the platform's reset address is not programmable. 185*91f16700Schasinglulu# The platform Makefile is free to override this value. 186*91f16700SchasingluluPROGRAMMABLE_RESET_ADDRESS := 0 187*91f16700Schasinglulu 188*91f16700Schasinglulu# Flag used to choose the power state format: Extended State-ID or Original 189*91f16700SchasingluluPSCI_EXTENDED_STATE_ID := 0 190*91f16700Schasinglulu 191*91f16700Schasinglulu# Enable PSCI OS-initiated mode support 192*91f16700SchasingluluPSCI_OS_INIT_MODE := 0 193*91f16700Schasinglulu 194*91f16700Schasinglulu# By default, BL1 acts as the reset handler, not BL31 195*91f16700SchasingluluRESET_TO_BL31 := 0 196*91f16700Schasinglulu 197*91f16700Schasinglulu# For Chain of Trust 198*91f16700SchasingluluSAVE_KEYS := 0 199*91f16700Schasinglulu 200*91f16700Schasinglulu# Software Delegated Exception support 201*91f16700SchasingluluSDEI_SUPPORT := 0 202*91f16700Schasinglulu 203*91f16700Schasinglulu# True Random Number firmware Interface support 204*91f16700SchasingluluTRNG_SUPPORT := 0 205*91f16700Schasinglulu 206*91f16700Schasinglulu# Check to see if Errata ABI is supported 207*91f16700SchasingluluERRATA_ABI_SUPPORT := 0 208*91f16700Schasinglulu 209*91f16700Schasinglulu# Check to enable Errata ABI for platforms with non-arm interconnect 210*91f16700SchasingluluERRATA_NON_ARM_INTERCONNECT := 0 211*91f16700Schasinglulu 212*91f16700Schasinglulu# SMCCC PCI support 213*91f16700SchasingluluSMC_PCI_SUPPORT := 0 214*91f16700Schasinglulu 215*91f16700Schasinglulu# Whether code and read-only data should be put on separate memory pages. The 216*91f16700Schasinglulu# platform Makefile is free to override this value. 217*91f16700SchasingluluSEPARATE_CODE_AND_RODATA := 0 218*91f16700Schasinglulu 219*91f16700Schasinglulu# Put NOBITS sections (.bss, stacks, page tables, and coherent memory) in a 220*91f16700Schasinglulu# separate memory region, which may be discontiguous from the rest of BL31. 221*91f16700SchasingluluSEPARATE_NOBITS_REGION := 0 222*91f16700Schasinglulu 223*91f16700Schasinglulu# Put BL2 NOLOAD sections (.bss, stacks, page tables) in a separate memory 224*91f16700Schasinglulu# region, platform Makefile is free to override this value. 225*91f16700SchasingluluSEPARATE_BL2_NOLOAD_REGION := 0 226*91f16700Schasinglulu 227*91f16700Schasinglulu# If the BL31 image initialisation code is recalimed after use for the secondary 228*91f16700Schasinglulu# cores stack 229*91f16700SchasingluluRECLAIM_INIT_CODE := 0 230*91f16700Schasinglulu 231*91f16700Schasinglulu# SPD choice 232*91f16700SchasingluluSPD := none 233*91f16700Schasinglulu 234*91f16700Schasinglulu# Enable the Management Mode (MM)-based Secure Partition Manager implementation 235*91f16700SchasingluluSPM_MM := 0 236*91f16700Schasinglulu 237*91f16700Schasinglulu# Use the FF-A SPMC implementation in EL3. 238*91f16700SchasingluluSPMC_AT_EL3 := 0 239*91f16700Schasinglulu 240*91f16700Schasinglulu# Enable SEL0 SP when SPMC is enabled at EL3 241*91f16700SchasingluluSPMC_AT_EL3_SEL0_SP :=0 242*91f16700Schasinglulu 243*91f16700Schasinglulu# Use SPM at S-EL2 as a default config for SPMD 244*91f16700SchasingluluSPMD_SPM_AT_SEL2 := 1 245*91f16700Schasinglulu 246*91f16700Schasinglulu# Flag to introduce an infinite loop in BL1 just before it exits into the next 247*91f16700Schasinglulu# image. This is meant to help debugging the post-BL2 phase. 248*91f16700SchasingluluSPIN_ON_BL1_EXIT := 0 249*91f16700Schasinglulu 250*91f16700Schasinglulu# Flags to build TF with Trusted Boot support 251*91f16700SchasingluluTRUSTED_BOARD_BOOT := 0 252*91f16700Schasinglulu 253*91f16700Schasinglulu# Build option to choose whether Trusted Firmware uses Coherent memory or not. 254*91f16700SchasingluluUSE_COHERENT_MEM := 1 255*91f16700Schasinglulu 256*91f16700Schasinglulu# Build option to add debugfs support 257*91f16700SchasingluluUSE_DEBUGFS := 0 258*91f16700Schasinglulu 259*91f16700Schasinglulu# Build option to fconf based io 260*91f16700SchasingluluARM_IO_IN_DTB := 0 261*91f16700Schasinglulu 262*91f16700Schasinglulu# Build option to support SDEI through fconf 263*91f16700SchasingluluSDEI_IN_FCONF := 0 264*91f16700Schasinglulu 265*91f16700Schasinglulu# Build option to support Secure Interrupt descriptors through fconf 266*91f16700SchasingluluSEC_INT_DESC_IN_FCONF := 0 267*91f16700Schasinglulu 268*91f16700Schasinglulu# Build option to choose whether Trusted Firmware uses library at ROM 269*91f16700SchasingluluUSE_ROMLIB := 0 270*91f16700Schasinglulu 271*91f16700Schasinglulu# Build option to choose whether the xlat tables of BL images can be read-only. 272*91f16700Schasinglulu# Note that this only serves as a higher level option to PLAT_RO_XLAT_TABLES, 273*91f16700Schasinglulu# which is the per BL-image option that actually enables the read-only tables 274*91f16700Schasinglulu# API. The reason for having this additional option is to have a common high 275*91f16700Schasinglulu# level makefile where we can check for incompatible features/build options. 276*91f16700SchasingluluALLOW_RO_XLAT_TABLES := 0 277*91f16700Schasinglulu 278*91f16700Schasinglulu# Chain of trust. 279*91f16700SchasingluluCOT := tbbr 280*91f16700Schasinglulu 281*91f16700Schasinglulu# Use tbbr_oid.h instead of platform_oid.h 282*91f16700SchasingluluUSE_TBBR_DEFS := 1 283*91f16700Schasinglulu 284*91f16700Schasinglulu# Build verbosity 285*91f16700SchasingluluV := 0 286*91f16700Schasinglulu 287*91f16700Schasinglulu# Whether to enable D-Cache early during warm boot. This is usually 288*91f16700Schasinglulu# applicable for platforms wherein interconnect programming is not 289*91f16700Schasinglulu# required to enable cache coherency after warm reset (eg: single cluster 290*91f16700Schasinglulu# platforms). 291*91f16700SchasingluluWARMBOOT_ENABLE_DCACHE_EARLY := 0 292*91f16700Schasinglulu 293*91f16700Schasinglulu# Default SVE vector length to maximum architected value 294*91f16700SchasingluluSVE_VECTOR_LEN := 2048 295*91f16700Schasinglulu 296*91f16700SchasingluluSANITIZE_UB := off 297*91f16700Schasinglulu 298*91f16700Schasinglulu# For ARMv8.1 (AArch64) platforms, enabling this option selects the spinlock 299*91f16700Schasinglulu# implementation variant using the ARMv8.1-LSE compare-and-swap instruction. 300*91f16700Schasinglulu# Default: disabled 301*91f16700SchasingluluUSE_SPINLOCK_CAS := 0 302*91f16700Schasinglulu 303*91f16700Schasinglulu# Enable Link Time Optimization 304*91f16700SchasingluluENABLE_LTO := 0 305*91f16700Schasinglulu 306*91f16700Schasinglulu# This option will include EL2 registers in cpu context save and restore during 307*91f16700Schasinglulu# EL2 firmware entry/exit. Internal flag not meant for direct setting. 308*91f16700Schasinglulu# Use SPD=spmd and SPMD_SPM_AT_SEL2=1 or ENABLE_RME=1 to enable 309*91f16700Schasinglulu# CTX_INCLUDE_EL2_REGS. 310*91f16700SchasingluluCTX_INCLUDE_EL2_REGS := 0 311*91f16700Schasinglulu 312*91f16700Schasinglulu# Enable Memory tag extension which is supported for architecture greater 313*91f16700Schasinglulu# than Armv8.5-A 314*91f16700Schasinglulu# By default it is set to "no" 315*91f16700SchasingluluSUPPORT_STACK_MEMTAG := no 316*91f16700Schasinglulu 317*91f16700Schasinglulu# Select workaround for AT speculative behaviour. 318*91f16700SchasingluluERRATA_SPECULATIVE_AT := 0 319*91f16700Schasinglulu 320*91f16700Schasinglulu# Trap RAS error record access from Non secure 321*91f16700SchasingluluRAS_TRAP_NS_ERR_REC_ACCESS := 0 322*91f16700Schasinglulu 323*91f16700Schasinglulu# Build option to create cot descriptors using fconf 324*91f16700SchasingluluCOT_DESC_IN_DTB := 0 325*91f16700Schasinglulu 326*91f16700Schasinglulu# Build option to provide OpenSSL directory path 327*91f16700SchasingluluOPENSSL_DIR := /usr 328*91f16700Schasinglulu 329*91f16700Schasinglulu# Select the openssl binary provided in OPENSSL_DIR variable 330*91f16700Schasingluluifeq ("$(wildcard ${OPENSSL_DIR}/bin)", "") 331*91f16700Schasinglulu OPENSSL_BIN_PATH = ${OPENSSL_DIR}/apps 332*91f16700Schasingluluelse 333*91f16700Schasinglulu OPENSSL_BIN_PATH = ${OPENSSL_DIR}/bin 334*91f16700Schasingluluendif 335*91f16700Schasinglulu 336*91f16700Schasinglulu# Build option to use the SP804 timer instead of the generic one 337*91f16700SchasingluluUSE_SP804_TIMER := 0 338*91f16700Schasinglulu 339*91f16700Schasinglulu# Build option to define number of firmware banks, used in firmware update 340*91f16700Schasinglulu# metadata structure. 341*91f16700SchasingluluNR_OF_FW_BANKS := 2 342*91f16700Schasinglulu 343*91f16700Schasinglulu# Build option to define number of images in firmware bank, used in firmware 344*91f16700Schasinglulu# update metadata structure. 345*91f16700SchasingluluNR_OF_IMAGES_IN_FW_BANK := 1 346*91f16700Schasinglulu 347*91f16700Schasinglulu# Disable Firmware update support by default 348*91f16700SchasingluluPSA_FWU_SUPPORT := 0 349*91f16700Schasinglulu 350*91f16700Schasinglulu# By default, disable the mocking of RSS provided services 351*91f16700SchasingluluPLAT_RSS_NOT_SUPPORTED := 0 352*91f16700Schasinglulu 353*91f16700Schasinglulu# Dynamic Root of Trust for Measurement support 354*91f16700SchasingluluDRTM_SUPPORT := 0 355*91f16700Schasinglulu 356*91f16700Schasinglulu# Check platform if cache management operations should be performed. 357*91f16700Schasinglulu# Disabled by default. 358*91f16700SchasingluluCONDITIONAL_CMO := 0 359*91f16700Schasinglulu 360*91f16700Schasinglulu# By default, disable SPMD Logical partitions 361*91f16700SchasingluluENABLE_SPMD_LP := 0 362*91f16700Schasinglulu 363*91f16700Schasinglulu# By default, disable PSA crypto (use MbedTLS legacy crypto API). 364*91f16700SchasingluluPSA_CRYPTO := 0 365*91f16700Schasinglulu 366*91f16700Schasinglulu# getc() support from the console(s). 367*91f16700Schasinglulu# Disabled by default because it constitutes an attack vector into TF-A. It 368*91f16700Schasinglulu# should only be enabled if there is a use case for it. 369*91f16700SchasingluluENABLE_CONSOLE_GETC := 0 370*91f16700Schasinglulu 371*91f16700Schasinglulu# Build option to disable EL2 when it is not used. 372*91f16700Schasinglulu# Most platforms switch from EL3 to NS-EL2 and hence the unused NS-EL2 373*91f16700Schasinglulu# functions must be enabled by platforms if they require it. 374*91f16700Schasinglulu# Disabled by default. 375*91f16700SchasingluluINIT_UNUSED_NS_EL2 := 0 376*91f16700Schasinglulu 377*91f16700Schasinglulu# 378*91f16700Schasinglulu# By default, Laguna UART1 used for console. 379*91f16700Schasinglulu# UART1 IRQ is configured as non-secure 380*91f16700SchasingluluENABLE_SEC_UART := 0 381