blob: e12f3e197d41bf8d33534ae860730908d0ba70b7 [file] [log] [blame]
nabkah01002e5692022-10-10 12:36:46 +01001#
AlexeiFedorov2f30f102023-03-13 19:37:46 +00002# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
nabkah01002e5692022-10-10 12:36:46 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7include branch_protection.mk
8
9REALM_INCLUDES := \
10 -Itftf/framework/include \
11 -Iinclude \
12 -Iinclude/common \
13 -Iinclude/common/${ARCH} \
14 -Iinclude/lib \
Shruti Gupta369955a2023-04-19 18:05:56 +010015 -Iinclude/lib/extensions \
nabkah01002e5692022-10-10 12:36:46 +010016 -Iinclude/lib/${ARCH} \
17 -Iinclude/lib/utils \
18 -Iinclude/lib/xlat_tables \
19 -Iinclude/runtime_services \
20 -Iinclude/runtime_services/host_realm_managment \
21 -Irealm \
AlexeiFedorov2f30f102023-03-13 19:37:46 +000022 -Irealm/aarch64 \
23 -Irealm/include
nabkah01002e5692022-10-10 12:36:46 +010024
25REALM_SOURCES:= \
26 $(addprefix realm/, \
27 aarch64/realm_entrypoint.S \
28 aarch64/realm_exceptions.S \
29 realm_debug.c \
nabkah01002e5692022-10-10 12:36:46 +010030 realm_interrupt.c \
AlexeiFedorov2f30f102023-03-13 19:37:46 +000031 realm_payload_main.c \
32 realm_pmuv3.c \
nabkah01002e5692022-10-10 12:36:46 +010033 realm_rsi.c \
34 realm_shared_data.c \
Arunachalam Ganapathy0bbdc2d2023-04-05 15:30:18 +010035 realm_sve.c \
nabkah01002e5692022-10-10 12:36:46 +010036 )
37
38REALM_SOURCES += lib/${ARCH}/cache_helpers.S \
39 lib/${ARCH}/misc_helpers.S \
40 lib/smc/${ARCH}/asm_smc.S \
41 lib/smc/${ARCH}/smc.c \
42 lib/exceptions/${ARCH}/sync.c \
43 lib/locks/${ARCH}/spinlock.S \
Shruti Gupta369955a2023-04-19 18:05:56 +010044 lib/delay/delay.c \
Arunachalam Ganapathy0bbdc2d2023-04-05 15:30:18 +010045 lib/extensions/fpu/fpu.c \
46 lib/extensions/sve/aarch64/sve.c
nabkah01002e5692022-10-10 12:36:46 +010047
48# TODO: Remove dependency on TFTF files.
49REALM_SOURCES += \
50 tftf/framework/${ARCH}/exception_report.c
51
52REALM_LINKERFILE:= realm/realm.ld.S
53
54REALM_DEFINES:=
55$(eval $(call add_define,REALM_DEFINES,ARM_ARCH_MAJOR))
56$(eval $(call add_define,REALM_DEFINES,ARM_ARCH_MINOR))
57$(eval $(call add_define,REALM_DEFINES,ENABLE_BTI))
58$(eval $(call add_define,REALM_DEFINES,ENABLE_PAUTH))
59$(eval $(call add_define,REALM_DEFINES,LOG_LEVEL))
60$(eval $(call add_define,REALM_DEFINES,IMAGE_REALM))