Debian Codegraph @

plat/arm/board/neoverse_rd/platform/rdv1mc/platform.mk

raw
1 # Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved.
2 #
3 # SPDX-License-Identifier: BSD-3-Clause
4 #
5
6 # Enable GICv4 extension with multichip driver
7 GIC_ENABLE_V4_EXTN := 1
8 GICV3_IMPL_GIC600_MULTICHIP := 1
9
10 include plat/arm/board/neoverse_rd/common/nrd-common.mk
11
12 RDV1MC_BASE = plat/arm/board/neoverse_rd/platform/rdv1mc
13
14 PLAT_INCLUDES += -I${NRD_COMMON_BASE}/include/nrd1/ \
15 -I${RDV1MC_BASE}/include/
16
17 NRD_CPU_SOURCES := lib/cpus/aarch64/neoverse_v1.S
18
19 PLAT_BL_COMMON_SOURCES += ${NRD_COMMON_BASE}/nrd_plat1.c
20
21 BL1_SOURCES += ${NRD_CPU_SOURCES} \
22 ${RDV1MC_BASE}/rdv1mc_err.c
23
24 BL2_SOURCES += ${RDV1MC_BASE}/rdv1mc_plat.c \
25 ${RDV1MC_BASE}/rdv1mc_security.c \
26 ${RDV1MC_BASE}/rdv1mc_err.c \
27 drivers/arm/tzc/tzc400.c \
28 plat/arm/common/arm_tzc400.c \
29 lib/utils/mem_region.c \
30 plat/arm/common/arm_nor_psci_mem_protect.c
31
32 BL31_SOURCES += ${NRD_CPU_SOURCES} \
33 ${RDV1MC_BASE}/rdv1mc_plat.c \
34 ${RDV1MC_BASE}/rdv1mc_topology.c \
35 drivers/cfi/v2m/v2m_flash.c \
36 drivers/arm/gic/v3/gic600_multichip.c \
37 lib/utils/mem_region.c \
38 plat/arm/common/arm_nor_psci_mem_protect.c
39
40 ifeq (${TRUSTED_BOARD_BOOT}, 1)
41 BL1_SOURCES += ${RDV1MC_BASE}/rdv1mc_trusted_boot.c
42 BL2_SOURCES += ${RDV1MC_BASE}/rdv1mc_trusted_boot.c
43 endif
44
45 # Enable dynamic addition of MMAP regions in BL31
46 BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC
47
48 # Add the FDT_SOURCES and options for Dynamic Config
49 FDT_SOURCES += ${RDV1MC_BASE}/fdts/${PLAT}_fw_config.dts \
50 ${RDV1MC_BASE}/fdts/${PLAT}_tb_fw_config.dts
51 FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb
52 TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb
53
54 # Add the FW_CONFIG to FIP and specify the same to certtool
55 $(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
56 # Add the TB_FW_CONFIG to FIP and specify the same to certtool
57 $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
58
59 $(eval $(call CREATE_SEQ,SEQ,4))
60 ifneq ($(NRD_CHIP_COUNT),$(filter $(NRD_CHIP_COUNT),$(SEQ)))
61 $(error "Chip count for RD-V1-MC should be either $(SEQ) \
62 currently it is set to ${NRD_CHIP_COUNT}.")
63 endif
64
65 FDT_SOURCES += ${RDV1MC_BASE}/fdts/${PLAT}_nt_fw_config.dts
66 NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
67
68 # Add the NT_FW_CONFIG to FIP and specify the same to certtool
69 $(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG}))
70
71 override CTX_INCLUDE_AARCH32_REGS := 0
72 override ENABLE_FEAT_AMU := 2
73 override SPMD_SPM_AT_SEL2 := 0
74
75 ifneq ($(NRD_PLATFORM_VARIANT),0)
76 $(error "NRD_PLATFORM_VARIANT for RD-V1-MC should always be 0, \
77 currently set to ${NRD_PLATFORM_VARIANT}.")
78 endif
79
80 ifneq (${RESET_TO_BL31},0)
81 $(error "Using BL31 as the reset vector is not supported on ${PLAT} platform. \
82 Please set RESET_TO_BL31 to 0.")
83 endif
84
85 # Enable the flag since RD-V1-MC has a system level cache
86 NEOVERSE_Nx_EXTERNAL_LLC := 1