blob: 11026f2d766e0191743fcd160c57fb667e79600f [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
Jimmy Brissonc4f3eee2020-06-23 15:25:05 -05002# Copyright (c) 2018-2021, 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
Mark Dykese7810b52020-06-03 15:46:55 -050011include lib/libfdt/libfdt.mk
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020012
13TFTF_INCLUDES := \
14 -I${AUTOGEN_DIR} \
15 -Itftf/framework/include \
Antonio Nino Diaz09a00ef2019-01-11 13:12:58 +000016 -Iinclude \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020017 -Iinclude/common \
18 -Iinclude/common/${ARCH} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020019 -Iinclude/lib \
20 -Iinclude/lib/${ARCH} \
21 -Iinclude/lib/extensions \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020022 -Iinclude/lib/utils \
23 -Iinclude/lib/xlat_tables \
24 -Iinclude/plat/common \
25 -Iinclude/runtime_services \
26 -Iinclude/runtime_services/secure_el0_payloads \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +000027 -Iinclude/runtime_services/secure_el1_payloads \
Antonio Nino Diaza1497e32018-11-08 11:45:13 +000028 -Ispm/cactus \
Antonio Nino Diaz26b38642019-03-28 13:16:04 +000029 -Ispm/ivy \
Mark Dykese7810b52020-06-03 15:46:55 -050030 -Ispm/quark \
31 -Ismc_fuzz/include
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020032
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020033FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c
34
35FRAMEWORK_SOURCES += $(addprefix tftf/, \
36 framework/${ARCH}/arch.c \
37 framework/${ARCH}/asm_debug.S \
38 framework/${ARCH}/entrypoint.S \
39 framework/${ARCH}/exceptions.S \
Sandrine Bailleuxa43b0032019-01-14 14:04:32 +010040 framework/${ARCH}/exception_report.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020041 framework/debug.c \
42 framework/main.c \
43 framework/nvm_results_helpers.c \
44 framework/report.c \
45 framework/timer/timer_framework.c \
46 tests/common/test_helpers.c \
47)
48
49FRAMEWORK_SOURCES += \
50 lib/${ARCH}/cache_helpers.S \
51 lib/${ARCH}/misc_helpers.S \
52 lib/delay/delay.c \
53 lib/events/events.c \
54 lib/extensions/amu/${ARCH}/amu.c \
55 lib/extensions/amu/${ARCH}/amu_helpers.S \
Olivier Deprezc8f6a672022-01-13 13:44:53 +000056 lib/exceptions/irq.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020057 lib/locks/${ARCH}/spinlock.S \
58 lib/power_management/hotplug/hotplug.c \
59 lib/power_management/suspend/${ARCH}/asm_tftf_suspend.S \
60 lib/power_management/suspend/tftf_suspend.c \
61 lib/psci/psci.c \
62 lib/sdei/sdei.c \
63 lib/smc/${ARCH}/asm_smc.S \
64 lib/smc/${ARCH}/smc.c \
Jimmy Brissonc4f3eee2020-06-23 15:25:05 -050065 lib/trng/trng.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020066 lib/trusted_os/trusted_os.c \
67 lib/utils/mp_printf.c \
68 lib/utils/uuid.c \
69 ${XLAT_TABLES_LIB_SRCS} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020070 plat/common/${ARCH}/platform_mp_stack.S \
71 plat/common/plat_common.c \
72 plat/common/plat_state_id.c \
73 plat/common/plat_topology.c \
74 plat/common/tftf_nvm_accessors.c
75
76
77FRAMEWORK_SOURCES += ${COMPILER_RT_SRCS}
78
Alexei Fedorovfb003382019-10-04 16:13:47 +010079ifeq (${ARCH},aarch64)
80# ARMv8.3 Pointer Authentication support files
81FRAMEWORK_SOURCES += \
Olivier Deprezc8f6a672022-01-13 13:44:53 +000082 lib/exceptions/aarch64/sync.c \
Alexei Fedorovfb003382019-10-04 16:13:47 +010083 lib/extensions/pauth/aarch64/pauth.c \
johpow0150ccb552020-11-10 19:22:13 -060084 lib/extensions/pauth/aarch64/pauth_helpers.S \
85 lib/extensions/sme/aarch64/sme.c \
86 lib/extensions/sme/aarch64/sme_helpers.S
Alexei Fedorovfb003382019-10-04 16:13:47 +010087endif
88
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020089TFTF_LINKERFILE := tftf/framework/tftf.ld.S
90
91
92TFTF_DEFINES :=
93
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020094# Enable dynamic translation tables
95PLAT_XLAT_TABLES_DYNAMIC := 1
96$(eval $(call add_define,TFTF_DEFINES,PLAT_XLAT_TABLES_DYNAMIC))