Conditional flag enables are strongly discouraged in TF-A because they
cause cyclic dependencies that we are not equipped to deal with. On a
real platform, ARM_ARCH_{MAJOR, MINOR} should be set in platform.mk but
WORKAROUND_CVE_2025_0647 gets its value before platform.mk is evaluated.
Further, WORKAROUND_CVE_2025_0647 is only present on cores the feature
set of which is known ahead of time. Using ARM_ARCH_{MAJOR, MINOR} is
redundant and incorrect (as it sidesteps the feature detection
mechanism).
This patch solves both of these issues by making
WORKAROUND_CVE_2025_0647 unconstrained by ARM_ARCH_{MAJOR, MINOR} and
making it buildable on a v8.0 target. Running the workaround will only
happen on affected cores which, by definition, all implement armv8.5 so
doing any checks in unnecessary.
Change-Id: Ia164077f09b552d42b558ada4f6036cabbd34f64
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
54 lines
1.3 KiB
Makefile
54 lines
1.3 KiB
Makefile
#
|
|
# Copyright (c) 2013-2026, Arm Limited and Contributors. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
|
|
BL1_SOURCES += bl1/${ARCH}/bl1_arch_setup.c \
|
|
bl1/${ARCH}/bl1_context_mgmt.c \
|
|
bl1/${ARCH}/bl1_entrypoint.S \
|
|
bl1/${ARCH}/bl1_exceptions.S \
|
|
bl1/bl1_main.c \
|
|
lib/cpus/${ARCH}/cpu_helpers.S \
|
|
lib/cpus/errata_report.c \
|
|
lib/el3_runtime/${ARCH}/context_mgmt.c \
|
|
plat/common/plat_bl1_common.c \
|
|
plat/common/${ARCH}/platform_up_stack.S \
|
|
${MBEDTLS_SOURCES}
|
|
|
|
ifeq (${ARCH},aarch64)
|
|
BL1_SOURCES += lib/el3_runtime/aarch64/context.S \
|
|
lib/cpus/errata_common.c
|
|
|
|
ifeq (${WORKAROUND_CVE_2025_0647},1)
|
|
BL1_SOURCES += lib/cpus/aarch64/wa_cve_2025_0647_cpprctx.S
|
|
endif
|
|
endif
|
|
|
|
ifeq (${TRUSTED_BOARD_BOOT},1)
|
|
BL1_SOURCES += bl1/bl1_fwu.c
|
|
endif
|
|
|
|
ifeq (${ENABLE_PMF},1)
|
|
BL1_SOURCES += lib/pmf/pmf_main.c
|
|
endif
|
|
|
|
BL1_DEFAULT_LINKER_SCRIPT_SOURCE := bl1/bl1.ld.S
|
|
|
|
# CRYPTO_SUPPORT
|
|
NEED_AUTH := $(if $(filter 1,$(TRUSTED_BOARD_BOOT)),1,)
|
|
NEED_HASH := $(if $(filter 1,$(MEASURED_BOOT) $(DRTM_SUPPORT)),1,)
|
|
$(eval $(call set_crypto_support,NEED_AUTH,NEED_HASH))
|
|
|
|
# BL1_CPPFLAGS
|
|
$(eval BL1_CPPFLAGS += $(call make_defines, \
|
|
$(sort \
|
|
CRYPTO_SUPPORT \
|
|
)))
|
|
|
|
# Numeric_Flags
|
|
$(eval $(call assert_numerics,\
|
|
$(sort \
|
|
CRYPTO_SUPPORT \
|
|
)))
|