blob: 24742a4708f1d3f2b0495b4f5adb53c269e50516 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
AlexeiFedorov9f2de632024-09-10 11:48:22 +01002# Copyright (c) 2018-2024, 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 \
Kathleen Capellabde3eab2024-12-09 14:04:43 -050022 -Iinclude/lib/hob \
AlexeiFedorov9f2de632024-09-10 11:48:22 +010023 -Iinclude/lib/pcie \
24 -Iinclude/lib/spdm \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020025 -Iinclude/lib/utils \
26 -Iinclude/lib/xlat_tables \
27 -Iinclude/plat/common \
28 -Iinclude/runtime_services \
29 -Iinclude/runtime_services/secure_el0_payloads \
Antonio Nino Diaz652d20a2018-12-10 17:17:33 +000030 -Iinclude/runtime_services/secure_el1_payloads \
nabkah01cd668462022-11-06 15:29:44 +000031 -Iinclude/runtime_services/host_realm_managment \
Antonio Nino Diaza1497e32018-11-08 11:45:13 +000032 -Ispm/cactus \
Antonio Nino Diaz26b38642019-03-28 13:16:04 +000033 -Ispm/ivy \
nabkah01002e5692022-10-10 12:36:46 +010034 -Irealm \
Mark Dykese7810b52020-06-03 15:46:55 -050035 -Ismc_fuzz/include
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020036
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020037FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c
38
39FRAMEWORK_SOURCES += $(addprefix tftf/, \
40 framework/${ARCH}/arch.c \
41 framework/${ARCH}/asm_debug.S \
42 framework/${ARCH}/entrypoint.S \
43 framework/${ARCH}/exceptions.S \
Sandrine Bailleuxa43b0032019-01-14 14:04:32 +010044 framework/${ARCH}/exception_report.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020045 framework/debug.c \
46 framework/main.c \
47 framework/nvm_results_helpers.c \
48 framework/report.c \
49 framework/timer/timer_framework.c \
50 tests/common/test_helpers.c \
51)
52
53FRAMEWORK_SOURCES += \
54 lib/${ARCH}/cache_helpers.S \
55 lib/${ARCH}/misc_helpers.S \
56 lib/delay/delay.c \
57 lib/events/events.c \
Harrison Mutai089c9ad2025-04-25 16:03:54 +000058 ${EVENT_LOG_SOURCES} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020059 lib/extensions/amu/${ARCH}/amu.c \
60 lib/extensions/amu/${ARCH}/amu_helpers.S \
Olivier Deprezc8f6a672022-01-13 13:44:53 +000061 lib/exceptions/irq.c \
Kathleen Capellabde3eab2024-12-09 14:04:43 -050062 lib/hob/hob.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020063 lib/locks/${ARCH}/spinlock.S \
64 lib/power_management/hotplug/hotplug.c \
65 lib/power_management/suspend/${ARCH}/asm_tftf_suspend.S \
66 lib/power_management/suspend/tftf_suspend.c \
67 lib/psci/psci.c \
68 lib/sdei/sdei.c \
69 lib/smc/${ARCH}/asm_smc.S \
70 lib/smc/${ARCH}/smc.c \
Jimmy Brissonc4f3eee2020-06-23 15:25:05 -050071 lib/trng/trng.c \
Sona Mathew07384212022-11-28 13:19:11 -060072 lib/errata_abi/errata_abi.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020073 lib/trusted_os/trusted_os.c \
74 lib/utils/mp_printf.c \
75 lib/utils/uuid.c \
76 ${XLAT_TABLES_LIB_SRCS} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020077 plat/common/${ARCH}/platform_mp_stack.S \
78 plat/common/plat_common.c \
79 plat/common/plat_state_id.c \
80 plat/common/plat_topology.c \
81 plat/common/tftf_nvm_accessors.c
82
83
84FRAMEWORK_SOURCES += ${COMPILER_RT_SRCS}
85
Alexei Fedorovfb003382019-10-04 16:13:47 +010086ifeq (${ARCH},aarch64)
87# ARMv8.3 Pointer Authentication support files
88FRAMEWORK_SOURCES += \
Olivier Deprezc8f6a672022-01-13 13:44:53 +000089 lib/exceptions/aarch64/sync.c \
Manish Pandeyd6480772023-02-27 13:23:06 +000090 lib/exceptions/aarch64/serror.c \
Alexei Fedorovfb003382019-10-04 16:13:47 +010091 lib/extensions/pauth/aarch64/pauth.c \
johpow0150ccb552020-11-10 19:22:13 -060092 lib/extensions/pauth/aarch64/pauth_helpers.S \
93 lib/extensions/sme/aarch64/sme.c \
Jayanth Dodderi Chidanand95d5d272023-01-16 17:58:47 +000094 lib/extensions/sme/aarch64/sme_helpers.S \
Arunachalam Ganapathy0bbdc2d2023-04-05 15:30:18 +010095 lib/extensions/sme/aarch64/sme2_helpers.S \
Arunachalam Ganapathyd179ddc2023-04-12 10:41:42 +010096 lib/extensions/sve/aarch64/sve.c \
Igor Podgainõid1a7f4d2024-11-26 12:50:47 +010097 lib/extensions/sve/aarch64/sve_helpers.S \
98 lib/extensions/sysreg128/aarch64/sysreg128_helpers.S
Alexei Fedorovfb003382019-10-04 16:13:47 +010099endif
100
Jayanth Dodderi Chidanand86e5e5d2024-08-05 19:52:29 +0100101ifeq (${ARCH},aarch64)
102# Context Management Library support files
103FRAMEWORK_SOURCES += \
Igor Podgainõi4b672102024-09-23 13:06:15 +0200104 lib/context_mgmt/aarch64/context_el1.c \
105 lib/context_mgmt/aarch64/context_el2.c
Jayanth Dodderi Chidanand86e5e5d2024-08-05 19:52:29 +0100106endif
107
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200108TFTF_LINKERFILE := tftf/framework/tftf.ld.S
109
110
111TFTF_DEFINES :=
112
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +0200113# Enable dynamic translation tables
114PLAT_XLAT_TABLES_DYNAMIC := 1
115$(eval $(call add_define,TFTF_DEFINES,PLAT_XLAT_TABLES_DYNAMIC))