board_common.mk 1.95 KB
Newer Older
1
#
2
# Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
3
#
dp-arm's avatar
dp-arm committed
4
# SPDX-License-Identifier: BSD-3-Clause
5
6
#

7
8
PLAT_INCLUDES		+=	-Iinclude/plat/arm/board/common/			\
				-Iinclude/plat/arm/board/common/drivers
9

10
11
PLAT_BL_COMMON_SOURCES	+=	drivers/arm/pl011/${ARCH}/pl011_console.S		\
				plat/arm/board/common/${ARCH}/board_arm_helpers.S
12

13
BL1_SOURCES		+=	plat/arm/board/common/drivers/norflash/norflash.c
14

15
16
17
BL2_SOURCES		+=	lib/utils/mem_region.c					\
				plat/arm/common/arm_nor_psci_mem_protect.c		\
				plat/arm/board/common/drivers/norflash/norflash.c
18

19
20
21
BL31_SOURCES		+=	lib/utils/mem_region.c					\
				plat/arm/board/common/drivers/norflash/norflash.c	\
				plat/arm/common/arm_nor_psci_mem_protect.c
22
23

ifneq (${TRUSTED_BOARD_BOOT},0)
24
  ifneq (${ARM_CRYPTOCELL_INTEG}, 1)
25
26
27
28
    # ROTPK hash location
    ifeq (${ARM_ROTPK_LOCATION}, regs)
        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_REGS_ID
    else ifeq (${ARM_ROTPK_LOCATION}, devel_rsa)
29
        KEY_ALG := rsa
30
        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_DEVEL_RSA_ID
31
32
33
    else ifeq (${ARM_ROTPK_LOCATION}, devel_ecdsa)
        KEY_ALG := ecdsa
        ARM_ROTPK_LOCATION_ID = ARM_ROTPK_DEVEL_ECDSA_ID
34
35
36
37
38
    else
        $(error "Unsupported ARM_ROTPK_LOCATION value")
    endif
    $(eval $(call add_define,ARM_ROTPK_LOCATION_ID))

39
40
41
42
    # Certificate NV-Counters. Use values corresponding to tied off values in
    # ARM development platforms
    TFW_NVCTR_VAL	?=	31
    NTFW_NVCTR_VAL	?=	223
43
44
45
46
47
48
  else
    # Certificate NV-Counters when CryptoCell is integrated. For development
    # platforms we set the counter to first valid value.
    TFW_NVCTR_VAL	?=	0
    NTFW_NVCTR_VAL	?=	0
  endif
49
50
51
    BL1_SOURCES		+=	plat/arm/board/common/board_arm_trusted_boot.c
    BL2_SOURCES		+=	plat/arm/board/common/board_arm_trusted_boot.c
endif
52
53

# This flag controls whether memory usage needs to be optimised
54
ARM_BOARD_OPTIMISE_MEM	?=	0
55
56

# Process flags
57
58
$(eval $(call assert_boolean,ARM_BOARD_OPTIMISE_MEM))
$(eval $(call add_define,ARM_BOARD_OPTIMISE_MEM))