blob: 0761b77ef2886a9a0ec8a6c1d76e89a8be9baaf1 [file] [log] [blame]
Nariman Poushinb44cfc62018-02-26 06:52:04 +00001#
Vijayenthiran Subramaniama9fbf132019-12-27 19:27:57 +05302# Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
Nariman Poushinb44cfc62018-02-26 06:52:04 +00003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7include plat/arm/css/sgi/sgi-common.mk
Roberto Vargas9d57a142018-08-06 13:35:31 +01008
Chandni Cherukuri91e6f262018-08-10 11:17:58 +05309SGI575_BASE = plat/arm/board/sgi575
10
11PLAT_INCLUDES += -I${SGI575_BASE}/include/
12
13SGI_CPU_SOURCES := lib/cpus/aarch64/cortex_a75.S
14
Aditya Angadidb2aedd2020-11-18 08:27:15 +053015PLAT_BL_COMMON_SOURCES += ${CSS_ENT_BASE}/sgi_plat.c
16
Ambroise Vincent37b70032019-07-04 14:58:45 +010017BL1_SOURCES += ${SGI_CPU_SOURCES} \
18 ${SGI575_BASE}/sgi575_err.c
Chandni Cherukuri91e6f262018-08-10 11:17:58 +053019
Chandni Cherukuri699223a2018-11-28 11:31:51 +053020BL2_SOURCES += ${SGI575_BASE}/sgi575_plat.c \
21 ${SGI575_BASE}/sgi575_security.c \
Ambroise Vincent37b70032019-07-04 14:58:45 +010022 ${SGI575_BASE}/sgi575_err.c \
Vijayenthiran Subramaniam9427c742018-10-25 22:20:24 +053023 drivers/arm/tzc/tzc_dmc620.c \
24 lib/utils/mem_region.c \
Roberto Vargas9d57a142018-08-06 13:35:31 +010025 plat/arm/common/arm_nor_psci_mem_protect.c
26
Chandni Cherukuri91e6f262018-08-10 11:17:58 +053027BL31_SOURCES += ${SGI_CPU_SOURCES} \
Chandni Cherukuri699223a2018-11-28 11:31:51 +053028 ${SGI575_BASE}/sgi575_plat.c \
Vijayenthiran Subramaniama9fbf132019-12-27 19:27:57 +053029 ${SGI575_BASE}/sgi575_topology.c \
Chandni Cherukuri91e6f262018-08-10 11:17:58 +053030 drivers/cfi/v2m/v2m_flash.c \
Antonio Nino Diazaa7877c2018-10-10 11:14:44 +010031 lib/utils/mem_region.c \
Roberto Vargas9d57a142018-08-06 13:35:31 +010032 plat/arm/common/arm_nor_psci_mem_protect.c
Chandni Cherukuri63197d02018-09-04 14:46:49 +053033
Max Shvetsova6ffdde2019-12-06 11:50:12 +000034ifeq (${TRUSTED_BOARD_BOOT}, 1)
35BL1_SOURCES += ${SGI575_BASE}/sgi575_trusted_boot.c
36BL2_SOURCES += ${SGI575_BASE}/sgi575_trusted_boot.c
37endif
38
Chandni Cherukuri63197d02018-09-04 14:46:49 +053039# Add the FDT_SOURCES and options for Dynamic Config
Manish V Badarkhe3cb84a52020-05-31 08:53:40 +010040FDT_SOURCES += ${SGI575_BASE}/fdts/${PLAT}_fw_config.dts \
41 ${SGI575_BASE}/fdts/${PLAT}_tb_fw_config.dts
Chandni Cherukuri63197d02018-09-04 14:46:49 +053042
Manish V Badarkhe3cb84a52020-05-31 08:53:40 +010043FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
44TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
45
46# Add the FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3ab336a2020-08-23 19:32:48 +010047$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
Chandni Cherukuri63197d02018-09-04 14:46:49 +053048# Add the TB_FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3ab336a2020-08-23 19:32:48 +010049$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
Chandni Cherukuri63197d02018-09-04 14:46:49 +053050
Chandni Cherukuri77ab9692018-11-28 11:26:19 +053051FDT_SOURCES += ${SGI575_BASE}/fdts/${PLAT}_nt_fw_config.dts
52NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
Chandni Cherukuri63197d02018-09-04 14:46:49 +053053
Chandni Cherukuri77ab9692018-11-28 11:26:19 +053054# Add the NT_FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3ab336a2020-08-23 19:32:48 +010055$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
Vijayenthiran Subramaniam4d37aa72019-12-26 17:45:58 +053056
57ifneq ($(CSS_SGI_CHIP_COUNT),1)
58 $(error "Chip count for SGI575 should be 1, currently set to \
59 ${CSS_SGI_CHIP_COUNT}.")
60endif
Aditya Angadicfe15062021-03-20 12:06:15 +053061
62ifneq ($(CSS_SGI_PLATFORM_VARIANT),0)
63 $(error "CSS_SGI_PLATFORM_VARIANT for SGI575 should always be 0,\
64 currently set to ${CSS_SGI_PLATFORM_VARIANT}.")
65endif