Oliver Swede | 536d906 | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2020, ARM Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | RESET_TO_BL31 := 1 |
| 8 | ifeq (${RESET_TO_BL31}, 0) |
| 9 | $(error "This is a BL31-only port; RESET_TO_BL31 must be enabled") |
| 10 | endif |
| 11 | |
Oliver Swede | e726c75 | 2019-12-16 14:08:27 +0000 | [diff] [blame^] | 12 | ifeq (${ENABLE_PIE}, 1) |
| 13 | override SEPARATE_CODE_AND_RODATA := 1 |
| 14 | endif |
| 15 | |
Oliver Swede | 536d906 | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 16 | CTX_INCLUDE_AARCH32_REGS := 0 |
| 17 | ifeq (${CTX_INCLUDE_AARCH32_REGS}, 1) |
| 18 | $(error "This is an AArch64-only port; CTX_INCLUDE_AARCH32_REGS must be disabled") |
| 19 | endif |
| 20 | |
| 21 | ifeq (${TRUSTED_BOARD_BOOT}, 1) |
| 22 | $(error "TRUSTED_BOARD_BOOT must be disabled") |
| 23 | endif |
| 24 | |
| 25 | ifndef PRELOADED_BL33_BASE |
| 26 | $(error "PRELOADED_BL33_BASE is not set") |
| 27 | endif |
| 28 | |
| 29 | ifndef FPGA_PRELOADED_DTB_BASE |
| 30 | $(error "FPGA_PRELOADED_DTB_BASE is not set") |
| 31 | else |
| 32 | $(eval $(call add_define,FPGA_PRELOADED_DTB_BASE)) |
| 33 | endif |
| 34 | |
| 35 | # Treating this as a memory-constrained port for now |
| 36 | USE_COHERENT_MEM := 0 |
| 37 | |
| 38 | # The CPU in the initial image makes use of this feature |
| 39 | HW_ASSISTED_COHERENCY := 1 |
| 40 | |
| 41 | FPGA_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S \ |
| 42 | lib/cpus/aarch64/neoverse_zeus.S |
| 43 | |
Oliver Swede | 87762bc | 2019-12-03 14:08:21 +0000 | [diff] [blame] | 44 | FPGA_GIC_SOURCES := drivers/arm/gic/v3/gicv3_helpers.c \ |
| 45 | drivers/arm/gic/v3/gicdv3_helpers.c \ |
| 46 | drivers/arm/gic/v3/gicrv3_helpers.c \ |
| 47 | drivers/arm/gic/v3/gicv3_main.c \ |
| 48 | drivers/arm/gic/v3/gic600.c \ |
| 49 | drivers/arm/gic/common/gic_common.c \ |
| 50 | plat/common/plat_gicv3.c \ |
| 51 | plat/arm/board/arm_fpga/fpga_gicv3.c |
Oliver Swede | 536d906 | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 52 | |
| 53 | PLAT_INCLUDES := -Iplat/arm/board/arm_fpga/include |
| 54 | |
| 55 | PLAT_BL_COMMON_SOURCES := plat/arm/board/arm_fpga/${ARCH}/fpga_helpers.S |
| 56 | |
| 57 | BL31_SOURCES += drivers/delay_timer/delay_timer.c \ |
| 58 | drivers/delay_timer/generic_delay_timer.c \ |
| 59 | drivers/arm/pl011/${ARCH}/pl011_console.S \ |
| 60 | plat/common/plat_psci_common.c \ |
| 61 | plat/arm/board/arm_fpga/fpga_pm.c \ |
| 62 | plat/arm/board/arm_fpga/fpga_topology.c \ |
| 63 | plat/arm/board/arm_fpga/fpga_console.c \ |
| 64 | plat/arm/board/arm_fpga/fpga_bl31_setup.c \ |
| 65 | ${FPGA_CPU_LIBS} \ |
| 66 | ${FPGA_GIC_SOURCES} |
| 67 | |
| 68 | all: bl31 |