From 6c1ae0750416c042eae3a3cbf4b8d3c4d0fb3ccb Mon Sep 17 00:00:00 2001 From: Govindraj Raja Date: Thu, 11 Jan 2024 13:56:40 -0600 Subject: [PATCH] refactor(build): allow mandatory feats disabling Currently any arch FEAT_* can be enabled from: - command line build options - platform makefile - from arch_features.mk These are in order. However, mandatory features are enforced from arch_features.mk and platform makefile can't override them. Allow command line options or platforms makefile to disable any mandatory features. Change-Id: I6fdca1a3d0b405a88cd7a20309e0c1eecd57a650 Signed-off-by: Govindraj Raja --- make_helpers/arch_features.mk | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/make_helpers/arch_features.mk b/make_helpers/arch_features.mk index 9ac9332bb..30b02bad2 100644 --- a/make_helpers/arch_features.mk +++ b/make_helpers/arch_features.mk @@ -20,48 +20,48 @@ # Enable the features which are mandatory from ARCH version 8.1 and upwards. ifeq "8.1" "$(word 1, $(sort 8.1 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" -ENABLE_FEAT_PAN := 1 -ENABLE_FEAT_VHE := 1 +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 +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_SEL2 := 1 -ENABLE_TRF_FOR_NS := 1 -ENABLE_FEAT_DIT := 1 +ENABLE_FEAT_SEL2 ?= 1 +ENABLE_TRF_FOR_NS ?= 1 +ENABLE_FEAT_DIT ?= 1 endif # Enable the features which are mandatory from ARCH version 8.5 and upwards. ifeq "8.5" "$(word 1, $(sort 8.5 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" -ENABLE_FEAT_RNG := 1 -ENABLE_FEAT_SB := 1 +ENABLE_FEAT_RNG ?= 1 +ENABLE_FEAT_SB ?= 1 # Enable Memory tagging, Branch Target Identification for aarch64 only. ifeq ($(ARCH), aarch64) - mem_tag_arch_support := yes + mem_tag_arch_support ?= yes endif #(ARCH=aarch64) endif # Enable the features which are mandatory from ARCH version 8.6 and upwards. ifeq "8.6" "$(word 1, $(sort 8.6 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" -ENABLE_FEAT_ECV := 1 -ENABLE_FEAT_FGT := 1 +ENABLE_FEAT_ECV ?= 1 +ENABLE_FEAT_FGT ?= 1 endif # Enable the features which are mandatory from ARCH version 8.7 and upwards. ifeq "8.7" "$(word 1, $(sort 8.7 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" -ENABLE_FEAT_HCX := 1 +ENABLE_FEAT_HCX ?= 1 endif # Enable the features which are mandatory from ARCH version 8.9 and upwards. ifeq "8.9" "$(word 1, $(sort 8.9 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" -ENABLE_FEAT_TCR2 := 1 +ENABLE_FEAT_TCR2 ?= 1 endif #