blob: d34e55563568f3dd5edc7d37e2c0d996225209e0 [file] [log] [blame]
Nariman Poushin0ece80f2018-02-26 06:52:04 +00001#
Rohit Mathewa0dd3072024-02-03 17:22:54 +00002# Copyright (c) 2018-2024, Arm Limited and Contributors. All rights reserved.
Nariman Poushin0ece80f2018-02-26 06:52:04 +00003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Manish V Badarkhe3f5be1c2022-10-19 09:31:07 +01007$(warning Platform ${PLAT} is deprecated. Some of the features might not work as expected)
8
Rohit Mathew20d4a212024-02-03 21:20:17 +00009include plat/arm/board/neoverse_rd/common/nrd-common.mk
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010010
Rohit Mathew20d4a212024-02-03 21:20:17 +000011SGI575_BASE = plat/arm/board/neoverse_rd/platform/sgi575
Chandni Cherukuria3f66132018-08-10 11:17:58 +053012
13PLAT_INCLUDES += -I${SGI575_BASE}/include/
14
Rohit Mathew6521c1d2024-02-03 22:23:25 +000015NRD_CPU_SOURCES := lib/cpus/aarch64/cortex_a75.S
Chandni Cherukuria3f66132018-08-10 11:17:58 +053016
Rohit Mathew20d4a212024-02-03 21:20:17 +000017PLAT_BL_COMMON_SOURCES += ${NRD_COMMON_BASE}/nrd_plat.c
Aditya Angadi502d0ac2020-11-18 08:27:15 +053018
Rohit Mathew6521c1d2024-02-03 22:23:25 +000019BL1_SOURCES += ${NRD_CPU_SOURCES} \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010020 ${SGI575_BASE}/sgi575_err.c
Chandni Cherukuria3f66132018-08-10 11:17:58 +053021
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +053022BL2_SOURCES += ${SGI575_BASE}/sgi575_plat.c \
23 ${SGI575_BASE}/sgi575_security.c \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010024 ${SGI575_BASE}/sgi575_err.c \
Vijayenthiran Subramaniam22141b62018-10-25 22:20:24 +053025 drivers/arm/tzc/tzc_dmc620.c \
26 lib/utils/mem_region.c \
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010027 plat/arm/common/arm_nor_psci_mem_protect.c
28
Rohit Mathew6521c1d2024-02-03 22:23:25 +000029BL31_SOURCES += ${NRD_CPU_SOURCES} \
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +053030 ${SGI575_BASE}/sgi575_plat.c \
Vijayenthiran Subramaniamf5cb00f2019-12-27 19:27:57 +053031 ${SGI575_BASE}/sgi575_topology.c \
Chandni Cherukuria3f66132018-08-10 11:17:58 +053032 drivers/cfi/v2m/v2m_flash.c \
Antonio Nino Diazd7da2f82018-10-10 11:14:44 +010033 lib/utils/mem_region.c \
Roberto Vargasb96ee4b2018-08-06 13:35:31 +010034 plat/arm/common/arm_nor_psci_mem_protect.c
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053035
Max Shvetsov06dba292019-12-06 11:50:12 +000036ifeq (${TRUSTED_BOARD_BOOT}, 1)
37BL1_SOURCES += ${SGI575_BASE}/sgi575_trusted_boot.c
38BL2_SOURCES += ${SGI575_BASE}/sgi575_trusted_boot.c
39endif
40
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053041# Add the FDT_SOURCES and options for Dynamic Config
Manish V Badarkhe64616a52020-05-31 08:53:40 +010042FDT_SOURCES += ${SGI575_BASE}/fdts/${PLAT}_fw_config.dts \
43 ${SGI575_BASE}/fdts/${PLAT}_tb_fw_config.dts
44
45FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
46TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053047
Manish V Badarkhe64616a52020-05-31 08:53:40 +010048# Add the FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010049$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053050# Add the TB_FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010051$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053052
Chandni Cherukuri29ea98d2018-11-28 11:26:19 +053053FDT_SOURCES += ${SGI575_BASE}/fdts/${PLAT}_nt_fw_config.dts
54NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
Chandni Cherukuri22a8fbc2018-09-04 14:46:49 +053055
Chandni Cherukuri29ea98d2018-11-28 11:26:19 +053056# Add the NT_FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010057$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
Vijayenthiran Subramaniambc489912019-12-26 17:45:58 +053058
Rohit Mathew644d9e22024-02-03 19:06:16 +000059ifneq ($(NRD_CHIP_COUNT),1)
Vijayenthiran Subramaniambc489912019-12-26 17:45:58 +053060 $(error "Chip count for SGI575 should be 1, currently set to \
Rohit Mathew644d9e22024-02-03 19:06:16 +000061 ${NRD_CHIP_COUNT}.")
Vijayenthiran Subramaniambc489912019-12-26 17:45:58 +053062endif
Aditya Angadi06402222021-03-20 12:06:15 +053063
Rohit Mathew644d9e22024-02-03 19:06:16 +000064ifneq ($(NRD_PLATFORM_VARIANT),0)
65 $(error "NRD_PLATFORM_VARIANT for SGI575 should always be 0,\
66 currently set to ${NRD_PLATFORM_VARIANT}.")
Aditya Angadi06402222021-03-20 12:06:15 +053067endif