mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-21 20:14:29 +00:00
Merge changes from topic "gr/build_fix_spmd" into integration
* changes: fix(rdv3): handle invalid build combination fix(build): handle invalid spd build options
This commit is contained in:
commit
1dd6f3ece6
2 changed files with 48 additions and 33 deletions
67
Makefile
67
Makefile
|
@ -433,28 +433,12 @@ INCLUDE_TBBR_MK := 1
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
ifneq (${SPD},none)
|
ifneq (${SPD},none)
|
||||||
ifeq (${ARCH},aarch32)
|
|
||||||
$(error "Error: SPD is incompatible with AArch32.")
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef EL3_PAYLOAD_BASE
|
|
||||||
$(warning "SPD and EL3_PAYLOAD_BASE are incompatible build options.")
|
|
||||||
$(warning "The SPD and its BL32 companion will be present but \
|
|
||||||
ignored.")
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (${SPD},spmd)
|
ifeq (${SPD},spmd)
|
||||||
# SPMD is located in std_svc directory
|
# SPMD is located in std_svc directory
|
||||||
SPD_DIR := std_svc
|
SPD_DIR := std_svc
|
||||||
|
|
||||||
ifeq ($(SPMD_SPM_AT_SEL2),1)
|
ifeq ($(SPMD_SPM_AT_SEL2),1)
|
||||||
CTX_INCLUDE_EL2_REGS := 1
|
CTX_INCLUDE_EL2_REGS := 1
|
||||||
ifeq ($(SPMC_AT_EL3),1)
|
|
||||||
$(error SPM cannot be enabled in both S-EL2 and EL3.)
|
|
||||||
endif
|
|
||||||
ifeq ($(CTX_INCLUDE_SVE_REGS),1)
|
|
||||||
$(error SVE context management not needed with Hafnium SPMC.)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring optee_sp,$(ARM_SPMC_MANIFEST_DTS)),optee_sp)
|
ifeq ($(findstring optee_sp,$(ARM_SPMC_MANIFEST_DTS)),optee_sp)
|
||||||
|
@ -476,12 +460,6 @@ ifneq (${SPD},none)
|
||||||
ifneq ($(SP_LAYOUT_FILE),)
|
ifneq ($(SP_LAYOUT_FILE),)
|
||||||
BL2_ENABLE_SP_LOAD := 1
|
BL2_ENABLE_SP_LOAD := 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(SPMC_AT_EL3_SEL0_SP),1)
|
|
||||||
ifneq ($(SPMC_AT_EL3),1)
|
|
||||||
$(error SEL0 SP cannot be enabled without SPMC at EL3)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
# All other SPDs in spd directory
|
# All other SPDs in spd directory
|
||||||
SPD_DIR := spd
|
SPD_DIR := spd
|
||||||
|
@ -507,15 +485,6 @@ ifneq (${SPD},none)
|
||||||
# over the sources.
|
# over the sources.
|
||||||
endif #(SPD=none)
|
endif #(SPD=none)
|
||||||
|
|
||||||
ifeq (${ENABLE_SPMD_LP}, 1)
|
|
||||||
ifneq (${SPD},spmd)
|
|
||||||
$(error Error: ENABLE_SPMD_LP requires SPD=spmd.)
|
|
||||||
endif
|
|
||||||
ifeq ($(SPMC_AT_EL3),1)
|
|
||||||
$(error SPMC at EL3 not supported when enabling SPMD Logical partitions.)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Include the platform specific Makefile after the SPD Makefile (the platform
|
# Include the platform specific Makefile after the SPD Makefile (the platform
|
||||||
# makefile may use all previous definitions in this file)
|
# makefile may use all previous definitions in this file)
|
||||||
|
@ -774,6 +743,42 @@ endif
|
||||||
# Check incompatible options and dependencies
|
# Check incompatible options and dependencies
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# Handle all invalid build configurations with SPMD usage.
|
||||||
|
ifeq (${ENABLE_SPMD_LP}, 1)
|
||||||
|
ifneq (${SPD},spmd)
|
||||||
|
$(error Error: ENABLE_SPMD_LP requires SPD=spmd.)
|
||||||
|
endif
|
||||||
|
ifeq ($(SPMC_AT_EL3),1)
|
||||||
|
$(error SPMC at EL3 not supported when enabling SPMD Logical partitions.)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (${SPD},none)
|
||||||
|
ifeq (${ARCH},aarch32)
|
||||||
|
$(error "Error: SPD is incompatible with AArch32.")
|
||||||
|
endif
|
||||||
|
ifdef EL3_PAYLOAD_BASE
|
||||||
|
$(warning "SPD and EL3_PAYLOAD_BASE are incompatible build options.")
|
||||||
|
$(warning "The SPD and its BL32 companion will be present but ignored.")
|
||||||
|
endif
|
||||||
|
ifeq (${SPD},spmd)
|
||||||
|
ifeq ($(SPMD_SPM_AT_SEL2),1)
|
||||||
|
ifeq ($(SPMC_AT_EL3),1)
|
||||||
|
$(error SPM cannot be enabled in both S-EL2 and EL3.)
|
||||||
|
endif
|
||||||
|
ifeq ($(CTX_INCLUDE_SVE_REGS),1)
|
||||||
|
$(error SVE context management not needed with Hafnium SPMC.)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(SPMC_AT_EL3_SEL0_SP),1)
|
||||||
|
ifneq ($(SPMC_AT_EL3),1)
|
||||||
|
$(error SEL0 SP cannot be enabled without SPMC at EL3)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif #(SPD=spmd)
|
||||||
|
endif #(SPD!=none)
|
||||||
|
|
||||||
# USE_DEBUGFS experimental feature recommended only in debug builds
|
# USE_DEBUGFS experimental feature recommended only in debug builds
|
||||||
ifeq (${USE_DEBUGFS},1)
|
ifeq (${USE_DEBUGFS},1)
|
||||||
ifeq (${DEBUG},1)
|
ifeq (${DEBUG},1)
|
||||||
|
|
|
@ -144,7 +144,7 @@ FDT_SOURCES += ${RDV3_BASE}/fdts/${PLAT}_fw_config.dts \
|
||||||
${RDV3_BASE}/fdts/${PLAT}_nt_fw_config.dts
|
${RDV3_BASE}/fdts/${PLAT}_nt_fw_config.dts
|
||||||
|
|
||||||
ifeq (${SPMD_SPM_AT_SEL2}, 1)
|
ifeq (${SPMD_SPM_AT_SEL2}, 1)
|
||||||
BL32_CONFIG_DTS := ${RDV3_BASE}/fdts/${PLAT}_spmc_sp_manifest.dts
|
BL32_CONFIG_DTS := ${RDV3_BASE}/fdts/${PLAT}_spmc_sp_manifest.dts
|
||||||
FDT_SOURCES += ${BL32_CONFIG_DTS}
|
FDT_SOURCES += ${BL32_CONFIG_DTS}
|
||||||
TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/$(notdir $(basename ${BL32_CONFIG_DTS})).dtb
|
TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/$(notdir $(basename ${BL32_CONFIG_DTS})).dtb
|
||||||
endif
|
endif
|
||||||
|
@ -169,4 +169,14 @@ override ENABLE_FEAT_MTE2 := 2
|
||||||
|
|
||||||
# FEAT_SVE related flags
|
# FEAT_SVE related flags
|
||||||
override SVE_VECTOR_LEN := 128
|
override SVE_VECTOR_LEN := 128
|
||||||
override CTX_INCLUDE_SVE_REGS := 1
|
|
||||||
|
override CTX_INCLUDE_SVE_REGS := 1
|
||||||
|
|
||||||
|
# Enabling CTX_INCLUDE_SVE_REGS along with SPMD_SPM_AT_SEL2=1 is a invalid
|
||||||
|
# combination and will lead to build failure, use them only when SPMD_SPM_AT_SEL2=0
|
||||||
|
# In this combination its SPMC responsbility to save SVE regs.
|
||||||
|
ifeq (${SPD},spmd)
|
||||||
|
ifeq (${SPMD_SPM_AT_SEL2},1)
|
||||||
|
override CTX_INCLUDE_SVE_REGS := 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue