diff options
author | Olivier Deprez <olivier.deprez@arm.com> | 2020-08-18 14:55:16 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2020-08-18 14:55:16 +0000 |
commit | 953ec59b3ed74380c690e550c85eefe19b07716f (patch) | |
tree | 2293a7fcfa63ed11dd88b4bb65e1249f9052c79b /Makefile | |
parent | 56c3942b4eaa2ad85749b11d5895fad6bfb5b61c (diff) | |
parent | 7fac162cd9439783ef60aaf266d22ad454445ace (diff) |
Merge changes from topic "af/add_branch_protection_makefiles"
* changes:
TFTF: Add ARMv8.5 BTI support in makefiles
TFTF: Add ARMv8.5 BTI support in xlat_tables_v2 library
TFTF: Add ARMv8.5 BTI support in assembler files
TFTF: Add ARMv8.5 BTI-related definitions
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -149,13 +149,20 @@ include ${PLAT_MAKEFILE_FULL} ################################################################################ $(eval $(call assert_boolean,DEBUG)) $(eval $(call assert_boolean,ENABLE_ASSERTIONS)) -$(eval $(call assert_boolean,ENABLE_PAUTH)) $(eval $(call assert_boolean,FIRMWARE_UPDATE)) $(eval $(call assert_boolean,FWU_BL_TEST)) $(eval $(call assert_boolean,NEW_TEST_SESSION)) $(eval $(call assert_boolean,USE_NVM)) ################################################################################ +# Process build options +################################################################################ + +# Process BRANCH_PROTECTION value and set +# Pointer Authentication and Branch Target Identification flags +include branch_protection.mk + +################################################################################ # Add definitions to the cpp preprocessor based on the current build options. # This is done after including the platform specific makefile to allow the # platform to overwrite the default options @@ -164,6 +171,7 @@ $(eval $(call add_define,TFTF_DEFINES,ARM_ARCH_MAJOR)) $(eval $(call add_define,TFTF_DEFINES,ARM_ARCH_MINOR)) $(eval $(call add_define,TFTF_DEFINES,DEBUG)) $(eval $(call add_define,TFTF_DEFINES,ENABLE_ASSERTIONS)) +$(eval $(call add_define,TFTF_DEFINES,ENABLE_BTI)) $(eval $(call add_define,TFTF_DEFINES,ENABLE_PAUTH)) $(eval $(call add_define,TFTF_DEFINES,LOG_LEVEL)) $(eval $(call add_define,TFTF_DEFINES,NEW_TEST_SESSION)) @@ -230,10 +238,14 @@ TFTF_CFLAGS += ${COMMON_CFLAGS} TFTF_ASFLAGS += ${COMMON_ASFLAGS} TFTF_LDFLAGS += ${COMMON_LDFLAGS} -ifeq (${ENABLE_PAUTH},1) -TFTF_CFLAGS += -mbranch-protection=pac-ret -NS_BL1U_CFLAGS += -mbranch-protection=pac-ret -NS_BL2U_CFLAGS += -mbranch-protection=pac-ret +ifneq (${BP_OPTION},none) +TFTF_CFLAGS += -mbranch-protection=${BP_OPTION} +NS_BL1U_CFLAGS += -mbranch-protection=${BP_OPTION} +NS_BL2U_CFLAGS += -mbranch-protection=${BP_OPTION} +CACTUS_MM_CFLAGS += -mbranch-protection=${BP_OPTION} +CACTUS_CFLAGS += -mbranch-protection=${BP_OPTION} +IVY_CFLAGS += -mbranch-protection=${BP_OPTION} +QUARK_CFLAGS += -mbranch-protection=${BP_OPTION} endif ##################################################################################### |