blob: b033627174233bfba560e119b7dc46dffa5ab5bc [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 \
15 -Iinclude/lib/${ARCH} \
16 -Iinclude/lib/utils \
17 -Iinclude/lib/xlat_tables \
18 -Iinclude/runtime_services \
19 -Iinclude/runtime_services/host_realm_managment \
20 -Irealm \
AlexeiFedorov2f30f102023-03-13 19:37:46 +000021 -Irealm/aarch64 \
22 -Irealm/include
nabkah01002e5692022-10-10 12:36:46 +010023
24REALM_SOURCES:= \
25 $(addprefix realm/, \
26 aarch64/realm_entrypoint.S \
27 aarch64/realm_exceptions.S \
28 realm_debug.c \
nabkah01002e5692022-10-10 12:36:46 +010029 realm_interrupt.c \
AlexeiFedorov2f30f102023-03-13 19:37:46 +000030 realm_payload_main.c \
31 realm_pmuv3.c \
nabkah01002e5692022-10-10 12:36:46 +010032 realm_rsi.c \
33 realm_shared_data.c \
34 )
35
36REALM_SOURCES += lib/${ARCH}/cache_helpers.S \
37 lib/${ARCH}/misc_helpers.S \
38 lib/smc/${ARCH}/asm_smc.S \
39 lib/smc/${ARCH}/smc.c \
40 lib/exceptions/${ARCH}/sync.c \
41 lib/locks/${ARCH}/spinlock.S \
42 lib/delay/delay.c
43
44# TODO: Remove dependency on TFTF files.
45REALM_SOURCES += \
46 tftf/framework/${ARCH}/exception_report.c
47
48REALM_LINKERFILE:= realm/realm.ld.S
49
50REALM_DEFINES:=
51$(eval $(call add_define,REALM_DEFINES,ARM_ARCH_MAJOR))
52$(eval $(call add_define,REALM_DEFINES,ARM_ARCH_MINOR))
53$(eval $(call add_define,REALM_DEFINES,ENABLE_BTI))
54$(eval $(call add_define,REALM_DEFINES,ENABLE_PAUTH))
55$(eval $(call add_define,REALM_DEFINES,LOG_LEVEL))
56$(eval $(call add_define,REALM_DEFINES,IMAGE_REALM))