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