blob: 34601c2d675d67c1d1c90a0f405f945a72f3dcc8 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
Alexei Fedorovfb003382019-10-04 16:13:47 +01002# Copyright (c) 2018-2019, Arm Limited. All rights reserved.
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7AUTOGEN_DIR := $(BUILD_PLAT)/autogen
8
9include lib/xlat_tables_v2/xlat_tables.mk
10include lib/compiler-rt/compiler-rt.mk
11
12TFTF_INCLUDES := \
13 -I${AUTOGEN_DIR} \
14 -Itftf/framework/include \
Antonio Nino Diaz09a00ef2019-01-11 13:12:58 +000015 -Iinclude \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020016 -Iinclude/common \
17 -Iinclude/common/${ARCH} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020018 -Iinclude/lib \
19 -Iinclude/lib/${ARCH} \
20 -Iinclude/lib/extensions \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020021 -Iinclude/lib/utils \
22 -Iinclude/lib/xlat_tables \
23 -Iinclude/plat/common \
24 -Iinclude/runtime_services \
25 -Iinclude/runtime_services/secure_el0_payloads \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +000026 -Iinclude/runtime_services/secure_el1_payloads \
Antonio Nino Diaza1497e32018-11-08 11:45:13 +000027 -Ispm/cactus \
Antonio Nino Diaz26b38642019-03-28 13:16:04 +000028 -Ispm/ivy \
29 -Ispm/quark
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020030
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020031FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c
32
33FRAMEWORK_SOURCES += $(addprefix tftf/, \
34 framework/${ARCH}/arch.c \
35 framework/${ARCH}/asm_debug.S \
36 framework/${ARCH}/entrypoint.S \
37 framework/${ARCH}/exceptions.S \
Sandrine Bailleuxa43b0032019-01-14 14:04:32 +010038 framework/${ARCH}/exception_report.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020039 framework/debug.c \
40 framework/main.c \
41 framework/nvm_results_helpers.c \
42 framework/report.c \
43 framework/timer/timer_framework.c \
44 tests/common/test_helpers.c \
45)
46
47FRAMEWORK_SOURCES += \
48 lib/${ARCH}/cache_helpers.S \
49 lib/${ARCH}/misc_helpers.S \
50 lib/delay/delay.c \
51 lib/events/events.c \
52 lib/extensions/amu/${ARCH}/amu.c \
53 lib/extensions/amu/${ARCH}/amu_helpers.S \
54 lib/irq/irq.c \
55 lib/locks/${ARCH}/spinlock.S \
56 lib/power_management/hotplug/hotplug.c \
57 lib/power_management/suspend/${ARCH}/asm_tftf_suspend.S \
58 lib/power_management/suspend/tftf_suspend.c \
59 lib/psci/psci.c \
60 lib/sdei/sdei.c \
61 lib/smc/${ARCH}/asm_smc.S \
62 lib/smc/${ARCH}/smc.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020063 lib/trusted_os/trusted_os.c \
64 lib/utils/mp_printf.c \
65 lib/utils/uuid.c \
66 ${XLAT_TABLES_LIB_SRCS} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020067 plat/common/${ARCH}/platform_mp_stack.S \
68 plat/common/plat_common.c \
69 plat/common/plat_state_id.c \
70 plat/common/plat_topology.c \
71 plat/common/tftf_nvm_accessors.c
72
73
74FRAMEWORK_SOURCES += ${COMPILER_RT_SRCS}
75
Alexei Fedorovfb003382019-10-04 16:13:47 +010076ifeq (${ARCH},aarch64)
77# ARMv8.3 Pointer Authentication support files
78FRAMEWORK_SOURCES += \
79 lib/extensions/pauth/aarch64/pauth.c \
80 lib/extensions/pauth/aarch64/pauth_helpers.S
81endif
82
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020083TFTF_LINKERFILE := tftf/framework/tftf.ld.S
84
85
86TFTF_DEFINES :=
87
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020088# Enable dynamic translation tables
89PLAT_XLAT_TABLES_DYNAMIC := 1
90$(eval $(call add_define,TFTF_DEFINES,PLAT_XLAT_TABLES_DYNAMIC))