build(amu): introduce `amu.mk`

This change introduces the `amu.mk` Makefile, used to remove the need
to manually include AMU sources into the various build images.
Makefiles requiring the list of AMU sources are expected to include
this file and use `${AMU_SOURCES}` to retrieve them.

Change-Id: I3d174033ecdce6439a110d776f0c064c67abcfe0
Signed-off-by: Chris Kay <chris.kay@arm.com>
This commit is contained in:
Chris Kay 2021-05-19 19:24:37 +01:00
parent e04da4c8e1
commit 9b43d098d8
3 changed files with 14 additions and 6 deletions

View File

@ -22,6 +22,7 @@ ifeq (${SPM_MM},1)
endif
endif
include lib/extensions/amu/amu.mk
include lib/psci/psci_lib.mk
BL31_SOURCES += bl31/bl31_main.c \
@ -78,8 +79,7 @@ BL31_SOURCES += lib/extensions/spe/spe.c
endif
ifeq (${ENABLE_AMU},1)
BL31_SOURCES += lib/extensions/amu/aarch64/amu.c \
lib/extensions/amu/aarch64/amu_helpers.S
BL31_SOURCES += ${AMU_SOURCES}
endif
ifeq (${ENABLE_SVE_FOR_NS},1)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2016-2021, ARM Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@ -8,6 +8,7 @@ ifneq (${ARCH}, aarch32)
$(error SP_MIN is only supported on AArch32 platforms)
endif
include lib/extensions/amu/amu.mk
include lib/psci/psci_lib.mk
INCLUDES += -Iinclude/bl32/sp_min
@ -27,9 +28,8 @@ ifeq (${ENABLE_PMF}, 1)
BL32_SOURCES += lib/pmf/pmf_main.c
endif
ifeq (${ENABLE_AMU}, 1)
BL32_SOURCES += lib/extensions/amu/aarch32/amu.c\
lib/extensions/amu/aarch32/amu_helpers.S
ifeq (${ENABLE_AMU},1)
BL32_SOURCES += ${AMU_SOURCES}
endif
ifeq (${WORKAROUND_CVE_2017_5715},1)

View File

@ -0,0 +1,8 @@
#
# Copyright (c) 2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
AMU_SOURCES := lib/extensions/amu/${ARCH}/amu.c \
lib/extensions/amu/${ARCH}/amu_helpers.S