laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2021, ARM Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | # Only aarch64 ARCH supported for FVP_R |
| 8 | ARCH := aarch64 |
| 9 | |
| 10 | # Override to exclude BL2, BL2U, BL31, and BL33 for FVP_R |
| 11 | override NEED_BL2 := no |
| 12 | override NEED_BL2U := no |
| 13 | override NEED_BL31 := no |
| 14 | override NEED_BL33 := no |
| 15 | |
| 16 | # Default cluster count for FVP_R |
| 17 | FVP_R_CLUSTER_COUNT := 2 |
| 18 | |
| 19 | # Default number of CPUs per cluster on FVP_R |
| 20 | FVP_R_MAX_CPUS_PER_CLUSTER := 4 |
| 21 | |
| 22 | # Default number of threads per CPU on FVP_R |
| 23 | FVP_R_MAX_PE_PER_CPU := 1 |
| 24 | |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame^] | 25 | # Use MPU-based memory management: |
| 26 | XLAT_MPU_LIB_V1 := 1 |
| 27 | |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 28 | # Need to revisit this for FVP_R |
| 29 | FVP_R_DT_PREFIX := fvp-base-gicv3-psci |
| 30 | |
| 31 | # Pass FVP_R_CLUSTER_COUNT to the build system. |
| 32 | $(eval $(call add_define,FVP_R_CLUSTER_COUNT)) |
| 33 | |
| 34 | # Pass FVP_R_MAX_CPUS_PER_CLUSTER to the build system. |
| 35 | $(eval $(call add_define,FVP_R_MAX_CPUS_PER_CLUSTER)) |
| 36 | |
| 37 | # Pass FVP_R_MAX_PE_PER_CPU to the build system. |
| 38 | $(eval $(call add_define,FVP_R_MAX_PE_PER_CPU)) |
| 39 | |
| 40 | # Sanity check the cluster count and if FVP_R_CLUSTER_COUNT <= 2, |
| 41 | # choose the CCI driver , else the CCN driver |
| 42 | ifeq ($(FVP_R_CLUSTER_COUNT), 0) |
| 43 | $(error "Incorrect cluster count specified for FVP_R port") |
| 44 | else ifeq ($(FVP_R_CLUSTER_COUNT),$(filter $(FVP_R_CLUSTER_COUNT),1 2)) |
| 45 | FVP_R_INTERCONNECT_DRIVER := FVP_R_CCI |
| 46 | else |
| 47 | FVP_R_INTERCONNECT_DRIVER := FVP_R_CCN |
| 48 | endif |
| 49 | |
| 50 | $(eval $(call add_define,FVP_R_INTERCONNECT_DRIVER)) |
| 51 | |
| 52 | ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCI) |
| 53 | FVP_R_INTERCONNECT_SOURCES := drivers/arm/cci/cci.c |
| 54 | else ifeq (${FVP_R_INTERCONNECT_DRIVER}, FVP_R_CCN) |
| 55 | FVP_R_INTERCONNECT_SOURCES := drivers/arm/ccn/ccn.c \ |
| 56 | plat/arm/common/arm_ccn.c |
| 57 | else |
| 58 | $(error "Incorrect CCN driver chosen on FVP_R port") |
| 59 | endif |
| 60 | |
| 61 | PLAT_INCLUDES := -Iplat/arm/board/fvp_r/include |
| 62 | |
| 63 | PLAT_BL_COMMON_SOURCES := plat/arm/board/fvp_r/fvp_r_common.c |
| 64 | |
| 65 | FVP_R_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S |
| 66 | |
| 67 | # select a different set of CPU files, depending on whether we compile for |
| 68 | # hardware assisted coherency cores or not |
| 69 | ifeq (${HW_ASSISTED_COHERENCY}, 0) |
| 70 | # Cores used without DSU |
| 71 | # FVP_R_CPU_LIBS += lib/cpus/aarch64/fvp_r.S |
| 72 | else |
| 73 | # Cores used with DSU only |
| 74 | # FVP_R_CPU_LIBS += lib/cpus/aarch64/fvp_r.S |
| 75 | endif |
| 76 | |
| 77 | BL1_SOURCES += drivers/arm/sp805/sp805.c \ |
| 78 | drivers/delay_timer/delay_timer.c \ |
| 79 | drivers/io/io_semihosting.c \ |
| 80 | lib/semihosting/semihosting.c \ |
| 81 | lib/semihosting/${ARCH}/semihosting_call.S \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame^] | 82 | plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c \ |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 83 | plat/arm/board/fvp_r/fvp_r_bl1_setup.c \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame^] | 84 | plat/arm/board/fvp_r/fvp_r_context_mgmt.c \ |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 85 | plat/arm/board/fvp_r/fvp_r_err.c \ |
| 86 | plat/arm/board/fvp_r/fvp_r_io_storage.c \ |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame^] | 87 | plat/arm/board/fvp_r/fvp_r_bl1_context_mgmt.c \ |
| 88 | plat/arm/board/fvp_r/fvp_r_bl1_entrypoint.S \ |
| 89 | plat/arm/board/fvp_r/fvp_r_bl1_exceptions.S \ |
| 90 | plat/arm/board/fvp_r/fvp_r_bl1_main.c \ |
| 91 | plat/arm/board/fvp_r/fvp_r_context.S \ |
| 92 | plat/arm/board/fvp_r/fvp_r_debug.S \ |
| 93 | plat/arm/board/fvp_r/fvp_r_helpers.S \ |
| 94 | plat/arm/board/fvp_r/fvp_r_misc_helpers.S \ |
| 95 | plat/arm/board/fvp_r/fvp_r_pauth_helpers.S \ |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 96 | ${FVP_R_CPU_LIBS} \ |
| 97 | ${FVP_R_INTERCONNECT_SOURCES} |
| 98 | |
| 99 | ifeq (${USE_SP804_TIMER},1) |
| 100 | BL1_SOURCES += drivers/arm/sp804/sp804_delay_timer.c |
| 101 | else |
| 102 | BL1_SOURCES += drivers/delay_timer/generic_delay_timer.c |
| 103 | endif |
| 104 | |
| 105 | # Enable Activity Monitor Unit extensions by default |
| 106 | ENABLE_AMU := 1 |
| 107 | |
| 108 | ifneq (${ENABLE_STACK_PROTECTOR},0) |
| 109 | PLAT_BL_COMMON_SOURCES += plat/arm/board/fvp_r/fvp_r_stack_protector.c |
| 110 | endif |
| 111 | |
Gary Morrison | 3d7f654 | 2021-01-27 13:08:47 -0600 | [diff] [blame^] | 112 | NEED_BL32 := no |
laurenw-arm | 7c7b198 | 2020-10-21 13:34:40 -0500 | [diff] [blame] | 113 | |
| 114 | ifneq (${BL2_AT_EL3}, 0) |
| 115 | override BL1_SOURCES = |
| 116 | endif |
| 117 | |
| 118 | # Add the FDT_SOURCES and options for Dynamic Config (only for Unix env) |
| 119 | ifdef UNIX_MK |
| 120 | FVP_R_HW_CONFIG_DTS := fdts/${FVP_R_DT_PREFIX}.dts |
| 121 | FDT_SOURCES += $(addprefix plat/arm/board/fvp_r/fdts/, \ |
| 122 | ${PLAT}_fw_config.dts \ |
| 123 | ${PLAT}_nt_fw_config.dts \ |
| 124 | ) |
| 125 | |
| 126 | FVP_R_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_fw_config.dtb |
| 127 | FVP_R_NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb |
| 128 | |
| 129 | # Add the FW_CONFIG to FIP and specify the same to certtool |
| 130 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_R_FW_CONFIG},--fw-config,${FVP_R_FW_CONFIG})) |
| 131 | # Add the NT_FW_CONFIG to FIP and specify the same to certtool |
| 132 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_R_NT_FW_CONFIG},--nt-fw-config,${FVP_R_NT_FW_CONFIG})) |
| 133 | |
| 134 | FDT_SOURCES += ${FVP_R_HW_CONFIG_DTS} |
| 135 | $(eval FVP_R_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb,$(FVP_R_HW_CONFIG_DTS))) |
| 136 | |
| 137 | # Add the HW_CONFIG to FIP and specify the same to certtool |
| 138 | $(eval $(call TOOL_ADD_PAYLOAD,${FVP_R_HW_CONFIG},--hw-config,${FVP_R_HW_CONFIG})) |
| 139 | endif |
| 140 | |
| 141 | include plat/arm/board/common/board_common.mk |
| 142 | include plat/arm/common/arm_common.mk |