xref: /rk3399_ARM-atf/plat/arm/board/corstone1000/platform.mk (revision b0236d0a21ea33d71628052a3fb7c3c22f3f9c58)
10260eb0dSVishnu Banavath#
2c5c54e20SBoyan Karatotev# Copyright (c) 2021-2025 Arm Limited and Contributors. All rights reserved.
30260eb0dSVishnu Banavath#
40260eb0dSVishnu Banavath# SPDX-License-Identifier: BSD-3-Clause
50260eb0dSVishnu Banavath#
60260eb0dSVishnu Banavath
70260eb0dSVishnu Banavath# Making sure the corstone1000 platform type is specified
80260eb0dSVishnu Banavathifeq ($(filter ${TARGET_PLATFORM}, fpga fvp),)
90260eb0dSVishnu Banavath        $(error TARGET_PLATFORM must be fpga or fvp)
100260eb0dSVishnu Banavathendif
110260eb0dSVishnu Banavath
120260eb0dSVishnu BanavathCORSTONE1000_CPU_LIBS	+=lib/cpus/aarch64/cortex_a35.S
130260eb0dSVishnu Banavath
140260eb0dSVishnu BanavathPLAT_INCLUDES		:=	-Iplat/arm/board/corstone1000/common/include	\
150260eb0dSVishnu Banavath				-Iplat/arm/board/corstone1000/include		\
160260eb0dSVishnu Banavath				-Iinclude/plat/arm/common			\
170260eb0dSVishnu Banavath				-Iinclude/plat/arm/css/common/aarch64
180260eb0dSVishnu Banavath
19*7622ceccSAhmed Azeemoverride ARM_PLAT_PROVIDES_BL2_MEM_PARAMS	:=	1
200260eb0dSVishnu Banavath
210260eb0dSVishnu BanavathCORSTONE1000_FW_NVCTR_VAL	:=	255
220260eb0dSVishnu BanavathTFW_NVCTR_VAL		:=	${CORSTONE1000_FW_NVCTR_VAL}
230260eb0dSVishnu BanavathNTFW_NVCTR_VAL		:=	${CORSTONE1000_FW_NVCTR_VAL}
240260eb0dSVishnu Banavath
250260eb0dSVishnu Banavathoverride NEED_BL1	:=	no
260260eb0dSVishnu Banavath
270260eb0dSVishnu Banavathoverride NEED_BL2	:=	yes
280260eb0dSVishnu BanavathFIP_BL2_ARGS := tb-fw
290260eb0dSVishnu Banavath
300260eb0dSVishnu Banavathoverride NEED_BL2U	:=	no
310260eb0dSVishnu Banavathoverride NEED_BL31	:=	yes
3287799772SHarsimran Singh TungalNEED_BL32		?=	yes
330260eb0dSVishnu Banavathoverride NEED_BL33	:=	yes
340260eb0dSVishnu Banavath
3587799772SHarsimran Singh Tungal# Add CORSTONE1000_WITH_BL32 as a preprocessor define (-D option)
3687799772SHarsimran Singh Tungalifeq (${NEED_BL32},yes)
3787799772SHarsimran Singh Tungal$(eval $(call add_define,CORSTONE1000_WITH_BL32))
3887799772SHarsimran Singh Tungalendif
3987799772SHarsimran Singh Tungal
4016f48623SHarsimran Singh TungalENABLE_MULTICORE       :=      0
4116f48623SHarsimran Singh Tungalifneq ($(filter ${TARGET_PLATFORM}, fvp),)
4216f48623SHarsimran Singh Tungalifeq (${ENABLE_MULTICORE},1)
4316f48623SHarsimran Singh Tungal$(eval $(call add_define,CORSTONE1000_FVP_MULTICORE))
4416f48623SHarsimran Singh Tungalendif
4516f48623SHarsimran Singh Tungalendif
4616f48623SHarsimran Singh Tungal
47c5c54e20SBoyan KaratotevUSE_GIC_DRIVER			:=	2
480260eb0dSVishnu Banavath
490260eb0dSVishnu BanavathBL2_SOURCES		+=	plat/arm/board/corstone1000/common/corstone1000_security.c		\
500260eb0dSVishnu Banavath				plat/arm/board/corstone1000/common/corstone1000_err.c		\
510260eb0dSVishnu Banavath				plat/arm/board/corstone1000/common/corstone1000_trusted_boot.c	\
520260eb0dSVishnu Banavath				lib/utils/mem_region.c					\
53cb27274cSGauri Sahnan				lib/cpus/aarch64/cpu_helpers.S \
540260eb0dSVishnu Banavath				plat/arm/board/corstone1000/common/corstone1000_helpers.S		\
550260eb0dSVishnu Banavath				plat/arm/board/corstone1000/common/corstone1000_plat.c		\
560260eb0dSVishnu Banavath				plat/arm/board/corstone1000/common/corstone1000_bl2_mem_params_desc.c \
570260eb0dSVishnu Banavath				${CORSTONE1000_CPU_LIBS}					\
580260eb0dSVishnu Banavath
590260eb0dSVishnu Banavath
600260eb0dSVishnu BanavathBL31_SOURCES	+=	drivers/cfi/v2m/v2m_flash.c				\
610260eb0dSVishnu Banavath			lib/utils/mem_region.c					\
620260eb0dSVishnu Banavath			plat/arm/board/corstone1000/common/corstone1000_helpers.S		\
630260eb0dSVishnu Banavath			plat/arm/board/corstone1000/common/corstone1000_topology.c		\
640260eb0dSVishnu Banavath			plat/arm/board/corstone1000/common/corstone1000_security.c		\
650260eb0dSVishnu Banavath			plat/arm/board/corstone1000/common/corstone1000_plat.c		\
660260eb0dSVishnu Banavath			plat/arm/board/corstone1000/common/corstone1000_pm.c		\
67f0b64e50SMadhukar Pappireddy			plat/arm/board/corstone1000/common/corstone1000_bl31_setup.c	\
68c5c54e20SBoyan Karatotev			${CORSTONE1000_CPU_LIBS}
690260eb0dSVishnu Banavath
700260eb0dSVishnu Banavathifneq (${ENABLE_STACK_PROTECTOR},0)
710260eb0dSVishnu Banavath	ifneq (${ENABLE_STACK_PROTECTOR},none)
720260eb0dSVishnu Banavath		CORSTONE1000_SECURITY_SOURCES := plat/arm/board/corstone1000/common/corstone1000_stack_protector.c
730260eb0dSVishnu Banavath		BL2_SOURCES += ${CORSTONE1000_SECURITY_SOURCES}
740260eb0dSVishnu Banavath		BL31_SOURCES += ${CORSTONE1000_SECURITY_SOURCES}
750260eb0dSVishnu Banavath	endif
760260eb0dSVishnu Banavathendif
770260eb0dSVishnu Banavath
780260eb0dSVishnu BanavathFDT_SOURCES		+=	plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts
790260eb0dSVishnu BanavathCORSTONE1000_TOS_FW_CONFIG	:=	${BUILD_PLAT}/fdts/corstone1000_spmc_manifest.dtb
800260eb0dSVishnu Banavath
810260eb0dSVishnu Banavath# Add the SPMC manifest to FIP and specify the same to certtool
820260eb0dSVishnu Banavath$(eval $(call TOOL_ADD_PAYLOAD,${CORSTONE1000_TOS_FW_CONFIG},--tos-fw-config,${CORSTONE1000_TOS_FW_CONFIG}))
830260eb0dSVishnu Banavath
840260eb0dSVishnu Banavath# Adding TARGET_PLATFORM as a GCC define (-D option)
850260eb0dSVishnu Banavath$(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM})))
860260eb0dSVishnu Banavath
870260eb0dSVishnu Banavath# Adding CORSTONE1000_FW_NVCTR_VAL as a GCC define (-D option)
880260eb0dSVishnu Banavath$(eval $(call add_define,CORSTONE1000_FW_NVCTR_VAL))
890260eb0dSVishnu Banavath
900260eb0dSVishnu Banavathinclude plat/arm/common/arm_common.mk
910260eb0dSVishnu Banavathinclude plat/arm/board/common/board_common.mk
92