xref: /optee_os/core/arch/arm/kernel/sub.mk (revision a1d5c81f8834a9d2c6f4372cce2e59e70e709121)
1ifeq ($(CFG_WITH_USER_TA),y)
2srcs-y += user_ta.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
7srcs-y += pseudo_ta.c
8srcs-y += tee_time.c
9srcs-y += rpc_io_i2c.c
10srcs-y += otp_stubs.c
11srcs-y += delay.c
12
13srcs-$(CFG_SECURE_TIME_SOURCE_CNTPCT) += tee_time_arm_cntpct.c
14srcs-$(CFG_SECURE_TIME_SOURCE_REE) += tee_time_ree.c
15srcs-$(CFG_ARM64_core) += timer_a64.c
16
17srcs-$(CFG_ARM32_core) += spin_lock_a32.S
18srcs-$(CFG_ARM64_core) += spin_lock_a64.S
19srcs-$(CFG_TEE_CORE_DEBUG) += spin_lock_debug.c
20srcs-$(CFG_ARM32_core) += tlb_helpers_a32.S
21srcs-$(CFG_ARM64_core) += tlb_helpers_a64.S
22srcs-$(CFG_ARM64_core) += cache_helpers_a64.S
23srcs-$(CFG_ARM32_core) += cache_helpers_a32.S
24srcs-$(CFG_PL310) += tz_ssvce_pl310_a32.S
25srcs-$(CFG_PL310) += tee_l2cc_mutex.c
26
27srcs-$(CFG_ARM32_core) += thread_a32.S
28srcs-$(CFG_ARM64_core) += thread_a64.S
29srcs-y += thread.c
30ifeq ($(CFG_CORE_FFA),y)
31srcs-y += thread_spmc.c
32cppflags-thread_spmc.c-y += -DTEE_IMPL_GIT_SHA1=$(TEE_IMPL_GIT_SHA1)
33srcs-$(CFG_ARM32_core) += thread_spmc_a32.S
34srcs-$(CFG_ARM64_core) += thread_spmc_a64.S
35else
36srcs-y += thread_optee_smc.c
37srcs-$(CFG_ARM32_core) += thread_optee_smc_a32.S
38srcs-$(CFG_ARM64_core) += thread_optee_smc_a64.S
39endif
40srcs-y += abort.c
41srcs-$(CFG_WITH_VFP) += vfp.c
42ifeq ($(CFG_WITH_VFP),y)
43srcs-$(CFG_ARM32_core) += vfp_a32.S
44srcs-$(CFG_ARM64_core) += vfp_a64.S
45endif
46srcs-y += trace_ext.c
47srcs-$(CFG_ARM32_core) += misc_a32.S
48srcs-$(CFG_ARM64_core) += misc_a64.S
49srcs-y += mutex.c
50srcs-$(CFG_LOCKDEP) += mutex_lockdep.c
51srcs-y += wait_queue.c
52srcs-$(CFG_WITH_SECURE_PARTITION) += secure_partition.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
70ifeq ($(CFG_SYSCALL_FTRACE),y)
71# We would not like to profile thread.c file as it provide common APIs
72# that are needed for ftrace framework to trace syscalls. So profiling
73# this file could create an incorrect cyclic behaviour.
74cflags-remove-thread.c-y += -pg
75cflags-remove-spin_lock_debug.c-$(CFG_TEE_CORE_DEBUG) += -pg
76# Tracing abort dump files corrupts the stack trace. So exclude them
77# from profiling.
78cflags-remove-abort.c-y += -pg
79ifeq ($(CFG_UNWIND),y)
80cflags-remove-unwind_arm32.c-y += -pg
81cflags-remove-unwind_arm64.c-$(CFG_ARM64_core) += -pg
82endif
83endif
84