diff options
Diffstat (limited to 'make_helpers')
-rw-r--r-- | make_helpers/arch_features.mk | 5 | ||||
-rw-r--r-- | make_helpers/build_macros.mk | 22 | ||||
-rw-r--r-- | make_helpers/defaults.mk | 22 |
3 files changed, 36 insertions, 13 deletions
diff --git a/make_helpers/arch_features.mk b/make_helpers/arch_features.mk index 01e3e096d..b799697fb 100644 --- a/make_helpers/arch_features.mk +++ b/make_helpers/arch_features.mk @@ -13,6 +13,11 @@ ENABLE_FEAT_PAN = 1 ENABLE_FEAT_VHE = 1 endif +# Enable the features which are mandatory from ARCH version 8.2 and upwards. +ifeq "8.2" "$(word 1, $(sort 8.2 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" +ENABLE_FEAT_RAS = 1 +endif + # Enable the features which are mandatory from ARCH version 8.4 and upwards. ifeq "8.4" "$(word 1, $(sort 8.4 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" ENABLE_FEAT_DIT = 1 diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 9ca6bdf0c..3bce3a5c8 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -73,6 +73,7 @@ endef # Convenience function for verifying option has a boolean value # $(eval $(call assert_boolean,FOO)) will assert FOO is 0 or 1 define assert_boolean + $(if $($(1)),,$(error $(1) must not be empty)) $(if $(filter-out 0 1,$($1)),$(error $1 must be boolean)) endef @@ -104,6 +105,12 @@ define ld_option $(shell if $(LD) $(1) -v >/dev/null 2>&1; then echo $(1); fi ) endef +# Convenience function to check for a given compiler option. A call to +# $(call cc_option, --no-XYZ) will return --no-XYZ if supported by the compiler +define cc_option + $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null >/dev/null 2>&1; then echo $(1); fi ) +endef + # CREATE_SEQ is a recursive function to create sequence of numbers from 1 to # $(2) and assign the sequence to $(1) define CREATE_SEQ @@ -326,7 +333,10 @@ define MAKE_C $(eval OBJ := $(1)/$(patsubst %.c,%.o,$(notdir $(2)))) $(eval DEP := $(patsubst %.o,%.d,$(OBJ))) -$(eval BL_CPPFLAGS := $($(call uppercase,$(3))_CPPFLAGS) -DIMAGE_$(call uppercase,$(3))) + +$(eval BL_DEFINES := $($(call uppercase,$(3))_DEFINES)) +$(eval BL_INCLUDE_DIRS := $($(call uppercase,$(3))_INCLUDE_DIRS)) +$(eval BL_CPPFLAGS := $($(call uppercase,$(3))_CPPFLAGS) -DIMAGE_$(call uppercase,$(3)) $(addprefix -D,$(BL_DEFINES)) $(addprefix -I,$(BL_INCLUDE_DIRS))) $(eval BL_CFLAGS := $($(call uppercase,$(3))_CFLAGS)) $(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | $(3)_dirs @@ -346,7 +356,10 @@ define MAKE_S $(eval OBJ := $(1)/$(patsubst %.S,%.o,$(notdir $(2)))) $(eval DEP := $(patsubst %.o,%.d,$(OBJ))) -$(eval BL_CPPFLAGS := $($(call uppercase,$(3))_CPPFLAGS) -DIMAGE_$(call uppercase,$(3))) + +$(eval BL_DEFINES := $($(call uppercase,$(3))_DEFINES)) +$(eval BL_INCLUDE_DIRS := $($(call uppercase,$(3))_INCLUDE_DIRS)) +$(eval BL_CPPFLAGS := $($(call uppercase,$(3))_CPPFLAGS) -DIMAGE_$(call uppercase,$(3)) $(addprefix -D,$(BL_DEFINES)) $(addprefix -I,$(BL_INCLUDE_DIRS))) $(eval BL_ASFLAGS := $($(call uppercase,$(3))_ASFLAGS)) $(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | $(3)_dirs @@ -365,7 +378,10 @@ endef define MAKE_LD $(eval DEP := $(1).d) -$(eval BL_CPPFLAGS := $($(call uppercase,$(3))_CPPFLAGS) -DIMAGE_$(call uppercase,$(3))) + +$(eval BL_DEFINES := $($(call uppercase,$(3))_DEFINES)) +$(eval BL_INCLUDE_DIRS := $($(call uppercase,$(3))_INCLUDE_DIRS)) +$(eval BL_CPPFLAGS := $($(call uppercase,$(3))_CPPFLAGS) -DIMAGE_$(call uppercase,$(3)) $(addprefix -D,$(BL_DEFINES)) $(addprefix -I,$(BL_INCLUDE_DIRS))) $(1): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | $(3)_dirs $$(ECHO) " PP $$<" diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk index 021893c58..f9077eb9b 100644 --- a/make_helpers/defaults.mk +++ b/make_helpers/defaults.mk @@ -243,6 +243,9 @@ HASH_ALG := sha256 # operations. HW_ASSISTED_COHERENCY := 0 +# Flag to enable trapping of implementation defined sytem registers +IMPDEF_SYSREG_TRAP := 0 + # Set the default algorithm for the generation of Trusted Board Boot keys KEY_ALG := rsa @@ -273,8 +276,9 @@ PSCI_EXTENDED_STATE_ID := 0 # Enable PSCI OS-initiated mode support PSCI_OS_INIT_MODE := 0 -# Enable RAS support -RAS_EXTENSION := 0 +# Enable RAS Support +ENABLE_FEAT_RAS := 0 +RAS_FFH_SUPPORT := 0 # By default, BL1 acts as the reset handler, not BL31 RESET_TO_BL31 := 0 @@ -288,6 +292,12 @@ SDEI_SUPPORT := 0 # True Random Number firmware Interface support TRNG_SUPPORT := 0 +# Check to see if Errata ABI is supported +ERRATA_ABI_SUPPORT := 0 + +# Check to enable Errata ABI for platforms with non-arm interconnect +ERRATA_NON_ARM_INTERCONNECT := 0 + # SMCCC PCI support SMC_PCI_SUPPORT := 0 @@ -398,14 +408,6 @@ SVE_VECTOR_LEN := 2048 # SME defaults to disabled ENABLE_SME_FOR_NS := 0 ENABLE_SME_FOR_SWD := 0 - -# If SME is enabled then force SVE off -ifneq (${ENABLE_SME_FOR_NS},0) - override ENABLE_SVE_FOR_NS := 0 - override ENABLE_SVE_FOR_SWD := 0 -endif - -# SME2 defaults to disabled ENABLE_SME2_FOR_NS := 0 SANITIZE_UB := off |