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