12fae4b1eSJeenu Viswambharan# 28c105290SAlexei Fedorov# Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved. 32fae4b1eSJeenu Viswambharan# 482cb2c1aSdp-arm# SPDX-License-Identifier: BSD-3-Clause 52fae4b1eSJeenu Viswambharan# 62fae4b1eSJeenu Viswambharan 72fae4b1eSJeenu Viswambharan# Default, static values for build variables, listed in alphabetic order. 82fae4b1eSJeenu Viswambharan# Dependencies between build options, if any, are handled in the top-level 92fae4b1eSJeenu Viswambharan# Makefile, after this file is included. This ensures that the former is better 102fae4b1eSJeenu Viswambharan# poised to handle dependencies, as all build variables would have a default 112fae4b1eSJeenu Viswambharan# value by then. 122fae4b1eSJeenu Viswambharan 138fd9d4d5SAntonio Nino Diaz# Use T32 by default 148fd9d4d5SAntonio Nino DiazAARCH32_INSTRUCTION_SET := T32 158fd9d4d5SAntonio Nino Diaz 162fae4b1eSJeenu Viswambharan# The AArch32 Secure Payload to be built as BL32 image 172fae4b1eSJeenu ViswambharanAARCH32_SP := none 182fae4b1eSJeenu Viswambharan 192fae4b1eSJeenu Viswambharan# The Target build architecture. Supported values are: aarch64, aarch32. 202fae4b1eSJeenu ViswambharanARCH := aarch64 212fae4b1eSJeenu Viswambharan 22c877b414SJeenu Viswambharan# ARM Architecture major and minor versions: 8.0 by default. 23c877b414SJeenu ViswambharanARM_ARCH_MAJOR := 8 24c877b414SJeenu ViswambharanARM_ARCH_MINOR := 0 25c877b414SJeenu Viswambharan 262fae4b1eSJeenu Viswambharan# Base commit to perform code check on 272fae4b1eSJeenu ViswambharanBASE_COMMIT := origin/master 282fae4b1eSJeenu Viswambharan 29b1d27b48SRoberto Vargas# Execute BL2 at EL3 30b1d27b48SRoberto VargasBL2_AT_EL3 := 0 31b1d27b48SRoberto Vargas 327d173fc5SJiafei Pan# BL2 image is stored in XIP memory, for now, this option is only supported 337d173fc5SJiafei Pan# when BL2_AT_EL3 is 1. 347d173fc5SJiafei PanBL2_IN_XIP_MEM := 0 357d173fc5SJiafei Pan 36b90f207aSHadi Asyrafi# Do dcache invalidate upon BL2 entry at EL3 37b90f207aSHadi AsyrafiBL2_INV_DCACHE := 1 38b90f207aSHadi Asyrafi 399fc59639SAlexei Fedorov# Select the branch protection features to use. 409fc59639SAlexei FedorovBRANCH_PROTECTION := 0 419fc59639SAlexei Fedorov 422fae4b1eSJeenu Viswambharan# By default, consider that the platform may release several CPUs out of reset. 432fae4b1eSJeenu Viswambharan# The platform Makefile is free to override this value. 442fae4b1eSJeenu ViswambharanCOLD_BOOT_SINGLE_CPU := 0 452fae4b1eSJeenu Viswambharan 463429c77aSJulius Werner# Flag to compile in coreboot support code. Exclude by default. The coreboot 473429c77aSJulius Werner# Makefile system will set this when compiling TF as part of a coreboot image. 483429c77aSJulius WernerCOREBOOT := 0 493429c77aSJulius Werner 502fae4b1eSJeenu Viswambharan# For Chain of Trust 512fae4b1eSJeenu ViswambharanCREATE_KEYS := 1 522fae4b1eSJeenu Viswambharan 532fae4b1eSJeenu Viswambharan# Build flag to include AArch32 registers in cpu context save and restore during 542fae4b1eSJeenu Viswambharan# world switch. This flag must be set to 0 for AArch64-only platforms. 552fae4b1eSJeenu ViswambharanCTX_INCLUDE_AARCH32_REGS := 1 562fae4b1eSJeenu Viswambharan 572fae4b1eSJeenu Viswambharan# Include FP registers in cpu context 582fae4b1eSJeenu ViswambharanCTX_INCLUDE_FPREGS := 0 592fae4b1eSJeenu Viswambharan 605283962eSAntonio Nino Diaz# Include pointer authentication (ARMv8.3-PAuth) registers in cpu context. This 615283962eSAntonio Nino Diaz# must be set to 1 if the platform wants to use this feature in the Secure 625283962eSAntonio Nino Diaz# world. It is not needed to use it in the Non-secure world. 635283962eSAntonio Nino DiazCTX_INCLUDE_PAUTH_REGS := 0 645283962eSAntonio Nino Diaz 652fae4b1eSJeenu Viswambharan# Debug build 662fae4b1eSJeenu ViswambharanDEBUG := 0 672fae4b1eSJeenu Viswambharan 687cda17bbSSumit Garg# By default disable authenticated decryption support. 697cda17bbSSumit GargDECRYPTION_SUPPORT := none 707cda17bbSSumit Garg 712fae4b1eSJeenu Viswambharan# Build platform 722fae4b1eSJeenu ViswambharanDEFAULT_PLAT := fvp 732fae4b1eSJeenu Viswambharan 749e4609f1SChristoph Müllner# Disable the generation of the binary image (ELF only). 759e4609f1SChristoph MüllnerDISABLE_BIN_GENERATION := 0 769e4609f1SChristoph Müllner 77209a60ccSSoby Mathew# Enable capability to disable authentication dynamically. Only meant for 78209a60ccSSoby Mathew# development platforms. 79209a60ccSSoby MathewDYN_DISABLE_AUTH := 0 80209a60ccSSoby Mathew 815f835918SJeenu Viswambharan# Build option to enable MPAM for lower ELs 825f835918SJeenu ViswambharanENABLE_MPAM_FOR_LOWER_ELS := 0 835f835918SJeenu Viswambharan 843bd17c0fSSoby Mathew# Flag to Enable Position Independant support (PIE) 853bd17c0fSSoby MathewENABLE_PIE := 0 863bd17c0fSSoby Mathew 872fae4b1eSJeenu Viswambharan# Flag to enable Performance Measurement Framework 882fae4b1eSJeenu ViswambharanENABLE_PMF := 0 892fae4b1eSJeenu Viswambharan 902fae4b1eSJeenu Viswambharan# Flag to enable PSCI STATs functionality 912fae4b1eSJeenu ViswambharanENABLE_PSCI_STAT := 0 922fae4b1eSJeenu Viswambharan 932fae4b1eSJeenu Viswambharan# Flag to enable runtime instrumentation using PMF 942fae4b1eSJeenu ViswambharanENABLE_RUNTIME_INSTRUMENTATION := 0 952fae4b1eSJeenu Viswambharan 9651faada7SDouglas Raillard# Flag to enable stack corruption protection 9751faada7SDouglas RaillardENABLE_STACK_PROTECTOR := 0 9851faada7SDouglas Raillard 9921b818c0SJeenu Viswambharan# Flag to enable exception handling in EL3 10021b818c0SJeenu ViswambharanEL3_EXCEPTION_HANDLING := 0 10121b818c0SJeenu Viswambharan 1029fc59639SAlexei Fedorov# Flag to enable Branch Target Identification. 1039fc59639SAlexei Fedorov# Internal flag not meant for direct setting. 1049fc59639SAlexei Fedorov# Use BRANCH_PROTECTION to enable BTI. 1059fc59639SAlexei FedorovENABLE_BTI := 0 1069fc59639SAlexei Fedorov 1079fc59639SAlexei Fedorov# Flag to enable Pointer Authentication. 1089fc59639SAlexei Fedorov# Internal flag not meant for direct setting. 1099fc59639SAlexei Fedorov# Use BRANCH_PROTECTION to enable PAUTH. 110b86048c4SAntonio Nino DiazENABLE_PAUTH := 0 111b86048c4SAntonio Nino Diaz 112c6ba9b45SSumit Garg# By default BL31 encryption disabled 113c6ba9b45SSumit GargENCRYPT_BL31 := 0 114c6ba9b45SSumit Garg 115c6ba9b45SSumit Garg# By default BL32 encryption disabled 116c6ba9b45SSumit GargENCRYPT_BL32 := 0 117c6ba9b45SSumit Garg 118c6ba9b45SSumit Garg# Default dummy firmware encryption key 119c6ba9b45SSumit GargENC_KEY := 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef 120c6ba9b45SSumit Garg 121c6ba9b45SSumit Garg# Default dummy nonce for firmware encryption 122c6ba9b45SSumit GargENC_NONCE := 1234567890abcdef12345678 123c6ba9b45SSumit Garg 1242fae4b1eSJeenu Viswambharan# Build flag to treat usage of deprecated platform and framework APIs as error. 1252fae4b1eSJeenu ViswambharanERROR_DEPRECATED := 0 1262fae4b1eSJeenu Viswambharan 1271a7c1cfeSJeenu Viswambharan# Fault injection support 1281a7c1cfeSJeenu ViswambharanFAULT_INJECTION_SUPPORT := 0 1291a7c1cfeSJeenu Viswambharan 1301c75d5dfSMasahiro Yamada# Byte alignment that each component in FIP is aligned to 1311c75d5dfSMasahiro YamadaFIP_ALIGN := 0 1321c75d5dfSMasahiro Yamada 1332fae4b1eSJeenu Viswambharan# Default FIP file name 1342fae4b1eSJeenu ViswambharanFIP_NAME := fip.bin 1352fae4b1eSJeenu Viswambharan 1362fae4b1eSJeenu Viswambharan# Default FWU_FIP file name 1372fae4b1eSJeenu ViswambharanFWU_FIP_NAME := fwu_fip.bin 1382fae4b1eSJeenu Viswambharan 139c6ba9b45SSumit Garg# By default firmware encryption with SSK 140c6ba9b45SSumit GargFW_ENC_STATUS := 0 141c6ba9b45SSumit Garg 1422fae4b1eSJeenu Viswambharan# For Chain of Trust 1432fae4b1eSJeenu ViswambharanGENERATE_COT := 0 1442fae4b1eSJeenu Viswambharan 14574dce7faSJeenu Viswambharan# Hint platform interrupt control layer that Group 0 interrupts are for EL3. By 14674dce7faSJeenu Viswambharan# default, they are for Secure EL1. 14774dce7faSJeenu ViswambharanGICV2_G0_FOR_EL3 := 0 14874dce7faSJeenu Viswambharan 14976454abfSJeenu Viswambharan# Route External Aborts to EL3. Disabled by default; External Aborts are handled 15076454abfSJeenu Viswambharan# by lower ELs. 15176454abfSJeenu ViswambharanHANDLE_EA_EL3_FIRST := 0 15276454abfSJeenu Viswambharan 1533c251af3SJeenu Viswambharan# Whether system coherency is managed in hardware, without explicit software 1543c251af3SJeenu Viswambharan# operations. 1553c251af3SJeenu ViswambharanHW_ASSISTED_COHERENCY := 0 1563c251af3SJeenu Viswambharan 1572091755cSSoby Mathew# Set the default algorithm for the generation of Trusted Board Boot keys 1582091755cSSoby MathewKEY_ALG := rsa 1592091755cSSoby Mathew 1608c105290SAlexei Fedorov# Option to build TF with Measured Boot support 1618c105290SAlexei FedorovMEASURED_BOOT := 0 1628c105290SAlexei Fedorov 1632fae4b1eSJeenu Viswambharan# NS timer register save and restore 1642fae4b1eSJeenu ViswambharanNS_TIMER_SWITCH := 0 1652fae4b1eSJeenu Viswambharan 16677f1f7a1SVarun Wadekar# Include lib/libc in the final image 16777f1f7a1SVarun WadekarOVERRIDE_LIBC := 0 16877f1f7a1SVarun Wadekar 1692fae4b1eSJeenu Viswambharan# Build PL011 UART driver in minimal generic UART mode 1702fae4b1eSJeenu ViswambharanPL011_GENERIC_UART := 0 1712fae4b1eSJeenu Viswambharan 1722fae4b1eSJeenu Viswambharan# By default, consider that the platform's reset address is not programmable. 1732fae4b1eSJeenu Viswambharan# The platform Makefile is free to override this value. 1742fae4b1eSJeenu ViswambharanPROGRAMMABLE_RESET_ADDRESS := 0 1752fae4b1eSJeenu Viswambharan 17673308618SAntonio Nino Diaz# Flag used to choose the power state format: Extended State-ID or Original 1772fae4b1eSJeenu ViswambharanPSCI_EXTENDED_STATE_ID := 0 1782fae4b1eSJeenu Viswambharan 17914c6016aSJeenu Viswambharan# Enable RAS support 18014c6016aSJeenu ViswambharanRAS_EXTENSION := 0 18114c6016aSJeenu Viswambharan 1822fae4b1eSJeenu Viswambharan# By default, BL1 acts as the reset handler, not BL31 1832fae4b1eSJeenu ViswambharanRESET_TO_BL31 := 0 1842fae4b1eSJeenu Viswambharan 1852fae4b1eSJeenu Viswambharan# For Chain of Trust 1862fae4b1eSJeenu ViswambharanSAVE_KEYS := 0 1872fae4b1eSJeenu Viswambharan 188b7cb133eSJeenu Viswambharan# Software Delegated Exception support 189b7cb133eSJeenu ViswambharanSDEI_SUPPORT := 0 190b7cb133eSJeenu Viswambharan 1912fae4b1eSJeenu Viswambharan# Whether code and read-only data should be put on separate memory pages. The 1922fae4b1eSJeenu Viswambharan# platform Makefile is free to override this value. 1932fae4b1eSJeenu ViswambharanSEPARATE_CODE_AND_RODATA := 0 1942fae4b1eSJeenu Viswambharan 195f8578e64SSamuel Holland# Put NOBITS sections (.bss, stacks, page tables, and coherent memory) in a 196f8578e64SSamuel Holland# separate memory region, which may be discontiguous from the rest of BL31. 197f8578e64SSamuel HollandSEPARATE_NOBITS_REGION := 0 198f8578e64SSamuel Holland 1991dcc28cfSDaniel Boulby# If the BL31 image initialisation code is recalimed after use for the secondary 2001dcc28cfSDaniel Boulby# cores stack 2011dcc28cfSDaniel BoulbyRECLAIM_INIT_CODE := 0 2021dcc28cfSDaniel Boulby 2032fae4b1eSJeenu Viswambharan# SPD choice 2042fae4b1eSJeenu ViswambharanSPD := none 2052fae4b1eSJeenu Viswambharan 2063f3c341aSPaul Beesley# Enable the Management Mode (MM)-based Secure Partition Manager implementation 2073f3c341aSPaul BeesleySPM_MM := 0 2082d7b9e5eSAntonio Nino Diaz 209033039f8SMax Shvetsov# Use SPM at S-EL2 as a default config for SPMD 210033039f8SMax ShvetsovSPMD_SPM_AT_SEL2 := 1 211033039f8SMax Shvetsov 2122fae4b1eSJeenu Viswambharan# Flag to introduce an infinite loop in BL1 just before it exits into the next 2132fae4b1eSJeenu Viswambharan# image. This is meant to help debugging the post-BL2 phase. 2142fae4b1eSJeenu ViswambharanSPIN_ON_BL1_EXIT := 0 2152fae4b1eSJeenu Viswambharan 2162fae4b1eSJeenu Viswambharan# Flags to build TF with Trusted Boot support 2172fae4b1eSJeenu ViswambharanTRUSTED_BOARD_BOOT := 0 2182fae4b1eSJeenu Viswambharan 219e23e057eSAntonio Nino Diaz# Build option to choose whether Trusted Firmware uses Coherent memory or not. 2202fae4b1eSJeenu ViswambharanUSE_COHERENT_MEM := 1 2212fae4b1eSJeenu Viswambharan 2220ca3913dSOlivier Deprez# Build option to add debugfs support 2230ca3913dSOlivier DeprezUSE_DEBUGFS := 0 2240ca3913dSOlivier Deprez 2250a6e7e3bSLouis Mayencourt# Build option to fconf based io 226*a6de824fSLouis MayencourtARM_IO_IN_DTB := 0 2270a6e7e3bSLouis Mayencourt 228e23e057eSAntonio Nino Diaz# Build option to choose whether Trusted Firmware uses library at ROM 2295accce5bSRoberto VargasUSE_ROMLIB := 0 2305accce5bSRoberto Vargas 23160e8f3cfSPetre-Ionut Tudor# Build option to choose whether the xlat tables of BL images can be read-only. 23260e8f3cfSPetre-Ionut Tudor# Note that this only serves as a higher level option to PLAT_RO_XLAT_TABLES, 23360e8f3cfSPetre-Ionut Tudor# which is the per BL-image option that actually enables the read-only tables 23460e8f3cfSPetre-Ionut Tudor# API. The reason for having this additional option is to have a common high 23560e8f3cfSPetre-Ionut Tudor# level makefile where we can check for incompatible features/build options. 23660e8f3cfSPetre-Ionut TudorALLOW_RO_XLAT_TABLES := 0 23760e8f3cfSPetre-Ionut Tudor 2383bff910dSSandrine Bailleux# Chain of trust. 2393bff910dSSandrine BailleuxCOT := tbbr 2403bff910dSSandrine Bailleux 241bb41eb7aSMasahiro Yamada# Use tbbr_oid.h instead of platform_oid.h 242e23e057eSAntonio Nino DiazUSE_TBBR_DEFS := 1 243bb41eb7aSMasahiro Yamada 2442fae4b1eSJeenu Viswambharan# Build verbosity 2452fae4b1eSJeenu ViswambharanV := 0 246bcc3c49cSSoby Mathew 247bcc3c49cSSoby Mathew# Whether to enable D-Cache early during warm boot. This is usually 248bcc3c49cSSoby Mathew# applicable for platforms wherein interconnect programming is not 249bcc3c49cSSoby Mathew# required to enable cache coherency after warm reset (eg: single cluster 250bcc3c49cSSoby Mathew# platforms). 251bcc3c49cSSoby MathewWARMBOOT_ENABLE_DCACHE_EARLY := 0 252d832aee9Sdp-arm 253c776deedSDimitris Papastamos# Build option to enable/disable the Statistical Profiling Extensions 254d832aee9Sdp-armENABLE_SPE_FOR_LOWER_ELS := 1 255d832aee9Sdp-arm 256c776deedSDimitris Papastamos# SPE is only supported on AArch64 so disable it on AArch32. 257d832aee9Sdp-armifeq (${ARCH},aarch32) 258d832aee9Sdp-arm override ENABLE_SPE_FOR_LOWER_ELS := 0 259d832aee9Sdp-armendif 2600319a977SDimitris Papastamos 2619dd94382SJustin Chadwell# Include Memory Tagging Extension registers in cpu context. This must be set 2629dd94382SJustin Chadwell# to 1 if the platform wants to use this feature in the Secure world and MTE is 2639dd94382SJustin Chadwell# enabled at ELX. 2649dd94382SJustin ChadwellCTX_INCLUDE_MTE_REGS := 0 2659dd94382SJustin Chadwell 2660319a977SDimitris PapastamosENABLE_AMU := 0 2671a853370SDavid Cunado 2681a853370SDavid Cunado# By default, enable Scalable Vector Extension if implemented for Non-secure 2691a853370SDavid Cunado# lower ELs 2701a853370SDavid Cunado# Note SVE is only supported on AArch64 - therefore do not enable in AArch32 2711a853370SDavid Cunadoifneq (${ARCH},aarch32) 2721a853370SDavid Cunado ENABLE_SVE_FOR_NS := 1 2731a853370SDavid Cunadoelse 2741a853370SDavid Cunado override ENABLE_SVE_FOR_NS := 0 2751a853370SDavid Cunadoendif 2761f461979SJustin Chadwell 2771f461979SJustin ChadwellSANITIZE_UB := off 278c97cba4eSSoby Mathew 279c97cba4eSSoby Mathew# For ARMv8.1 (AArch64) platforms, enabling this option selects the spinlock 280c97cba4eSSoby Mathew# implementation variant using the ARMv8.1-LSE compare-and-swap instruction. 281c97cba4eSSoby Mathew# Default: disabled 282c97cba4eSSoby MathewUSE_SPINLOCK_CAS := 0 283edbce9aaSzelalem-aweke 284edbce9aaSzelalem-aweke# Enable Link Time Optimization 285edbce9aaSzelalem-awekeENABLE_LTO := 0 28628f39f02SMax Shvetsov 28728f39f02SMax Shvetsov# Build flag to include EL2 registers in cpu context save and restore during 28828f39f02SMax Shvetsov# S-EL2 firmware entry/exit. This flag is to be used with SPD=spmd option. 28928f39f02SMax Shvetsov# Default is 0. 29028f39f02SMax ShvetsovCTX_INCLUDE_EL2_REGS := 0 291