Pranav Madhu | 2835ab4 | 2020-11-11 10:27:14 +0530 | [diff] [blame] | 1 | # Copyright (c) 2020-2021, ARM Limited and Contributors. All rights reserved. |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 2 | # |
| 3 | # SPDX-License-Identifier: BSD-3-Clause |
| 4 | # |
| 5 | |
Andre Przywara | b6c24ce | 2021-07-20 19:20:07 +0100 | [diff] [blame] | 6 | # RD-V1 platform uses GIC-700 which is based on GICv4.1 |
Vijayenthiran Subramaniam | 1360d7e | 2020-04-06 17:54:42 +0530 | [diff] [blame] | 7 | GIC_ENABLE_V4_EXTN := 1 |
| 8 | |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 9 | include plat/arm/css/sgi/sgi-common.mk |
| 10 | |
Aditya Angadi | ed339d8 | 2020-12-15 17:10:50 +0530 | [diff] [blame] | 11 | RDV1_BASE = plat/arm/board/rdv1 |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 12 | |
Aditya Angadi | ed339d8 | 2020-12-15 17:10:50 +0530 | [diff] [blame] | 13 | PLAT_INCLUDES += -I${RDV1_BASE}/include/ |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 14 | |
Jimmy Brisson | 958a0b1 | 2020-09-30 15:28:03 -0500 | [diff] [blame] | 15 | SGI_CPU_SOURCES := lib/cpus/aarch64/neoverse_v1.S |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 16 | |
Aditya Angadi | 502d0ac | 2020-11-18 08:27:15 +0530 | [diff] [blame] | 17 | PLAT_BL_COMMON_SOURCES += ${CSS_ENT_BASE}/sgi_plat.c |
| 18 | |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 19 | BL1_SOURCES += ${SGI_CPU_SOURCES} \ |
Aditya Angadi | ed339d8 | 2020-12-15 17:10:50 +0530 | [diff] [blame] | 20 | ${RDV1_BASE}/rdv1_err.c |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 21 | |
Aditya Angadi | ed339d8 | 2020-12-15 17:10:50 +0530 | [diff] [blame] | 22 | BL2_SOURCES += ${RDV1_BASE}/rdv1_plat.c \ |
| 23 | ${RDV1_BASE}/rdv1_security.c \ |
| 24 | ${RDV1_BASE}/rdv1_err.c \ |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 25 | lib/utils/mem_region.c \ |
Suyash Pathak | 30b2014 | 2020-02-12 10:08:55 +0530 | [diff] [blame] | 26 | drivers/arm/tzc/tzc400.c \ |
| 27 | plat/arm/common/arm_tzc400.c \ |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 28 | plat/arm/common/arm_nor_psci_mem_protect.c |
| 29 | |
| 30 | BL31_SOURCES += ${SGI_CPU_SOURCES} \ |
Aditya Angadi | ed339d8 | 2020-12-15 17:10:50 +0530 | [diff] [blame] | 31 | ${RDV1_BASE}/rdv1_plat.c \ |
| 32 | ${RDV1_BASE}/rdv1_topology.c \ |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 33 | drivers/cfi/v2m/v2m_flash.c \ |
| 34 | lib/utils/mem_region.c \ |
| 35 | plat/arm/common/arm_nor_psci_mem_protect.c |
| 36 | |
Vijayenthiran Subramaniam | dae19c3 | 2020-07-14 15:22:14 +0530 | [diff] [blame] | 37 | ifeq (${TRUSTED_BOARD_BOOT}, 1) |
Aditya Angadi | ed339d8 | 2020-12-15 17:10:50 +0530 | [diff] [blame] | 38 | BL1_SOURCES += ${RDV1_BASE}/rdv1_trusted_boot.c |
| 39 | BL2_SOURCES += ${RDV1_BASE}/rdv1_trusted_boot.c |
Vijayenthiran Subramaniam | dae19c3 | 2020-07-14 15:22:14 +0530 | [diff] [blame] | 40 | endif |
| 41 | |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 42 | # Add the FDT_SOURCES and options for Dynamic Config |
Aditya Angadi | ed339d8 | 2020-12-15 17:10:50 +0530 | [diff] [blame] | 43 | FDT_SOURCES += ${RDV1_BASE}/fdts/${PLAT}_fw_config.dts \ |
| 44 | ${RDV1_BASE}/fdts/${PLAT}_tb_fw_config.dts |
Manish V Badarkhe | 64616a5 | 2020-05-31 08:53:40 +0100 | [diff] [blame] | 45 | FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb |
| 46 | TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 47 | |
Manish V Badarkhe | 64616a5 | 2020-05-31 08:53:40 +0100 | [diff] [blame] | 48 | # Add the FW_CONFIG to FIP and specify the same to certtool |
Anders Dellien | 3f69474 | 2020-08-23 19:32:48 +0100 | [diff] [blame] | 49 | $(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG})) |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 50 | # Add the TB_FW_CONFIG to FIP and specify the same to certtool |
Anders Dellien | 3f69474 | 2020-08-23 19:32:48 +0100 | [diff] [blame] | 51 | $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG})) |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 52 | |
Aditya Angadi | ed339d8 | 2020-12-15 17:10:50 +0530 | [diff] [blame] | 53 | FDT_SOURCES += ${RDV1_BASE}/fdts/${PLAT}_nt_fw_config.dts |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 54 | NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb |
| 55 | |
| 56 | # Add the NT_FW_CONFIG to FIP and specify the same to certtool |
Anders Dellien | 3f69474 | 2020-08-23 19:32:48 +0100 | [diff] [blame] | 57 | $(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG})) |
Aditya Angadi | e650895 | 2019-07-21 22:13:45 +0530 | [diff] [blame] | 58 | |
| 59 | override CTX_INCLUDE_AARCH32_REGS := 0 |
Pranav Madhu | 2835ab4 | 2020-11-11 10:27:14 +0530 | [diff] [blame] | 60 | override ENABLE_AMU := 1 |
Aditya Angadi | 0640222 | 2021-03-20 12:06:15 +0530 | [diff] [blame] | 61 | |
| 62 | ifneq ($(CSS_SGI_PLATFORM_VARIANT),0) |
| 63 | $(error "CSS_SGI_PLATFORM_VARIANT for RD-V1 should always be 0, \ |
| 64 | currently set to ${CSS_SGI_PLATFORM_VARIANT}.") |
| 65 | endif |