build(bl32): added check for AARCH32_SP

If AACRH32_SP is not specified, it causes the DEFAULT_LINKER_SCRIPT
variable to be empty, and then the linker takes the variable following
it as if it was the linker script, which is not one. This patch
addresses that issue by requiring the AARCH32_SP variable to be set
before continuing.

Change-Id: I21db7d5bd86b98faaa1a1cd3f985daa592556a2d
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
This commit is contained in:
Juan Pablo Conde 2023-08-09 13:19:21 -05:00
parent f56da5d36d
commit 043f38fd50
9 changed files with 40 additions and 15 deletions

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2019-2021, Arm Limited. All rights reserved. # Copyright (c) 2019-2023, Arm Limited. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -98,6 +98,10 @@ endif
NEED_BL32 := yes NEED_BL32 := yes
ifeq (${AARCH32_SP},none)
$(error Variable AARCH32_SP has to be set for AArch32)
endif
MULTI_CONSOLE_API := 1 MULTI_CONSOLE_API := 1
ARM_DISABLE_TRUSTED_WDOG := 1 ARM_DISABLE_TRUSTED_WDOG := 1

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2019-2022, Arm Limited and Contributors. All rights reserved. # Copyright (c) 2019-2023, Arm Limited and Contributors. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -25,6 +25,10 @@ PLAT_INCLUDES := -Iplat/arm/board/corstone700/common/include \
NEED_BL32 := yes NEED_BL32 := yes
ifeq (${AARCH32_SP},none)
$(error Variable AARCH32_SP has to be set for AArch32)
endif
# Include GICv2 driver files # Include GICv2 driver files
include drivers/arm/gic/v2/gicv2.mk include drivers/arm/gic/v2/gicv2.mk

View file

@ -407,10 +407,6 @@ ifneq (${ENABLE_STACK_PROTECTOR},0)
PLAT_BL_COMMON_SOURCES += plat/arm/board/fvp/fvp_stack_protector.c PLAT_BL_COMMON_SOURCES += plat/arm/board/fvp/fvp_stack_protector.c
endif endif
ifeq (${ARCH},aarch32)
NEED_BL32 := yes
endif
# Enable the dynamic translation tables library. # Enable the dynamic translation tables library.
ifeq ($(filter 1,${RESET_TO_BL2} ${ARM_XLAT_TABLES_LIB_V1}),) ifeq ($(filter 1,${RESET_TO_BL2} ${ARM_XLAT_TABLES_LIB_V1}),)
ifeq (${ARCH},aarch32) ifeq (${ARCH},aarch32)

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2019-2021, Arm Limited. All rights reserved. # Copyright (c) 2019-2023, Arm Limited. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -96,6 +96,10 @@ endif
NEED_BL32 := yes NEED_BL32 := yes
ifeq (${AARCH32_SP},none)
$(error Variable AARCH32_SP has to be set for AArch32)
endif
# Modification of arm_common.mk # Modification of arm_common.mk
# Process ARM_DISABLE_TRUSTED_WDOG flag # Process ARM_DISABLE_TRUSTED_WDOG flag

View file

@ -6,6 +6,12 @@
include common/fdt_wrappers.mk include common/fdt_wrappers.mk
ifeq (${ARCH},aarch32)
ifeq (${AARCH32_SP},none)
$(error Variable AARCH32_SP has to be set for AArch32)
endif
endif
ifeq (${ARCH}, aarch64) ifeq (${ARCH}, aarch64)
# On ARM standard platorms, the TSP can execute from Trusted SRAM, Trusted # On ARM standard platorms, the TSP can execute from Trusted SRAM, Trusted
# DRAM (if available) or the TZC secured area of DRAM. # DRAM (if available) or the TZC secured area of DRAM.

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -110,3 +110,7 @@ endif
ifeq (${ARCH},aarch64) ifeq (${ARCH},aarch64)
$(error Error: AArch64 not supported on i.mx7) $(error Error: AArch64 not supported on i.mx7)
endif endif
ifeq (${AARCH32_SP}, none)
$(error Variable AARCH32_SP has to be set for AArch32)
endif

View file

@ -78,6 +78,9 @@ ifeq (${ARCH},aarch64)
BL32_BASE ?= BL31_LIMIT BL32_BASE ?= BL31_LIMIT
$(eval $(call add_define,BL31_BASE)) $(eval $(call add_define,BL31_BASE))
else else
ifeq (${AARCH32_SP},none)
$(error Variable AARCH32_SP has to be set for AArch32)
endif
# There is no BL31 on aarch32, so reuse its location for BL32 # There is no BL31 on aarch32, so reuse its location for BL32
BL32_BASE ?= $(BL31_BASE) BL32_BASE ?= $(BL31_BASE)
endif endif

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -67,3 +67,7 @@ $(eval $(call add_define,PLAT_SP_MIN_EXTRA_LD_SCRIPT))
ENABLE_SVE_FOR_NS := 0 ENABLE_SVE_FOR_NS := 0
WORKAROUND_CVE_2017_5715 := 0 WORKAROUND_CVE_2017_5715 := 0
ifeq (${AARCH32_SP}, none)
$(error Variable AARCH32_SP has to be set for AArch32)
endif