platform.mk 4.15 KB
Newer Older
1
#
2
# Copyright (c) 2013-2019, 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
9
10
11
12
JUNO_GIC_SOURCES	:=	drivers/arm/gic/common/gic_common.c	\
				drivers/arm/gic/v2/gicv2_main.c		\
				drivers/arm/gic/v2/gicv2_helpers.c	\
				plat/common/plat_gicv2.c		\
				plat/arm/common/arm_gicv2.c

13
14
15
JUNO_INTERCONNECT_SOURCES	:=	drivers/arm/cci/cci.c		\
					plat/arm/common/arm_cci.c

16
JUNO_SECURITY_SOURCES	:=	drivers/arm/tzc/tzc400.c		\
17
				plat/arm/board/juno/juno_security.c	\
18
				plat/arm/board/juno/juno_trng.c		\
19
20
				plat/arm/common/arm_tzc400.c

21
22
23
ifneq (${ENABLE_STACK_PROTECTOR}, 0)
JUNO_SECURITY_SOURCES	+=	plat/arm/board/juno/juno_stack_protector.c
endif
24

25
26
27
28
# Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the
# SCP during power management operations and for SCP RAM Firmware transfer.
CSS_USE_SCMI_SDS_DRIVER		:=	1

29
PLAT_INCLUDES		:=	-Iplat/arm/board/juno/include
30

31
32
PLAT_BL_COMMON_SOURCES	:=	plat/arm/board/juno/${ARCH}/juno_helpers.S \
				plat/arm/board/juno/juno_common.c
33

34
35
36
37
38
# Flag to enable support for AArch32 state on JUNO
JUNO_AARCH32_EL3_RUNTIME	:=	0
$(eval $(call assert_boolean,JUNO_AARCH32_EL3_RUNTIME))
$(eval $(call add_define,JUNO_AARCH32_EL3_RUNTIME))

39
40
41
42
43
44
45
# Flag to enable support for TZMP1 on JUNO
JUNO_TZMP1		:=	0
$(eval $(call assert_boolean,JUNO_TZMP1))
ifeq (${JUNO_TZMP1}, 1)
$(eval $(call add_define,JUNO_TZMP1))
endif

46
47
48
49
50
51
52
53
54
55
56
57
58
ifeq (${JUNO_AARCH32_EL3_RUNTIME}, 1)
# Include BL32 in FIP
NEED_BL32		:= yes
# BL31 is not required
override BL31_SOURCES =

# The BL32 needs to be built separately invoking the AARCH32 compiler and
# be specifed via `BL32` build option.
  ifneq (${ARCH}, aarch32)
    override BL32_SOURCES =
  endif
endif

59
ifeq (${ARCH},aarch64)
60
BL1_SOURCES		+=	lib/cpus/aarch64/cortex_a53.S		\
Brendan Jackman's avatar
Brendan Jackman committed
61
				lib/cpus/aarch64/cortex_a57.S		\
62
				lib/cpus/aarch64/cortex_a72.S		\
63
				plat/arm/board/juno/juno_err.c		\
64
				plat/arm/board/juno/juno_bl1_setup.c	\
65
66
				${JUNO_INTERCONNECT_SOURCES}		\
				${JUNO_SECURITY_SOURCES}
67

68
BL2_SOURCES		+=	lib/utils/mem_region.c			\
69
				plat/arm/board/juno/juno_err.c		\
70
71
				plat/arm/board/juno/juno_bl2_setup.c	\
				plat/arm/common/arm_nor_psci_mem_protect.c \
72
				${JUNO_SECURITY_SOURCES}
73

74
BL2U_SOURCES		+=	${JUNO_SECURITY_SOURCES}
75

76
77
BL31_SOURCES		+=	drivers/cfi/v2m/v2m_flash.c		\
				lib/cpus/aarch64/cortex_a53.S		\
78
				lib/cpus/aarch64/cortex_a57.S		\
Brendan Jackman's avatar
Brendan Jackman committed
79
				lib/cpus/aarch64/cortex_a72.S		\
80
				lib/utils/mem_region.c			\
81
				plat/arm/board/juno/juno_pm.c		\
82
				plat/arm/board/juno/juno_topology.c	\
83
				plat/arm/common/arm_nor_psci_mem_protect.c \
84
				${JUNO_GIC_SOURCES}			\
85
				${JUNO_INTERCONNECT_SOURCES}		\
86
				${JUNO_SECURITY_SOURCES}
87
88

ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
89
BL1_SOURCES		+=	drivers/arm/css/sds/sds.c
90
91
endif

92
endif
93

94
ifneq (${RESET_TO_BL31},0)
95
  $(error "Using BL31 as the reset vector is not supported on ${PLAT} platform. \
96
97
98
  Please set RESET_TO_BL31 to 0.")
endif

Sathees Balya's avatar
Sathees Balya committed
99
100
101
102
103
104
105
106
ifeq ($(USE_ROMLIB),1)
all : bl1_romlib.bin
endif

bl1_romlib.bin : $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/romlib/romlib.bin
	@echo "Building combined BL1 and ROMLIB binary for Juno $@"
	./lib/romlib/gen_combined_bl1_romlib.sh -o bl1_romlib.bin $(BUILD_PLAT)

107
108
# Errata workarounds for Cortex-A53:
ERRATA_A53_826319		:=	1
109
ERRATA_A53_835769		:=	1
110
ERRATA_A53_836870		:=	1
111
ERRATA_A53_843419		:=	1
112
ERRATA_A53_855873		:=	1
113
114

# Errata workarounds for Cortex-A57:
115
ERRATA_A57_806969		:=	0
116
ERRATA_A57_813419		:=	1
117
ERRATA_A57_813420		:=	1
118
119
120
121
122
ERRATA_A57_826974		:=	1
ERRATA_A57_826977		:=	1
ERRATA_A57_828024		:=	1
ERRATA_A57_829520		:=	1
ERRATA_A57_833471		:=	1
123
ERRATA_A57_859972		:=	0
124

125
126
# Errata workarounds for Cortex-A72:
ERRATA_A72_859971		:=	0
127
128
129
130

# Enable option to skip L1 data cache flush during the Cortex-A57 cluster
# power down sequence
SKIP_A57_L1_FLUSH_PWR_DWN	:=	 1
131

132
133
134
# Do not enable SVE
ENABLE_SVE_FOR_NS		:=	0

135
136
137
138
139
140
141
142
143
144
145
# Enable the dynamic translation tables library.
ifeq (${ARCH},aarch32)
    ifeq (${RESET_TO_SP_MIN},1)
        BL32_CFLAGS	+=	-DPLAT_XLAT_TABLES_DYNAMIC=1
    endif
else
    ifeq (${RESET_TO_BL31},1)
        BL31_CFLAGS	+=	-DPLAT_XLAT_TABLES_DYNAMIC=1
    endif
endif

146
include plat/arm/board/common/board_common.mk
147
148
149
include plat/arm/common/arm_common.mk
include plat/arm/soc/common/soc_css.mk
include plat/arm/css/common/css_common.mk
150