xref: /optee_os/core/arch/arm/kernel/sub.mk (revision fdc4a8bef4978835f05b1687c99e090c85b84b7c)
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_ARM32_core) += thread_spmc_a32.S
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
56
57srcs-y += link_dummies_paged.c
58srcs-y += link_dummies_init.c
59
60asm-defines-y += asm-defines.c
61# Reflect the following dependencies:
62# asm-defines.c includes <kernel/thread.h>
63#   <kernel/thread.h> includes <asm.h>
64#     <asm.h> includes <generated/arm32_sysreg.h>
65#                  and <generated/arm32_gicv3_sysreg.h> (optional)
66asm-defines-asm-defines.c-deps += $(out-dir)/core/include/generated/arm32_sysreg.h
67ifeq ($(CFG_ARM_GICV3),y)
68asm-defines-asm-defines.c-deps += $(out-dir)/core/include/generated/arm32_gicv3_sysreg.h
69endif
70
71ifeq ($(CFG_SYSCALL_FTRACE),y)
72# We would not like to profile thread.c file as it provide common APIs
73# that are needed for ftrace framework to trace syscalls. So profiling
74# this file could create an incorrect cyclic behaviour.
75cflags-remove-thread.c-y += -pg
76# Tracing abort dump files corrupts the stack trace. So exclude them
77# from profiling.
78cflags-remove-abort.c-y += -pg
79ifeq ($(CFG_UNWIND),y)
80cflags-remove-unwind_arm32.c-y += -pg
81cflags-remove-unwind_arm64.c-$(CFG_ARM64_core) += -pg
82endif
83endif
84