xref: /rk3399_ARM-atf/plat/arm/board/common/board_common.mk (revision aa7877c4bf68fa6ad6813323f659b82355acaab5)
195cfd4adSJuan Castillo#
29d57a147SRoberto Vargas# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
395cfd4adSJuan Castillo#
482cb2c1aSdp-arm# SPDX-License-Identifier: BSD-3-Clause
595cfd4adSJuan Castillo#
695cfd4adSJuan Castillo
7*aa7877c4SAntonio Nino DiazPLAT_INCLUDES		+=	-Iinclude/drivers/cfi/				\
8*aa7877c4SAntonio Nino Diaz				-Iinclude/plat/arm/board/common/
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
13*aa7877c4SAntonio Nino DiazBL1_SOURCES		+=	drivers/cfi/v2m/v2m_flash.c
1495cfd4adSJuan Castillo
15*aa7877c4SAntonio Nino DiazBL2_SOURCES		+=	drivers/cfi/v2m/v2m_flash.c
1695cfd4adSJuan Castillo
1795cfd4adSJuan Castilloifneq (${TRUSTED_BOARD_BOOT},0)
18f143cafeSSoby Mathew  ifneq (${ARM_CRYPTOCELL_INTEG}, 1)
1995cfd4adSJuan Castillo    # ROTPK hash location
2095cfd4adSJuan Castillo    ifeq (${ARM_ROTPK_LOCATION}, regs)
2195cfd4adSJuan Castillo        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_REGS_ID
2295cfd4adSJuan Castillo    else ifeq (${ARM_ROTPK_LOCATION}, devel_rsa)
239db9c65aSQixiang Xu        KEY_ALG := rsa
2495cfd4adSJuan Castillo        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_DEVEL_RSA_ID
259db9c65aSQixiang Xu    else ifeq (${ARM_ROTPK_LOCATION}, devel_ecdsa)
269db9c65aSQixiang Xu        KEY_ALG := ecdsa
279db9c65aSQixiang Xu        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_DEVEL_ECDSA_ID
2895cfd4adSJuan Castillo    else
2995cfd4adSJuan Castillo        $(error "Unsupported ARM_ROTPK_LOCATION value")
3095cfd4adSJuan Castillo    endif
3195cfd4adSJuan Castillo    $(eval $(call add_define,ARM_ROTPK_LOCATION_ID))
3295cfd4adSJuan Castillo
3348279d52SJuan Castillo    # Certificate NV-Counters. Use values corresponding to tied off values in
3448279d52SJuan Castillo    # ARM development platforms
3548279d52SJuan Castillo    TFW_NVCTR_VAL	?=	31
3648279d52SJuan Castillo    NTFW_NVCTR_VAL	?=	223
37f143cafeSSoby Mathew  else
38f143cafeSSoby Mathew    # Certificate NV-Counters when CryptoCell is integrated. For development
39f143cafeSSoby Mathew    # platforms we set the counter to first valid value.
40f143cafeSSoby Mathew    TFW_NVCTR_VAL	?=	0
41f143cafeSSoby Mathew    NTFW_NVCTR_VAL	?=	0
42f143cafeSSoby Mathew  endif
4395cfd4adSJuan Castillo    BL1_SOURCES		+=	plat/arm/board/common/board_arm_trusted_boot.c
4495cfd4adSJuan Castillo    BL2_SOURCES		+=	plat/arm/board/common/board_arm_trusted_boot.c
4595cfd4adSJuan Castilloendif
46