xref: /rk3399_ARM-atf/plat/st/stm32mp1/platform.mk (revision 4353bb20cc8937a5d540a06c4a8fe7ee880fc3ca)
1*4353bb20SYann Gautier#
2*4353bb20SYann Gautier# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3*4353bb20SYann Gautier#
4*4353bb20SYann Gautier# SPDX-License-Identifier: BSD-3-Clause
5*4353bb20SYann Gautier#
6*4353bb20SYann Gautier
7*4353bb20SYann GautierARM_CORTEX_A7		:=	yes
8*4353bb20SYann GautierARM_WITH_NEON		:=	yes
9*4353bb20SYann GautierLOAD_IMAGE_V2		:=	1
10*4353bb20SYann GautierBL2_AT_EL3		:=	1
11*4353bb20SYann GautierENABLE_PLAT_COMPAT	:=	0
12*4353bb20SYann GautierUSE_COHERENT_MEM	:=	0
13*4353bb20SYann Gautier
14*4353bb20SYann GautierSTM32_TF_VERSION	?=	0
15*4353bb20SYann Gautier
16*4353bb20SYann Gautier# Not needed for Cortex-A7
17*4353bb20SYann GautierWORKAROUND_CVE_2017_5715:=	0
18*4353bb20SYann Gautier
19*4353bb20SYann GautierPLAT_INCLUDES		:=	-Iplat/st/stm32mp1/include/
20*4353bb20SYann GautierPLAT_INCLUDES		+=	-Iinclude/common/tbbr
21*4353bb20SYann GautierPLAT_INCLUDES		+=	-Iinclude/drivers/st
22*4353bb20SYann Gautier
23*4353bb20SYann Gautierinclude lib/libfdt/libfdt.mk
24*4353bb20SYann Gautier
25*4353bb20SYann GautierPLAT_BL_COMMON_SOURCES	:=	plat/st/stm32mp1/stm32mp1_common.c
26*4353bb20SYann Gautier
27*4353bb20SYann GautierPLAT_BL_COMMON_SOURCES	+=	drivers/console/aarch32/console.S			\
28*4353bb20SYann Gautier				drivers/st/uart/aarch32/stm32_console.S
29*4353bb20SYann Gautier
30*4353bb20SYann Gautierifneq (${ENABLE_STACK_PROTECTOR},0)
31*4353bb20SYann GautierPLAT_BL_COMMON_SOURCES	+=	plat/st/stm32mp1/stm32mp1_stack_protector.c
32*4353bb20SYann Gautierendif
33*4353bb20SYann Gautier
34*4353bb20SYann Gautierinclude lib/xlat_tables_v2/xlat_tables.mk
35*4353bb20SYann GautierPLAT_BL_COMMON_SOURCES	+=	${XLAT_TABLES_LIB_SRCS}
36*4353bb20SYann Gautier
37*4353bb20SYann GautierPLAT_BL_COMMON_SOURCES	+=	lib/cpus/aarch32/cortex_a7.S
38*4353bb20SYann Gautier
39*4353bb20SYann GautierPLAT_BL_COMMON_SOURCES	+=	${LIBFDT_SRCS}						\
40*4353bb20SYann Gautier				drivers/delay_timer/delay_timer.c			\
41*4353bb20SYann Gautier				drivers/delay_timer/generic_delay_timer.c		\
42*4353bb20SYann Gautier				plat/st/stm32mp1/stm32mp1_helper.S
43*4353bb20SYann Gautier
44*4353bb20SYann GautierBL2_SOURCES		+=	drivers/io/io_dummy.c					\
45*4353bb20SYann Gautier				drivers/io/io_storage.c					\
46*4353bb20SYann Gautier				plat/st/stm32mp1/bl2_io_storage.c			\
47*4353bb20SYann Gautier				plat/st/stm32mp1/bl2_plat_setup.c
48*4353bb20SYann Gautier
49*4353bb20SYann GautierBL2_SOURCES		+=	common/desc_image_load.c				\
50*4353bb20SYann Gautier				plat/st/stm32mp1/plat_bl2_mem_params_desc.c		\
51*4353bb20SYann Gautier				plat/st/stm32mp1/plat_image_load.c
52*4353bb20SYann Gautier
53*4353bb20SYann Gautier# For memory footprint optimization, build with thumb and interwork support
54*4353bb20SYann GautierASFLAGS			+=	-mthumb -mthumb-interwork
55*4353bb20SYann GautierTF_CFLAGS		+=	-mthumb -mthumb-interwork
56