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