1*91f16700Schasinglulu# 2*91f16700Schasinglulu# Copyright (c) 2020-2023, Arm Limited. All rights reserved. 3*91f16700Schasinglulu# 4*91f16700Schasinglulu# SPDX-License-Identifier: BSD-3-Clause 5*91f16700Schasinglulu# 6*91f16700Schasinglulu 7*91f16700Schasinglulu# Making sure the Morello platform type is specified 8*91f16700Schasingluluifeq ($(filter ${TARGET_PLATFORM}, fvp soc),) 9*91f16700Schasinglulu $(error TARGET_PLATFORM must be fvp or soc) 10*91f16700Schasingluluendif 11*91f16700Schasinglulu 12*91f16700SchasingluluMORELLO_BASE := plat/arm/board/morello 13*91f16700Schasinglulu 14*91f16700SchasingluluINTERCONNECT_SOURCES := ${MORELLO_BASE}/morello_interconnect.c 15*91f16700Schasinglulu 16*91f16700SchasingluluPLAT_INCLUDES := -I${MORELLO_BASE}/include 17*91f16700Schasinglulu 18*91f16700SchasingluluMORELLO_CPU_SOURCES := lib/cpus/aarch64/rainier.S 19*91f16700Schasinglulu 20*91f16700Schasinglulu# GIC-600 configuration 21*91f16700SchasingluluGICV3_SUPPORT_GIC600 := 1 22*91f16700Schasinglulu 23*91f16700Schasinglulu# Include GICv3 driver files 24*91f16700Schasingluluinclude drivers/arm/gic/v3/gicv3.mk 25*91f16700Schasinglulu 26*91f16700SchasingluluMORELLO_GIC_SOURCES := ${GICV3_SOURCES} \ 27*91f16700Schasinglulu plat/common/plat_gicv3.c \ 28*91f16700Schasinglulu plat/arm/common/arm_gicv3.c \ 29*91f16700Schasinglulu 30*91f16700SchasingluluPLAT_BL_COMMON_SOURCES := ${MORELLO_BASE}/morello_plat.c \ 31*91f16700Schasinglulu ${MORELLO_BASE}/aarch64/morello_helper.S 32*91f16700Schasinglulu 33*91f16700SchasingluluBL1_SOURCES := ${MORELLO_CPU_SOURCES} \ 34*91f16700Schasinglulu ${INTERCONNECT_SOURCES} \ 35*91f16700Schasinglulu ${MORELLO_BASE}/morello_err.c \ 36*91f16700Schasinglulu ${MORELLO_BASE}/morello_trusted_boot.c \ 37*91f16700Schasinglulu ${MORELLO_BASE}/morello_bl1_setup.c \ 38*91f16700Schasinglulu drivers/arm/sbsa/sbsa.c 39*91f16700Schasinglulu 40*91f16700SchasingluluBL2_SOURCES := ${MORELLO_BASE}/morello_security.c \ 41*91f16700Schasinglulu ${MORELLO_BASE}/morello_err.c \ 42*91f16700Schasinglulu ${MORELLO_BASE}/morello_trusted_boot.c \ 43*91f16700Schasinglulu ${MORELLO_BASE}/morello_bl2_setup.c \ 44*91f16700Schasinglulu ${MORELLO_BASE}/morello_image_load.c \ 45*91f16700Schasinglulu lib/utils/mem_region.c \ 46*91f16700Schasinglulu drivers/arm/css/sds/sds.c 47*91f16700Schasinglulu 48*91f16700SchasingluluBL31_SOURCES := ${MORELLO_CPU_SOURCES} \ 49*91f16700Schasinglulu ${INTERCONNECT_SOURCES} \ 50*91f16700Schasinglulu ${MORELLO_GIC_SOURCES} \ 51*91f16700Schasinglulu ${MORELLO_BASE}/morello_bl31_setup.c \ 52*91f16700Schasinglulu ${MORELLO_BASE}/morello_pm.c \ 53*91f16700Schasinglulu ${MORELLO_BASE}/morello_topology.c \ 54*91f16700Schasinglulu ${MORELLO_BASE}/morello_security.c \ 55*91f16700Schasinglulu drivers/arm/css/sds/sds.c 56*91f16700Schasinglulu 57*91f16700SchasingluluFDT_SOURCES += fdts/morello-${TARGET_PLATFORM}.dts \ 58*91f16700Schasinglulu ${MORELLO_BASE}/fdts/morello_fw_config.dts \ 59*91f16700Schasinglulu ${MORELLO_BASE}/fdts/morello_tb_fw_config.dts \ 60*91f16700Schasinglulu ${MORELLO_BASE}/fdts/morello_nt_fw_config.dts 61*91f16700Schasinglulu 62*91f16700SchasingluluFW_CONFIG := ${BUILD_PLAT}/fdts/morello_fw_config.dtb 63*91f16700SchasingluluHW_CONFIG := ${BUILD_PLAT}/fdts/morello-${TARGET_PLATFORM}.dtb 64*91f16700SchasingluluTB_FW_CONFIG := ${BUILD_PLAT}/fdts/morello_tb_fw_config.dtb 65*91f16700SchasingluluNT_FW_CONFIG := ${BUILD_PLAT}/fdts/morello_nt_fw_config.dtb 66*91f16700Schasinglulu 67*91f16700Schasinglulu# Add the FW_CONFIG to FIP and specify the same to certtool 68*91f16700Schasinglulu$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG})) 69*91f16700Schasinglulu# Add the HW_CONFIG to FIP and specify the same to certtool 70*91f16700Schasinglulu$(eval $(call TOOL_ADD_PAYLOAD,${HW_CONFIG},--hw-config,${HW_CONFIG})) 71*91f16700Schasinglulu# Add the TB_FW_CONFIG to FIP and specify the same to certtool 72*91f16700Schasinglulu$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG})) 73*91f16700Schasinglulu# Add the NT_FW_CONFIG to FIP and specify the same to certtool 74*91f16700Schasinglulu$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG})) 75*91f16700Schasinglulu 76*91f16700SchasingluluMORELLO_FW_NVCTR_VAL := 0 77*91f16700SchasingluluTFW_NVCTR_VAL := ${MORELLO_FW_NVCTR_VAL} 78*91f16700SchasingluluNTFW_NVCTR_VAL := ${MORELLO_FW_NVCTR_VAL} 79*91f16700Schasinglulu 80*91f16700Schasinglulu# TF-A not required to load the SCP Images 81*91f16700Schasingluluoverride CSS_LOAD_SCP_IMAGES := 0 82*91f16700Schasinglulu 83*91f16700Schasingluluoverride NEED_BL2U := no 84*91f16700Schasinglulu 85*91f16700Schasinglulu# 32 bit mode not supported 86*91f16700Schasingluluoverride CTX_INCLUDE_AARCH32_REGS := 0 87*91f16700Schasinglulu 88*91f16700Schasingluluoverride ARM_PLAT_MT := 1 89*91f16700Schasinglulu 90*91f16700Schasingluluoverride ARM_BL31_IN_DRAM := 1 91*91f16700Schasinglulu 92*91f16700Schasingluluoverride PSCI_EXTENDED_STATE_ID := 1 93*91f16700Schasingluluoverride ARM_RECOM_STATE_ID_ENC := 1 94*91f16700Schasinglulu 95*91f16700Schasinglulu# Errata workarounds: 96*91f16700SchasingluluERRATA_N1_1868343 := 1 97*91f16700Schasinglulu 98*91f16700Schasinglulu# Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the 99*91f16700Schasinglulu# SCP during power management operations and for SCP RAM Firmware transfer. 100*91f16700SchasingluluCSS_USE_SCMI_SDS_DRIVER := 1 101*91f16700Schasinglulu 102*91f16700Schasinglulu# System coherency is managed in hardware 103*91f16700SchasingluluHW_ASSISTED_COHERENCY := 1 104*91f16700Schasinglulu 105*91f16700Schasinglulu# When building for systems with hardware-assisted coherency, there's no need to 106*91f16700Schasinglulu# use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too. 107*91f16700SchasingluluUSE_COHERENT_MEM := 0 108*91f16700Schasinglulu 109*91f16700Schasinglulu# Add TARGET_PLATFORM to differentiate between Morello FVP and Morello SoC platform 110*91f16700Schasinglulu$(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM}))) 111*91f16700Schasinglulu 112*91f16700Schasinglulu# Add MORELLO_FW_NVCTR_VAL 113*91f16700Schasinglulu$(eval $(call add_define,MORELLO_FW_NVCTR_VAL)) 114*91f16700Schasinglulu 115*91f16700Schasingluluinclude plat/arm/common/arm_common.mk 116*91f16700Schasingluluinclude plat/arm/css/common/css_common.mk 117*91f16700Schasingluluinclude plat/arm/board/common/board_common.mk 118