summaryrefslogtreecommitdiff
path: root/realm/realm.mk
blob: 923a687059ea4e5e091ee095a2b032738f49d796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#

include branch_protection.mk

REALM_INCLUDES :=							\
	-Itftf/framework/include					\
	-Iinclude							\
	-Iinclude/common						\
	-Iinclude/common/${ARCH}					\
	-Iinclude/lib							\
	-Iinclude/lib/extensions					\
	-Iinclude/lib/${ARCH}						\
	-Iinclude/lib/utils						\
	-Iinclude/lib/xlat_tables					\
	-Iinclude/runtime_services					\
	-Iinclude/runtime_services/host_realm_managment			\
	-Irealm								\
	-Irealm/aarch64							\
	-Irealm/include

REALM_SOURCES:=								\
	$(addprefix realm/,						\
	aarch64/realm_entrypoint.S					\
	aarch64/realm_exceptions.S					\
	realm_debug.c							\
	realm_interrupt.c						\
	realm_payload_main.c						\
	realm_pmuv3.c							\
	realm_rsi.c							\
	realm_shared_data.c						\
	)

REALM_SOURCES += lib/${ARCH}/cache_helpers.S				\
	lib/${ARCH}/misc_helpers.S					\
	lib/smc/${ARCH}/asm_smc.S					\
	lib/smc/${ARCH}/smc.c						\
	lib/exceptions/${ARCH}/sync.c					\
	lib/locks/${ARCH}/spinlock.S					\
	lib/delay/delay.c						\
	lib/extensions/fpu/fpu.c

# TODO: Remove dependency on TFTF files.
REALM_SOURCES	+=							\
	tftf/framework/${ARCH}/exception_report.c

REALM_LINKERFILE:=	realm/realm.ld.S

REALM_DEFINES:=
$(eval $(call add_define,REALM_DEFINES,ARM_ARCH_MAJOR))
$(eval $(call add_define,REALM_DEFINES,ARM_ARCH_MINOR))
$(eval $(call add_define,REALM_DEFINES,ENABLE_BTI))
$(eval $(call add_define,REALM_DEFINES,ENABLE_PAUTH))
$(eval $(call add_define,REALM_DEFINES,LOG_LEVEL))
$(eval $(call add_define,REALM_DEFINES,IMAGE_REALM))