Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 1 | # |
Bhupesh Sharma | 05533d9 | 2024-12-08 23:55:56 +0530 | [diff] [blame] | 2 | # Copyright (c) 2020-2025, Arm Limited. All rights reserved. |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Manoj Kumar | 8840711 | 2021-08-26 10:56:16 +0530 | [diff] [blame] | 7 | # Making sure the Morello platform type is specified |
| 8 | ifeq ($(filter ${TARGET_PLATFORM}, fvp soc),) |
Bhupesh Sharma | 05533d9 | 2024-12-08 23:55:56 +0530 | [diff] [blame] | 9 | $(error TARGET_PLATFORM must be fvp or soc) |
Manoj Kumar | 8840711 | 2021-08-26 10:56:16 +0530 | [diff] [blame] | 10 | endif |
| 11 | |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 12 | MORELLO_BASE := plat/arm/board/morello |
| 13 | |
| 14 | INTERCONNECT_SOURCES := ${MORELLO_BASE}/morello_interconnect.c |
| 15 | |
| 16 | PLAT_INCLUDES := -I${MORELLO_BASE}/include |
| 17 | |
| 18 | MORELLO_CPU_SOURCES := lib/cpus/aarch64/rainier.S |
| 19 | |
Chandni Cherukuri | 6c07a92 | 2020-10-01 10:11:44 +0530 | [diff] [blame] | 20 | # GIC-600 configuration |
Boyan Karatotev | c5c54e2 | 2025-01-07 11:04:16 +0000 | [diff] [blame^] | 21 | USE_GIC_DRIVER := 3 |
Chandni Cherukuri | 6c07a92 | 2020-10-01 10:11:44 +0530 | [diff] [blame] | 22 | GICV3_SUPPORT_GIC600 := 1 |
| 23 | |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 24 | PLAT_BL_COMMON_SOURCES := ${MORELLO_BASE}/morello_plat.c \ |
| 25 | ${MORELLO_BASE}/aarch64/morello_helper.S |
| 26 | |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 27 | BL1_SOURCES := ${MORELLO_CPU_SOURCES} \ |
| 28 | ${INTERCONNECT_SOURCES} \ |
| 29 | ${MORELLO_BASE}/morello_err.c \ |
| 30 | ${MORELLO_BASE}/morello_trusted_boot.c \ |
| 31 | ${MORELLO_BASE}/morello_bl1_setup.c \ |
| 32 | drivers/arm/sbsa/sbsa.c |
| 33 | |
| 34 | BL2_SOURCES := ${MORELLO_BASE}/morello_security.c \ |
| 35 | ${MORELLO_BASE}/morello_err.c \ |
| 36 | ${MORELLO_BASE}/morello_trusted_boot.c \ |
sah01 | 6ad6465 | 2021-11-18 10:04:27 +0000 | [diff] [blame] | 37 | ${MORELLO_BASE}/morello_bl2_setup.c \ |
| 38 | ${MORELLO_BASE}/morello_image_load.c \ |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 39 | lib/utils/mem_region.c \ |
sah01 | 6ad6465 | 2021-11-18 10:04:27 +0000 | [diff] [blame] | 40 | drivers/arm/css/sds/sds.c |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 41 | |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 42 | BL31_SOURCES := ${MORELLO_CPU_SOURCES} \ |
| 43 | ${INTERCONNECT_SOURCES} \ |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 44 | ${MORELLO_BASE}/morello_bl31_setup.c \ |
Werner Lewis | 02a5bcb | 2023-02-15 16:03:27 +0000 | [diff] [blame] | 45 | ${MORELLO_BASE}/morello_pm.c \ |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 46 | ${MORELLO_BASE}/morello_topology.c \ |
| 47 | ${MORELLO_BASE}/morello_security.c \ |
| 48 | drivers/arm/css/sds/sds.c |
| 49 | |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 50 | FDT_SOURCES += fdts/morello-${TARGET_PLATFORM}.dts \ |
| 51 | ${MORELLO_BASE}/fdts/morello_fw_config.dts \ |
| 52 | ${MORELLO_BASE}/fdts/morello_tb_fw_config.dts \ |
sah01 | 6ad6465 | 2021-11-18 10:04:27 +0000 | [diff] [blame] | 53 | ${MORELLO_BASE}/fdts/morello_nt_fw_config.dts |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 54 | |
| 55 | FW_CONFIG := ${BUILD_PLAT}/fdts/morello_fw_config.dtb |
Patrik Berglund | be79071 | 2022-09-14 17:22:15 +0100 | [diff] [blame] | 56 | HW_CONFIG := ${BUILD_PLAT}/fdts/morello-${TARGET_PLATFORM}.dtb |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 57 | TB_FW_CONFIG := ${BUILD_PLAT}/fdts/morello_tb_fw_config.dtb |
sah01 | 6ad6465 | 2021-11-18 10:04:27 +0000 | [diff] [blame] | 58 | NT_FW_CONFIG := ${BUILD_PLAT}/fdts/morello_nt_fw_config.dtb |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 59 | |
| 60 | # Add the FW_CONFIG to FIP and specify the same to certtool |
| 61 | $(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG})) |
Patrik Berglund | be79071 | 2022-09-14 17:22:15 +0100 | [diff] [blame] | 62 | # Add the HW_CONFIG to FIP and specify the same to certtool |
| 63 | $(eval $(call TOOL_ADD_PAYLOAD,${HW_CONFIG},--hw-config,${HW_CONFIG})) |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 64 | # Add the TB_FW_CONFIG to FIP and specify the same to certtool |
| 65 | $(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG})) |
sah01 | 6ad6465 | 2021-11-18 10:04:27 +0000 | [diff] [blame] | 66 | # Add the NT_FW_CONFIG to FIP and specify the same to certtool |
| 67 | $(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config,${NT_FW_CONFIG})) |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 68 | |
| 69 | MORELLO_FW_NVCTR_VAL := 0 |
| 70 | TFW_NVCTR_VAL := ${MORELLO_FW_NVCTR_VAL} |
| 71 | NTFW_NVCTR_VAL := ${MORELLO_FW_NVCTR_VAL} |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 72 | |
| 73 | # TF-A not required to load the SCP Images |
| 74 | override CSS_LOAD_SCP_IMAGES := 0 |
| 75 | |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 76 | override NEED_BL2U := no |
| 77 | |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 78 | # 32 bit mode not supported |
| 79 | override CTX_INCLUDE_AARCH32_REGS := 0 |
| 80 | |
| 81 | override ARM_PLAT_MT := 1 |
| 82 | |
Manoj Kumar | 05330a4 | 2022-06-23 12:30:37 +0100 | [diff] [blame] | 83 | override ARM_BL31_IN_DRAM := 1 |
| 84 | |
sahil | 4f7330d | 2023-05-25 13:47:13 +0530 | [diff] [blame] | 85 | override PSCI_EXTENDED_STATE_ID := 1 |
| 86 | override ARM_RECOM_STATE_ID_ENC := 1 |
| 87 | |
Manoj Kumar | f94c84b | 2022-01-05 14:38:44 +0000 | [diff] [blame] | 88 | # Errata workarounds: |
| 89 | ERRATA_N1_1868343 := 1 |
| 90 | |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 91 | # Select SCMI/SDS drivers instead of SCPI/BOM driver for communicating with the |
| 92 | # SCP during power management operations and for SCP RAM Firmware transfer. |
| 93 | CSS_USE_SCMI_SDS_DRIVER := 1 |
| 94 | |
| 95 | # System coherency is managed in hardware |
| 96 | HW_ASSISTED_COHERENCY := 1 |
| 97 | |
| 98 | # When building for systems with hardware-assisted coherency, there's no need to |
| 99 | # use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too. |
| 100 | USE_COHERENT_MEM := 0 |
| 101 | |
Manoj Kumar | 8840711 | 2021-08-26 10:56:16 +0530 | [diff] [blame] | 102 | # Add TARGET_PLATFORM to differentiate between Morello FVP and Morello SoC platform |
| 103 | $(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM}))) |
| 104 | |
Manoj Kumar | 4af5397 | 2021-01-10 16:12:24 +0000 | [diff] [blame] | 105 | # Add MORELLO_FW_NVCTR_VAL |
| 106 | $(eval $(call add_define,MORELLO_FW_NVCTR_VAL)) |
| 107 | |
Chandni Cherukuri | dfd5bfb | 2020-09-22 18:56:25 +0530 | [diff] [blame] | 108 | include plat/arm/common/arm_common.mk |
| 109 | include plat/arm/css/common/css_common.mk |
| 110 | include plat/arm/board/common/board_common.mk |