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