blob: ddae8234693b77b61dd86a2c55fc8529fa4dc124 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
Jayanth Dodderi Chidanand95d5d272023-01-16 17:58:47 +00002# Copyright (c) 2018-2023, 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 \
nabkah01cd668462022-11-06 15:29:44 +000028 -Iinclude/runtime_services/host_realm_managment \
Antonio Nino Diaza1497e32018-11-08 11:45:13 +000029 -Ispm/cactus \
Antonio Nino Diaz26b38642019-03-28 13:16:04 +000030 -Ispm/ivy \
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 \
Sona Mathew07384212022-11-28 13:19:11 -060067 lib/errata_abi/errata_abi.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020068 lib/trusted_os/trusted_os.c \
69 lib/utils/mp_printf.c \
70 lib/utils/uuid.c \
71 ${XLAT_TABLES_LIB_SRCS} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020072 plat/common/${ARCH}/platform_mp_stack.S \
73 plat/common/plat_common.c \
74 plat/common/plat_state_id.c \
75 plat/common/plat_topology.c \
76 plat/common/tftf_nvm_accessors.c
77
78
79FRAMEWORK_SOURCES += ${COMPILER_RT_SRCS}
80
Alexei Fedorovfb003382019-10-04 16:13:47 +010081ifeq (${ARCH},aarch64)
82# ARMv8.3 Pointer Authentication support files
83FRAMEWORK_SOURCES += \
Olivier Deprezc8f6a672022-01-13 13:44:53 +000084 lib/exceptions/aarch64/sync.c \
Alexei Fedorovfb003382019-10-04 16:13:47 +010085 lib/extensions/pauth/aarch64/pauth.c \
johpow0150ccb552020-11-10 19:22:13 -060086 lib/extensions/pauth/aarch64/pauth_helpers.S \
87 lib/extensions/sme/aarch64/sme.c \
Jayanth Dodderi Chidanand95d5d272023-01-16 17:58:47 +000088 lib/extensions/sme/aarch64/sme2.c \
89 lib/extensions/sme/aarch64/sme_helpers.S \
Arunachalam Ganapathy0bbdc2d2023-04-05 15:30:18 +010090 lib/extensions/sme/aarch64/sme2_helpers.S \
Arunachalam Ganapathyd179ddc2023-04-12 10:41:42 +010091 lib/extensions/sve/aarch64/sve.c \
92 lib/extensions/sve/aarch64/sve_helpers.S
Alexei Fedorovfb003382019-10-04 16:13:47 +010093endif
94
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020095TFTF_LINKERFILE := tftf/framework/tftf.ld.S
96
97
98TFTF_DEFINES :=
99
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200100# Enable dynamic translation tables
101PLAT_XLAT_TABLES_DYNAMIC := 1
102$(eval $(call add_define,TFTF_DEFINES,PLAT_XLAT_TABLES_DYNAMIC))