blob: a2c2a665ed3062c6751c316de412ab40d9fffec1 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
nabkah01002e5692022-10-10 12:36:46 +01002# Copyright (c) 2018-2022, 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 \
nabkah01002e5692022-10-10 12:36:46 +010031 -Irealm \
Mark Dykese7810b52020-06-03 15:46:55 -050032 -Ismc_fuzz/include
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020033
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020034FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c
35
36FRAMEWORK_SOURCES += $(addprefix tftf/, \
37 framework/${ARCH}/arch.c \
38 framework/${ARCH}/asm_debug.S \
39 framework/${ARCH}/entrypoint.S \
40 framework/${ARCH}/exceptions.S \
Sandrine Bailleuxa43b0032019-01-14 14:04:32 +010041 framework/${ARCH}/exception_report.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020042 framework/debug.c \
43 framework/main.c \
44 framework/nvm_results_helpers.c \
45 framework/report.c \
46 framework/timer/timer_framework.c \
47 tests/common/test_helpers.c \
48)
49
50FRAMEWORK_SOURCES += \
51 lib/${ARCH}/cache_helpers.S \
52 lib/${ARCH}/misc_helpers.S \
53 lib/delay/delay.c \
54 lib/events/events.c \
55 lib/extensions/amu/${ARCH}/amu.c \
56 lib/extensions/amu/${ARCH}/amu_helpers.S \
Olivier Deprezc8f6a672022-01-13 13:44:53 +000057 lib/exceptions/irq.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020058 lib/locks/${ARCH}/spinlock.S \
59 lib/power_management/hotplug/hotplug.c \
60 lib/power_management/suspend/${ARCH}/asm_tftf_suspend.S \
61 lib/power_management/suspend/tftf_suspend.c \
62 lib/psci/psci.c \
63 lib/sdei/sdei.c \
64 lib/smc/${ARCH}/asm_smc.S \
65 lib/smc/${ARCH}/smc.c \
Jimmy Brissonc4f3eee2020-06-23 15:25:05 -050066 lib/trng/trng.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020067 lib/trusted_os/trusted_os.c \
68 lib/utils/mp_printf.c \
69 lib/utils/uuid.c \
70 ${XLAT_TABLES_LIB_SRCS} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020071 plat/common/${ARCH}/platform_mp_stack.S \
72 plat/common/plat_common.c \
73 plat/common/plat_state_id.c \
74 plat/common/plat_topology.c \
75 plat/common/tftf_nvm_accessors.c
76
77
78FRAMEWORK_SOURCES += ${COMPILER_RT_SRCS}
79
Alexei Fedorovfb003382019-10-04 16:13:47 +010080ifeq (${ARCH},aarch64)
81# ARMv8.3 Pointer Authentication support files
82FRAMEWORK_SOURCES += \
Olivier Deprezc8f6a672022-01-13 13:44:53 +000083 lib/exceptions/aarch64/sync.c \
Alexei Fedorovfb003382019-10-04 16:13:47 +010084 lib/extensions/pauth/aarch64/pauth.c \
johpow0150ccb552020-11-10 19:22:13 -060085 lib/extensions/pauth/aarch64/pauth_helpers.S \
86 lib/extensions/sme/aarch64/sme.c \
87 lib/extensions/sme/aarch64/sme_helpers.S
Alexei Fedorovfb003382019-10-04 16:13:47 +010088endif
89
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020090TFTF_LINKERFILE := tftf/framework/tftf.ld.S
91
92
93TFTF_DEFINES :=
94
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020095# Enable dynamic translation tables
96PLAT_XLAT_TABLES_DYNAMIC := 1
97$(eval $(call add_define,TFTF_DEFINES,PLAT_XLAT_TABLES_DYNAMIC))