Oliver Swede | 8fed2fe | 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 | |
Andre Przywara | eec45eb | 2020-01-24 15:02:27 +0000 | [diff] [blame] | 7 | include lib/libfdt/libfdt.mk |
| 8 | |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 9 | RESET_TO_BL31 := 1 |
| 10 | ifeq (${RESET_TO_BL31}, 0) |
| 11 | $(error "This is a BL31-only port; RESET_TO_BL31 must be enabled") |
| 12 | endif |
| 13 | |
Oliver Swede | 3769b3f | 2019-12-16 14:08:27 +0000 | [diff] [blame] | 14 | ifeq (${ENABLE_PIE}, 1) |
| 15 | override SEPARATE_CODE_AND_RODATA := 1 |
| 16 | endif |
| 17 | |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 18 | CTX_INCLUDE_AARCH32_REGS := 0 |
| 19 | ifeq (${CTX_INCLUDE_AARCH32_REGS}, 1) |
| 20 | $(error "This is an AArch64-only port; CTX_INCLUDE_AARCH32_REGS must be disabled") |
| 21 | endif |
| 22 | |
| 23 | ifeq (${TRUSTED_BOARD_BOOT}, 1) |
| 24 | $(error "TRUSTED_BOARD_BOOT must be disabled") |
| 25 | endif |
| 26 | |
Andre Przywara | d9b95cc | 2020-07-08 13:01:00 +0100 | [diff] [blame] | 27 | PRELOADED_BL33_BASE := 0x80080000 |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 28 | |
Andre Przywara | d9b95cc | 2020-07-08 13:01:00 +0100 | [diff] [blame] | 29 | FPGA_PRELOADED_DTB_BASE := 0x80070000 |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 30 | $(eval $(call add_define,FPGA_PRELOADED_DTB_BASE)) |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 31 | |
Andre Przywara | 0176793 | 2020-07-07 10:40:46 +0100 | [diff] [blame] | 32 | FPGA_PRELOADED_CMD_LINE := 0x1000 |
| 33 | $(eval $(call add_define,FPGA_PRELOADED_CMD_LINE)) |
| 34 | |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 35 | # Treating this as a memory-constrained port for now |
| 36 | USE_COHERENT_MEM := 0 |
| 37 | |
Oliver Swede | 7fbb9b5 | 2020-01-15 10:20:09 +0000 | [diff] [blame] | 38 | # This can be overridden depending on CPU(s) used in the FPGA image |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 39 | HW_ASSISTED_COHERENCY := 1 |
| 40 | |
Andre Przywara | 8b50525 | 2020-04-09 10:10:09 +0100 | [diff] [blame] | 41 | PL011_GENERIC_UART := 1 |
| 42 | |
Oliver Swede | 7fbb9b5 | 2020-01-15 10:20:09 +0000 | [diff] [blame] | 43 | FPGA_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S |
| 44 | |
| 45 | # select a different set of CPU files, depending on whether we compile for |
| 46 | # hardware assisted coherency cores or not |
| 47 | ifeq (${HW_ASSISTED_COHERENCY}, 0) |
| 48 | # Cores used without DSU |
| 49 | FPGA_CPU_LIBS += lib/cpus/aarch64/cortex_a35.S \ |
| 50 | lib/cpus/aarch64/cortex_a53.S \ |
| 51 | lib/cpus/aarch64/cortex_a57.S \ |
| 52 | lib/cpus/aarch64/cortex_a72.S \ |
| 53 | lib/cpus/aarch64/cortex_a73.S |
| 54 | else |
| 55 | # AArch64-only cores |
| 56 | FPGA_CPU_LIBS += lib/cpus/aarch64/cortex_a76.S \ |
| 57 | lib/cpus/aarch64/cortex_a76ae.S \ |
| 58 | lib/cpus/aarch64/cortex_a77.S \ |
Jimmy Brisson | 7ec175e | 2020-06-01 16:49:34 -0500 | [diff] [blame] | 59 | lib/cpus/aarch64/cortex_a78.S \ |
Oliver Swede | 7fbb9b5 | 2020-01-15 10:20:09 +0000 | [diff] [blame] | 60 | lib/cpus/aarch64/neoverse_n1.S \ |
| 61 | lib/cpus/aarch64/neoverse_e1.S \ |
| 62 | lib/cpus/aarch64/neoverse_zeus.S \ |
Oliver Swede | 7fbb9b5 | 2020-01-15 10:20:09 +0000 | [diff] [blame] | 63 | lib/cpus/aarch64/cortex_hercules_ae.S \ |
| 64 | lib/cpus/aarch64/cortex_a65.S \ |
Andre Przywara | cb16767 | 2020-06-25 13:10:38 +0100 | [diff] [blame] | 65 | lib/cpus/aarch64/cortex_a65ae.S \ |
| 66 | lib/cpus/aarch64/cortex_klein.S \ |
| 67 | lib/cpus/aarch64/cortex_matterhorn.S |
| 68 | |
Oliver Swede | 7fbb9b5 | 2020-01-15 10:20:09 +0000 | [diff] [blame] | 69 | # AArch64/AArch32 cores |
| 70 | FPGA_CPU_LIBS += lib/cpus/aarch64/cortex_a55.S \ |
| 71 | lib/cpus/aarch64/cortex_a75.S |
| 72 | endif |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 73 | |
Andre Przywara | e1cc130 | 2020-03-25 15:50:38 +0000 | [diff] [blame] | 74 | # Allow detection of GIC-600 |
| 75 | GICV3_SUPPORT_GIC600 := 1 |
Manish Pandey | b21cad7 | 2020-04-03 18:59:20 +0100 | [diff] [blame] | 76 | |
| 77 | # Include GICv3 driver files |
| 78 | include drivers/arm/gic/v3/gicv3.mk |
| 79 | |
| 80 | FPGA_GIC_SOURCES := ${GICV3_SOURCES} \ |
Oliver Swede | b51da81 | 2019-12-03 14:08:21 +0000 | [diff] [blame] | 81 | plat/common/plat_gicv3.c \ |
| 82 | plat/arm/board/arm_fpga/fpga_gicv3.c |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 83 | |
| 84 | PLAT_INCLUDES := -Iplat/arm/board/arm_fpga/include |
| 85 | |
| 86 | PLAT_BL_COMMON_SOURCES := plat/arm/board/arm_fpga/${ARCH}/fpga_helpers.S |
| 87 | |
Andre Przywara | eec45eb | 2020-01-24 15:02:27 +0000 | [diff] [blame] | 88 | BL31_SOURCES += common/fdt_wrappers.c \ |
| 89 | drivers/delay_timer/delay_timer.c \ |
Oliver Swede | 8fed2fe | 2019-11-11 11:11:06 +0000 | [diff] [blame] | 90 | drivers/delay_timer/generic_delay_timer.c \ |
| 91 | drivers/arm/pl011/${ARCH}/pl011_console.S \ |
| 92 | plat/common/plat_psci_common.c \ |
| 93 | plat/arm/board/arm_fpga/fpga_pm.c \ |
| 94 | plat/arm/board/arm_fpga/fpga_topology.c \ |
| 95 | plat/arm/board/arm_fpga/fpga_console.c \ |
| 96 | plat/arm/board/arm_fpga/fpga_bl31_setup.c \ |
| 97 | ${FPGA_CPU_LIBS} \ |
| 98 | ${FPGA_GIC_SOURCES} |
| 99 | |
| 100 | all: bl31 |