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