xref: /rk3399_ARM-atf/plat/arm/board/common/board_common.mk (revision 9db9c65a112e6e3a0bb9588b8e30a22265cbfbaf)
195cfd4adSJuan Castillo#
2*9db9c65aSQixiang Xu# Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
395cfd4adSJuan Castillo#
482cb2c1aSdp-arm# SPDX-License-Identifier: BSD-3-Clause
595cfd4adSJuan Castillo#
695cfd4adSJuan Castillo
77b4c1405SJuan CastilloPLAT_INCLUDES		+=	-Iinclude/plat/arm/board/common/			\
87b4c1405SJuan Castillo				-Iinclude/plat/arm/board/common/drivers
995cfd4adSJuan Castillo
101a0a3f06SYatharth KocharPLAT_BL_COMMON_SOURCES	+=	drivers/arm/pl011/${ARCH}/pl011_console.S		\
111a0a3f06SYatharth Kochar				plat/arm/board/common/${ARCH}/board_arm_helpers.S
1295cfd4adSJuan Castillo
137b4c1405SJuan CastilloBL1_SOURCES		+=	plat/arm/board/common/drivers/norflash/norflash.c
1495cfd4adSJuan Castillo
157b4c1405SJuan CastilloBL2_SOURCES		+=	plat/arm/board/common/drivers/norflash/norflash.c
1695cfd4adSJuan Castillo
1795cfd4adSJuan Castillo#BL31_SOURCES		+=
1895cfd4adSJuan Castillo
1995cfd4adSJuan Castilloifneq (${TRUSTED_BOARD_BOOT},0)
20f143cafeSSoby Mathew  ifneq (${ARM_CRYPTOCELL_INTEG}, 1)
2195cfd4adSJuan Castillo    # ROTPK hash location
2295cfd4adSJuan Castillo    ifeq (${ARM_ROTPK_LOCATION}, regs)
2395cfd4adSJuan Castillo        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_REGS_ID
2495cfd4adSJuan Castillo    else ifeq (${ARM_ROTPK_LOCATION}, devel_rsa)
25*9db9c65aSQixiang Xu        KEY_ALG := rsa
2695cfd4adSJuan Castillo        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_DEVEL_RSA_ID
27*9db9c65aSQixiang Xu    else ifeq (${ARM_ROTPK_LOCATION}, devel_ecdsa)
28*9db9c65aSQixiang Xu        KEY_ALG := ecdsa
29*9db9c65aSQixiang Xu        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_DEVEL_ECDSA_ID
3095cfd4adSJuan Castillo    else
3195cfd4adSJuan Castillo        $(error "Unsupported ARM_ROTPK_LOCATION value")
3295cfd4adSJuan Castillo    endif
3395cfd4adSJuan Castillo    $(eval $(call add_define,ARM_ROTPK_LOCATION_ID))
3495cfd4adSJuan Castillo
3548279d52SJuan Castillo    # Certificate NV-Counters. Use values corresponding to tied off values in
3648279d52SJuan Castillo    # ARM development platforms
3748279d52SJuan Castillo    TFW_NVCTR_VAL	?=	31
3848279d52SJuan Castillo    NTFW_NVCTR_VAL	?=	223
39f143cafeSSoby Mathew  else
40f143cafeSSoby Mathew    # Certificate NV-Counters when CryptoCell is integrated. For development
41f143cafeSSoby Mathew    # platforms we set the counter to first valid value.
42f143cafeSSoby Mathew    TFW_NVCTR_VAL	?=	0
43f143cafeSSoby Mathew    NTFW_NVCTR_VAL	?=	0
44f143cafeSSoby Mathew  endif
4595cfd4adSJuan Castillo    BL1_SOURCES		+=	plat/arm/board/common/board_arm_trusted_boot.c
4695cfd4adSJuan Castillo    BL2_SOURCES		+=	plat/arm/board/common/board_arm_trusted_boot.c
4795cfd4adSJuan Castilloendif
48c64a0448SVikram Kanigiri
49c64a0448SVikram Kanigiri# This flag controls whether memory usage needs to be optimised
500289970dSAntonio Nino DiazARM_BOARD_OPTIMISE_MEM	?=	0
51c64a0448SVikram Kanigiri
52c64a0448SVikram Kanigiri# Process flags
530289970dSAntonio Nino Diaz$(eval $(call assert_boolean,ARM_BOARD_OPTIMISE_MEM))
540289970dSAntonio Nino Diaz$(eval $(call add_define,ARM_BOARD_OPTIMISE_MEM))
55