xref: /optee_os/core/arch/arm/kernel/sub.mk (revision 47bcc886c285b4682fc756ecf5a28f35bed637e9)
1srcs-y += rpc_io_i2c.c
2srcs-y += idle.c
3
4srcs-$(CFG_SECURE_TIME_SOURCE_CNTPCT) += tee_time_arm_cntpct.c
5srcs-$(CFG_ARM64_core) += generic_timer.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_WITH_USER_TA),y)
21srcs-y += arch_scall.c
22srcs-$(CFG_ARM32_core) += arch_scall_a32.S
23srcs-$(CFG_ARM64_core) += arch_scall_a64.S
24endif
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_ARM64_core) += thread_spmc_a64.S
29else
30srcs-y += thread_optee_smc.c
31srcs-$(CFG_ARM32_core) += thread_optee_smc_a32.S
32srcs-$(CFG_ARM64_core) += thread_optee_smc_a64.S
33endif
34srcs-y += abort.c
35srcs-$(CFG_WITH_VFP) += vfp.c
36ifeq ($(CFG_WITH_VFP),y)
37srcs-$(CFG_ARM32_core) += vfp_a32.S
38srcs-$(CFG_ARM64_core) += vfp_a64.S
39endif
40srcs-$(CFG_ARM32_core) += misc_a32.S
41srcs-$(CFG_ARM64_core) += misc_a64.S
42srcs-$(CFG_WITH_STMM_SP) += stmm_sp.c
43srcs-$(CFG_SECURE_PARTITION) += secure_partition.c
44srcs-$(CFG_SECURE_PARTITION) += spmc_sp_handler.c
45
46srcs-y += boot.c
47srcs-$(CFG_ARM32_core) += entry_a32.S
48srcs-$(CFG_ARM64_core) += entry_a64.S
49
50ifeq ($(CFG_UNWIND),y)
51srcs-$(CFG_ARM32_core) += unwind_arm32.c
52srcs-$(CFG_ARM64_core) += unwind_arm64.c
53endif
54
55srcs-$(CFG_NS_VIRTUALIZATION) += virtualization.c
56ifeq ($(CFG_SEMIHOSTING),y)
57srcs-$(CFG_ARM64_core) += semihosting_a64.S
58endif
59
60srcs-y += link_dummies_paged.c
61srcs-y += link_dummies_init.c
62
63asm-defines-y += asm-defines.c
64# Reflect the following dependencies:
65# asm-defines.c includes <kernel/thread.h>
66#   <kernel/thread.h> includes <asm.h>
67#     <asm.h> includes <generated/arm32_sysreg.h>
68#                  and <generated/arm32_gicv3_sysreg.h> (optional)
69asm-defines-asm-defines.c-deps += $(out-dir)/core/include/generated/arm32_sysreg.h
70ifeq ($(CFG_ARM_GICV3),y)
71asm-defines-asm-defines.c-deps += $(out-dir)/core/include/generated/arm32_gicv3_sysreg.h
72endif
73
74ifeq ($(CFG_SYSCALL_FTRACE),y)
75# We would not like to profile thread.c file as it provide common APIs
76# that are needed for ftrace framework to trace syscalls. So profiling
77# this file could create an incorrect cyclic behaviour.
78cflags-remove-thread.c-y += -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