Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 1 | # |
AlexeiFedorov | 9f2de63 | 2024-09-10 11:48:22 +0100 | [diff] [blame] | 2 | # Copyright (c) 2018-2024, Arm Limited. All rights reserved. |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | AUTOGEN_DIR := $(BUILD_PLAT)/autogen |
| 8 | |
| 9 | include lib/xlat_tables_v2/xlat_tables.mk |
| 10 | include lib/compiler-rt/compiler-rt.mk |
Mark Dykes | e7810b5 | 2020-06-03 15:46:55 -0500 | [diff] [blame] | 11 | include lib/libfdt/libfdt.mk |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 12 | |
| 13 | TFTF_INCLUDES := \ |
| 14 | -I${AUTOGEN_DIR} \ |
| 15 | -Itftf/framework/include \ |
Antonio Nino Diaz | 09a00ef | 2019-01-11 13:12:58 +0000 | [diff] [blame] | 16 | -Iinclude \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 17 | -Iinclude/common \ |
| 18 | -Iinclude/common/${ARCH} \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 19 | -Iinclude/lib \ |
| 20 | -Iinclude/lib/${ARCH} \ |
| 21 | -Iinclude/lib/extensions \ |
Kathleen Capella | bde3eab | 2024-12-09 14:04:43 -0500 | [diff] [blame] | 22 | -Iinclude/lib/hob \ |
AlexeiFedorov | 9f2de63 | 2024-09-10 11:48:22 +0100 | [diff] [blame] | 23 | -Iinclude/lib/pcie \ |
| 24 | -Iinclude/lib/spdm \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 25 | -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 Diaz | 652d20a | 2018-12-10 17:17:33 +0000 | [diff] [blame] | 30 | -Iinclude/runtime_services/secure_el1_payloads \ |
nabkah01 | cd66846 | 2022-11-06 15:29:44 +0000 | [diff] [blame] | 31 | -Iinclude/runtime_services/host_realm_managment \ |
Antonio Nino Diaz | a1497e3 | 2018-11-08 11:45:13 +0000 | [diff] [blame] | 32 | -Ispm/cactus \ |
Antonio Nino Diaz | 26b3864 | 2019-03-28 13:16:04 +0000 | [diff] [blame] | 33 | -Ispm/ivy \ |
nabkah01 | 002e569 | 2022-10-10 12:36:46 +0100 | [diff] [blame] | 34 | -Irealm \ |
Mark Dykes | e7810b5 | 2020-06-03 15:46:55 -0500 | [diff] [blame] | 35 | -Ismc_fuzz/include |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 36 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 37 | FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c |
| 38 | |
| 39 | FRAMEWORK_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 Bailleux | a43b003 | 2019-01-14 14:04:32 +0100 | [diff] [blame] | 44 | framework/${ARCH}/exception_report.c \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 45 | 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 | |
| 53 | FRAMEWORK_SOURCES += \ |
| 54 | lib/${ARCH}/cache_helpers.S \ |
| 55 | lib/${ARCH}/misc_helpers.S \ |
| 56 | lib/delay/delay.c \ |
| 57 | lib/events/events.c \ |
Harrison Mutai | 089c9ad | 2025-04-25 16:03:54 +0000 | [diff] [blame] | 58 | ${EVENT_LOG_SOURCES} \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 59 | lib/extensions/amu/${ARCH}/amu.c \ |
| 60 | lib/extensions/amu/${ARCH}/amu_helpers.S \ |
Olivier Deprez | c8f6a67 | 2022-01-13 13:44:53 +0000 | [diff] [blame] | 61 | lib/exceptions/irq.c \ |
Kathleen Capella | bde3eab | 2024-12-09 14:04:43 -0500 | [diff] [blame] | 62 | lib/hob/hob.c \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 63 | 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 Brisson | c4f3eee | 2020-06-23 15:25:05 -0500 | [diff] [blame] | 71 | lib/trng/trng.c \ |
Sona Mathew | 0738421 | 2022-11-28 13:19:11 -0600 | [diff] [blame] | 72 | lib/errata_abi/errata_abi.c \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 73 | lib/trusted_os/trusted_os.c \ |
| 74 | lib/utils/mp_printf.c \ |
| 75 | lib/utils/uuid.c \ |
| 76 | ${XLAT_TABLES_LIB_SRCS} \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 77 | 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 | |
| 84 | FRAMEWORK_SOURCES += ${COMPILER_RT_SRCS} |
| 85 | |
Alexei Fedorov | fb00338 | 2019-10-04 16:13:47 +0100 | [diff] [blame] | 86 | ifeq (${ARCH},aarch64) |
| 87 | # ARMv8.3 Pointer Authentication support files |
| 88 | FRAMEWORK_SOURCES += \ |
Olivier Deprez | c8f6a67 | 2022-01-13 13:44:53 +0000 | [diff] [blame] | 89 | lib/exceptions/aarch64/sync.c \ |
Manish Pandey | d648077 | 2023-02-27 13:23:06 +0000 | [diff] [blame] | 90 | lib/exceptions/aarch64/serror.c \ |
Alexei Fedorov | fb00338 | 2019-10-04 16:13:47 +0100 | [diff] [blame] | 91 | lib/extensions/pauth/aarch64/pauth.c \ |
johpow01 | 50ccb55 | 2020-11-10 19:22:13 -0600 | [diff] [blame] | 92 | lib/extensions/pauth/aarch64/pauth_helpers.S \ |
| 93 | lib/extensions/sme/aarch64/sme.c \ |
Jayanth Dodderi Chidanand | 95d5d27 | 2023-01-16 17:58:47 +0000 | [diff] [blame] | 94 | lib/extensions/sme/aarch64/sme_helpers.S \ |
Arunachalam Ganapathy | 0bbdc2d | 2023-04-05 15:30:18 +0100 | [diff] [blame] | 95 | lib/extensions/sme/aarch64/sme2_helpers.S \ |
Arunachalam Ganapathy | d179ddc | 2023-04-12 10:41:42 +0100 | [diff] [blame] | 96 | lib/extensions/sve/aarch64/sve.c \ |
Igor Podgainõi | d1a7f4d | 2024-11-26 12:50:47 +0100 | [diff] [blame] | 97 | lib/extensions/sve/aarch64/sve_helpers.S \ |
| 98 | lib/extensions/sysreg128/aarch64/sysreg128_helpers.S |
Alexei Fedorov | fb00338 | 2019-10-04 16:13:47 +0100 | [diff] [blame] | 99 | endif |
| 100 | |
Jayanth Dodderi Chidanand | 86e5e5d | 2024-08-05 19:52:29 +0100 | [diff] [blame] | 101 | ifeq (${ARCH},aarch64) |
| 102 | # Context Management Library support files |
| 103 | FRAMEWORK_SOURCES += \ |
Igor Podgainõi | 4b67210 | 2024-09-23 13:06:15 +0200 | [diff] [blame] | 104 | lib/context_mgmt/aarch64/context_el1.c \ |
| 105 | lib/context_mgmt/aarch64/context_el2.c |
Jayanth Dodderi Chidanand | 86e5e5d | 2024-08-05 19:52:29 +0100 | [diff] [blame] | 106 | endif |
| 107 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 108 | TFTF_LINKERFILE := tftf/framework/tftf.ld.S |
| 109 | |
| 110 | |
| 111 | TFTF_DEFINES := |
| 112 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 113 | # Enable dynamic translation tables |
| 114 | PLAT_XLAT_TABLES_DYNAMIC := 1 |
| 115 | $(eval $(call add_define,TFTF_DEFINES,PLAT_XLAT_TABLES_DYNAMIC)) |