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