xref: /optee_os/core/arch/arm/kernel/sub.mk (revision a54f2bb703cea069f79647bb5bf90ac7088bcb99)
1ifeq ($(CFG_WITH_USER_TA),y)
2srcs-y += ldelf_loader.c
3srcs-$(CFG_REE_FS_TA) += ree_fs_ta.c
4srcs-$(CFG_EARLY_TA) += early_ta.c
5srcs-$(CFG_SECSTOR_TA) += secstor_ta.c
6endif
7
8srcs-$(CFG_EMBEDDED_TS) += embedded_ts.c
9srcs-y += tee_time.c
10srcs-y += rpc_io_i2c.c
11srcs-y += otp_stubs.c
12srcs-y += delay.c
13
14srcs-$(CFG_SECURE_TIME_SOURCE_CNTPCT) += tee_time_arm_cntpct.c
15srcs-$(CFG_SECURE_TIME_SOURCE_REE) += tee_time_ree.c
16srcs-$(CFG_ARM64_core) += timer_a64.c
17
18srcs-$(CFG_ARM32_core) += spin_lock_a32.S
19srcs-$(CFG_ARM64_core) += spin_lock_a64.S
20srcs-$(CFG_TEE_CORE_DEBUG) += spin_lock_debug.c
21srcs-$(CFG_ARM32_core) += tlb_helpers_a32.S
22srcs-$(CFG_ARM64_core) += tlb_helpers_a64.S
23srcs-$(CFG_ARM64_core) += cache_helpers_a64.S
24srcs-$(CFG_ARM32_core) += cache_helpers_a32.S
25srcs-$(CFG_PL310) += tz_ssvce_pl310_a32.S
26srcs-$(CFG_PL310) += tee_l2cc_mutex.c
27
28srcs-$(CFG_ARM32_core) += thread_a32.S
29srcs-$(CFG_ARM64_core) += thread_a64.S
30srcs-y += thread.c
31ifeq ($(CFG_CORE_FFA),y)
32srcs-y += thread_spmc.c
33cppflags-thread_spmc.c-y += -DTEE_IMPL_GIT_SHA1=$(TEE_IMPL_GIT_SHA1)
34srcs-$(CFG_ARM32_core) += thread_spmc_a32.S
35srcs-$(CFG_ARM64_core) += thread_spmc_a64.S
36else
37srcs-y += thread_optee_smc.c
38srcs-$(CFG_ARM32_core) += thread_optee_smc_a32.S
39srcs-$(CFG_ARM64_core) += thread_optee_smc_a64.S
40endif
41srcs-y += abort.c
42srcs-$(CFG_WITH_VFP) += vfp.c
43ifeq ($(CFG_WITH_VFP),y)
44srcs-$(CFG_ARM32_core) += vfp_a32.S
45srcs-$(CFG_ARM64_core) += vfp_a64.S
46endif
47srcs-y += trace_ext.c
48srcs-$(CFG_ARM32_core) += misc_a32.S
49srcs-$(CFG_ARM64_core) += misc_a64.S
50srcs-$(CFG_WITH_STMM_SP) += stmm_sp.c
51srcs-$(CFG_SECURE_PARTITION) += secure_partition.c
52srcs-$(CFG_SECURE_PARTITION) += spmc_sp_handler.c
53
54srcs-y += boot.c
55srcs-$(CFG_ARM32_core) += entry_a32.S
56srcs-$(CFG_ARM64_core) += entry_a64.S
57
58ifeq ($(CFG_UNWIND),y)
59srcs-$(CFG_ARM32_core) += unwind_arm32.c
60srcs-$(CFG_ARM64_core) += unwind_arm64.c
61endif
62
63srcs-$(CFG_VIRTUALIZATION) += virtualization.c
64
65srcs-y += link_dummies_paged.c
66srcs-y += link_dummies_init.c
67
68asm-defines-y += asm-defines.c
69# Reflect the following dependencies:
70# asm-defines.c includes <kernel/thread.h>
71#   <kernel/thread.h> includes <asm.h>
72#     <asm.h> includes <generated/arm32_sysreg.h>
73#                  and <generated/arm32_gicv3_sysreg.h> (optional)
74asm-defines-asm-defines.c-deps += $(out-dir)/core/include/generated/arm32_sysreg.h
75ifeq ($(CFG_ARM_GICV3),y)
76asm-defines-asm-defines.c-deps += $(out-dir)/core/include/generated/arm32_gicv3_sysreg.h
77endif
78
79ifeq ($(CFG_SYSCALL_FTRACE),y)
80# We would not like to profile thread.c file as it provide common APIs
81# that are needed for ftrace framework to trace syscalls. So profiling
82# this file could create an incorrect cyclic behaviour.
83cflags-remove-thread.c-y += -pg
84cflags-remove-spin_lock_debug.c-$(CFG_TEE_CORE_DEBUG) += -pg
85# Tracing abort dump files corrupts the stack trace. So exclude them
86# from profiling.
87cflags-remove-abort.c-y += -pg
88ifeq ($(CFG_UNWIND),y)
89cflags-remove-unwind_arm32.c-y += -pg
90cflags-remove-unwind_arm64.c-$(CFG_ARM64_core) += -pg
91endif
92endif
93