blob: aec2b9bc5e71b5d1d7ebc8b223d1d4e1c2869250 [file] [log] [blame]
Sandrine Bailleux798140d2014-07-17 16:06:39 +01001#
Summer Qin13b95c22018-03-02 15:51:14 +08002# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
Sandrine Bailleux798140d2014-07-17 16:06:39 +01003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Sandrine Bailleux798140d2014-07-17 16:06:39 +01005#
6
Achin Gupta1fa7eb62015-11-03 14:18:34 +00007JUNO_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
8 drivers/arm/gic/v2/gicv2_main.c \
9 drivers/arm/gic/v2/gicv2_helpers.c \
10 plat/common/plat_gicv2.c \
11 plat/arm/common/arm_gicv2.c
12
Vikram Kanigirifbb13012016-02-15 11:54:14 +000013JUNO_INTERCONNECT_SOURCES := drivers/arm/cci/cci.c \
14 plat/arm/common/arm_cci.c
15
Soby Mathew9c708b52016-02-26 14:23:19 +000016JUNO_SECURITY_SOURCES := drivers/arm/tzc/tzc400.c \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +000017 plat/arm/board/juno/juno_security.c \
dp-arm8f59e152017-02-27 12:21:43 +000018 plat/arm/board/juno/juno_trng.c \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +000019 plat/arm/common/arm_tzc400.c
20
dp-armb3263b32017-02-28 14:43:15 +000021ifneq (${ENABLE_STACK_PROTECTOR}, 0)
22JUNO_SECURITY_SOURCES += plat/arm/board/juno/juno_stack_protector.c
23endif
Vikram Kanigirifbb13012016-02-15 11:54:14 +000024
Sathees Balya22576072018-09-03 17:41:13 +010025# Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the
26# SCP during power management operations and for SCP RAM Firmware transfer.
27CSS_USE_SCMI_SDS_DRIVER := 1
28
29PLAT_INCLUDES := -Iplat/arm/board/juno/include \
Chandni Cherukurie4bf6a02018-11-14 13:43:59 +053030 -Iplat/arm/css/drivers/scmi \
Sathees Balya22576072018-09-03 17:41:13 +010031 -Iplat/arm/css/drivers/sds
Juan Castillo921b8772014-09-05 17:29:38 +010032
Antonio Nino Diazcbc68262018-10-10 11:02:34 +010033PLAT_BL_COMMON_SOURCES := plat/arm/board/juno/${ARCH}/juno_helpers.S \
34 plat/arm/board/juno/juno_common.c
Juan Castillo921b8772014-09-05 17:29:38 +010035
Yatharth Kocharede39cb2016-11-14 12:01:04 +000036# Flag to enable support for AArch32 state on JUNO
37JUNO_AARCH32_EL3_RUNTIME := 0
38$(eval $(call assert_boolean,JUNO_AARCH32_EL3_RUNTIME))
39$(eval $(call add_define,JUNO_AARCH32_EL3_RUNTIME))
40
Summer Qin13b95c22018-03-02 15:51:14 +080041# Flag to enable support for TZMP1 on JUNO
42JUNO_TZMP1 := 0
43$(eval $(call assert_boolean,JUNO_TZMP1))
44ifeq (${JUNO_TZMP1}, 1)
45$(eval $(call add_define,JUNO_TZMP1))
46endif
47
Soby Mathewbf169232017-11-14 14:10:10 +000048ifeq (${JUNO_AARCH32_EL3_RUNTIME}, 1)
49# Include BL32 in FIP
50NEED_BL32 := yes
51# BL31 is not required
52override BL31_SOURCES =
53
54# The BL32 needs to be built separately invoking the AARCH32 compiler and
55# be specifed via `BL32` build option.
56 ifneq (${ARCH}, aarch32)
57 override BL32_SOURCES =
58 endif
59endif
60
Yatharth Kocharede39cb2016-11-14 12:01:04 +000061ifeq (${ARCH},aarch64)
Dan Handley7bef8002015-03-19 19:22:44 +000062BL1_SOURCES += lib/cpus/aarch64/cortex_a53.S \
Brendan Jackmana443d222015-10-30 16:25:12 +000063 lib/cpus/aarch64/cortex_a57.S \
Juan Castillob6132f12015-10-06 14:01:35 +010064 lib/cpus/aarch64/cortex_a72.S \
Sathees Balya22576072018-09-03 17:41:13 +010065 plat/arm/board/juno/juno_err.c \
Yatharth Kochar736a3bf2015-10-11 14:14:55 +010066 plat/arm/board/juno/juno_bl1_setup.c \
dp-armb3263b32017-02-28 14:43:15 +000067 ${JUNO_INTERCONNECT_SOURCES} \
68 ${JUNO_SECURITY_SOURCES}
Juan Castillo921b8772014-09-05 17:29:38 +010069
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010070BL2_SOURCES += lib/utils/mem_region.c \
Sathees Balya22576072018-09-03 17:41:13 +010071 plat/arm/board/juno/juno_err.c \
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010072 plat/arm/board/juno/juno_bl2_setup.c \
73 plat/arm/common/arm_nor_psci_mem_protect.c \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +000074 ${JUNO_SECURITY_SOURCES}
Juan Castillo921b8772014-09-05 17:29:38 +010075
Vikram Kanigiri70752bb2016-02-10 14:50:53 +000076BL2U_SOURCES += ${JUNO_SECURITY_SOURCES}
Yatharth Kochar3a11eda2015-10-14 15:28:11 +010077
Antonio Nino Diazd7da2f82018-10-10 11:14:44 +010078BL31_SOURCES += drivers/cfi/v2m/v2m_flash.c \
79 lib/cpus/aarch64/cortex_a53.S \
Soby Mathew61e8d0b2015-10-12 17:32:29 +010080 lib/cpus/aarch64/cortex_a57.S \
Brendan Jackmana443d222015-10-30 16:25:12 +000081 lib/cpus/aarch64/cortex_a72.S \
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010082 lib/utils/mem_region.c \
Chandni Cherukurie4bf6a02018-11-14 13:43:59 +053083 plat/arm/board/juno/juno_pm.c \
Soby Mathew47e43f22016-02-01 14:04:34 +000084 plat/arm/board/juno/juno_topology.c \
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010085 plat/arm/common/arm_nor_psci_mem_protect.c \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +000086 ${JUNO_GIC_SOURCES} \
Vikram Kanigirifbb13012016-02-15 11:54:14 +000087 ${JUNO_INTERCONNECT_SOURCES} \
Vikram Kanigiri70752bb2016-02-10 14:50:53 +000088 ${JUNO_SECURITY_SOURCES}
Sathees Balya22576072018-09-03 17:41:13 +010089
90ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
91BL1_SOURCES += plat/arm/css/drivers/sds/sds.c
Yatharth Kocharede39cb2016-11-14 12:01:04 +000092endif
Juan Castillo921b8772014-09-05 17:29:38 +010093
Sathees Balya22576072018-09-03 17:41:13 +010094endif
95
Deepak Pandeyb0971f92018-05-25 12:43:30 +053096ifneq (${RESET_TO_BL31},0)
Sandrine Bailleux1e32d322019-01-07 15:35:37 +010097 $(error "Using BL31 as the reset vector is not supported on ${PLAT} platform. \
Deepak Pandeyb0971f92018-05-25 12:43:30 +053098 Please set RESET_TO_BL31 to 0.")
99endif
100
Sathees Balya6f07a602018-11-02 14:56:06 +0000101ifeq ($(USE_ROMLIB),1)
102all : bl1_romlib.bin
103endif
104
105bl1_romlib.bin : $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/romlib/romlib.bin
106 @echo "Building combined BL1 and ROMLIB binary for Juno $@"
107 ./lib/romlib/gen_combined_bl1_romlib.sh -o bl1_romlib.bin $(BUILD_PLAT)
108
Eleanor Bonnici8392aab2017-08-04 15:03:51 +0100109# Errata workarounds for Cortex-A53:
110ERRATA_A53_826319 := 1
Douglas Raillardd56fb042017-06-19 15:38:02 +0100111ERRATA_A53_835769 := 1
Eleanor Bonnici8392aab2017-08-04 15:03:51 +0100112ERRATA_A53_836870 := 1
Douglas Raillardd56fb042017-06-19 15:38:02 +0100113ERRATA_A53_843419 := 1
Andre Przywara00eefd92016-10-06 16:54:53 +0100114ERRATA_A53_855873 := 1
Eleanor Bonnici8392aab2017-08-04 15:03:51 +0100115
116# Errata workarounds for Cortex-A57:
Vikram Kanigirieade34c2016-01-20 15:57:35 +0000117ERRATA_A57_806969 := 0
Antonio Nino Diaz3f13c352017-02-24 11:39:22 +0000118ERRATA_A57_813419 := 1
Vikram Kanigirieade34c2016-01-20 15:57:35 +0000119ERRATA_A57_813420 := 1
Douglas Raillard71d4fe22017-02-28 17:56:15 +0000120ERRATA_A57_826974 := 1
121ERRATA_A57_826977 := 1
122ERRATA_A57_828024 := 1
123ERRATA_A57_829520 := 1
124ERRATA_A57_833471 := 1
Eleanor Bonnici8392aab2017-08-04 15:03:51 +0100125ERRATA_A57_859972 := 0
Douglas Raillard71d4fe22017-02-28 17:56:15 +0000126
Eleanor Bonnici8392aab2017-08-04 15:03:51 +0100127# Errata workarounds for Cortex-A72:
128ERRATA_A72_859971 := 0
Soby Mathew937488b2014-09-22 14:13:34 +0100129
130# Enable option to skip L1 data cache flush during the Cortex-A57 cluster
131# power down sequence
132SKIP_A57_L1_FLUSH_PWR_DWN := 1
Dan Handley7bef8002015-03-19 19:22:44 +0000133
David Cunadoc5b0c0f2017-10-31 23:19:21 +0000134# Do not enable SVE
135ENABLE_SVE_FOR_NS := 0
136
Antonio Nino Diazcbc68262018-10-10 11:02:34 +0100137include plat/arm/board/common/board_common.mk
Dan Handley7bef8002015-03-19 19:22:44 +0000138include plat/arm/common/arm_common.mk
139include plat/arm/soc/common/soc_css.mk
140include plat/arm/css/common/css_common.mk
Juan Castilloa08a5e72015-05-19 11:54:12 +0100141