Pranav Madhu | 40ebb32 | 2021-01-27 16:17:32 +0530 | [diff] [blame] | 1 | # Copyright (c) 2020-2021, ARM Limited and Contributors. All rights reserved. |
Aditya Angadi | d61740b | 2020-11-19 18:05:33 +0530 | [diff] [blame] | 2 | # |
| 3 | # SPDX-License-Identifier: BSD-3-Clause |
| 4 | # |
| 5 | |
| 6 | # RD-N2 platform uses GIC-Clayton which is based on GICv4.1 |
| 7 | GIC_ENABLE_V4_EXTN := 1 |
| 8 | |
| 9 | include plat/arm/css/sgi/sgi-common.mk |
| 10 | |
| 11 | RDN2_BASE = plat/arm/board/rdn2 |
| 12 | |
| 13 | PLAT_INCLUDES += -I${RDN2_BASE}/include/ |
| 14 | |
| 15 | SGI_CPU_SOURCES := lib/cpus/aarch64/neoverse_n2.S |
| 16 | |
| 17 | PLAT_BL_COMMON_SOURCES += ${CSS_ENT_BASE}/sgi_plat_v2.c |
| 18 | |
| 19 | BL1_SOURCES += ${SGI_CPU_SOURCES} \ |
| 20 | ${RDN2_BASE}/rdn2_err.c |
| 21 | |
| 22 | BL2_SOURCES += ${RDN2_BASE}/rdn2_plat.c \ |
| 23 | ${RDN2_BASE}/rdn2_security.c \ |
| 24 | ${RDN2_BASE}/rdn2_err.c \ |
| 25 | lib/utils/mem_region.c \ |
| 26 | drivers/arm/tzc/tzc400.c \ |
| 27 | plat/arm/common/arm_tzc400.c \ |
| 28 | plat/arm/common/arm_nor_psci_mem_protect.c |
| 29 | |
| 30 | BL31_SOURCES += ${SGI_CPU_SOURCES} \ |
| 31 | ${RDN2_BASE}/rdn2_plat.c \ |
| 32 | ${RDN2_BASE}/rdn2_topology.c \ |
| 33 | drivers/cfi/v2m/v2m_flash.c \ |
| 34 | lib/utils/mem_region.c \ |
| 35 | plat/arm/common/arm_nor_psci_mem_protect.c |
| 36 | |
| 37 | ifeq (${TRUSTED_BOARD_BOOT}, 1) |
| 38 | BL1_SOURCES += ${RDN2_BASE}/rdn2_trusted_boot.c |
| 39 | BL2_SOURCES += ${RDN2_BASE}/rdn2_trusted_boot.c |
| 40 | endif |
| 41 | |
| 42 | # Add the FDT_SOURCES and options for Dynamic Config |
| 43 | FDT_SOURCES += ${RDN2_BASE}/fdts/${PLAT}_fw_config.dts \ |
| 44 | ${RDN2_BASE}/fdts/${PLAT}_tb_fw_config.dts |
| 45 | FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb |
| 46 | TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb |
| 47 | |
| 48 | # Add the FW_CONFIG to FIP and specify the same to certtool |
| 49 | $(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG})) |
| 50 | # Add the TB_FW_CONFIG to FIP and specify the same to certtool |
| 51 | $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG})) |
| 52 | |
| 53 | FDT_SOURCES += ${RDN2_BASE}/fdts/${PLAT}_nt_fw_config.dts |
| 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 |
| 57 | $(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config)) |
| 58 | |
| 59 | override CTX_INCLUDE_AARCH32_REGS := 0 |
Pranav Madhu | 40ebb32 | 2021-01-27 16:17:32 +0530 | [diff] [blame] | 60 | override ENABLE_AMU := 1 |
Aditya Angadi | 0640222 | 2021-03-20 12:06:15 +0530 | [diff] [blame] | 61 | |
Aditya Angadi | f894b9a | 2021-03-20 12:15:04 +0530 | [diff] [blame] | 62 | RD_N2_VARIANTS := 0 1 |
| 63 | ifneq ($(CSS_SGI_PLATFORM_VARIANT),\ |
| 64 | $(filter $(CSS_SGI_PLATFORM_VARIANT),$(RD_N2_VARIANTS))) |
| 65 | $(error "CSS_SGI_PLATFORM_VARIANT for RD-N2 should be 0 or 1, currently set \ |
| 66 | to ${CSS_SGI_PLATFORM_VARIANT}.") |
Aditya Angadi | 0640222 | 2021-03-20 12:06:15 +0530 | [diff] [blame] | 67 | endif |