blob: 77499d0da6ea64430a3dc66da826d695d817c07c [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 \
Shruti Gupta9d0cfe82023-04-17 10:57:26 +010031 realm_pauth.c \
AlexeiFedorov2f30f102023-03-13 19:37:46 +000032 realm_payload_main.c \
33 realm_pmuv3.c \
nabkah01002e5692022-10-10 12:36:46 +010034 realm_rsi.c \
35 realm_shared_data.c \
Arunachalam Ganapathy0bbdc2d2023-04-05 15:30:18 +010036 realm_sve.c \
nabkah01002e5692022-10-10 12:36:46 +010037 )
38
39REALM_SOURCES += lib/${ARCH}/cache_helpers.S \
40 lib/${ARCH}/misc_helpers.S \
41 lib/smc/${ARCH}/asm_smc.S \
42 lib/smc/${ARCH}/smc.c \
43 lib/exceptions/${ARCH}/sync.c \
44 lib/locks/${ARCH}/spinlock.S \
Shruti Gupta369955a2023-04-19 18:05:56 +010045 lib/delay/delay.c \
Arunachalam Ganapathy0bbdc2d2023-04-05 15:30:18 +010046 lib/extensions/fpu/fpu.c \
Arunachalam Ganapathyc1136a82023-04-12 15:24:44 +010047 lib/extensions/sve/aarch64/sve.c \
48 lib/extensions/sve/aarch64/sve_helpers.S
nabkah01002e5692022-10-10 12:36:46 +010049
50# TODO: Remove dependency on TFTF files.
51REALM_SOURCES += \
52 tftf/framework/${ARCH}/exception_report.c
53
54REALM_LINKERFILE:= realm/realm.ld.S
55
Shruti Gupta9d0cfe82023-04-17 10:57:26 +010056# ARMv8.3 Pointer Authentication support files
57REALM_SOURCES += lib/extensions/pauth/aarch64/pauth.c \
58 lib/extensions/pauth/aarch64/pauth_helpers.S
59
60REALM_INCLUDES += -Iinclude/lib/extensions
61
nabkah01002e5692022-10-10 12:36:46 +010062REALM_DEFINES:=
63$(eval $(call add_define,REALM_DEFINES,ARM_ARCH_MAJOR))
64$(eval $(call add_define,REALM_DEFINES,ARM_ARCH_MINOR))
65$(eval $(call add_define,REALM_DEFINES,ENABLE_BTI))
66$(eval $(call add_define,REALM_DEFINES,ENABLE_PAUTH))
67$(eval $(call add_define,REALM_DEFINES,LOG_LEVEL))
68$(eval $(call add_define,REALM_DEFINES,IMAGE_REALM))