From 9a65ba851018769db10e72d7784db85a95cfbb65 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 25 Jun 2020 13:10:38 +0100 Subject: [PATCH 1/3] arm_fpga: Support more CPU clusters The maximum number of clusters is currently set to 2, which is quite limiting. As there are FPGA images with 4 clusters, let's increase the limit to 4. Change-Id: I9a85ca07ebbd2a018ad9668536d867ad6b75e537 Signed-off-by: Andre Przywara --- plat/arm/board/arm_fpga/fpga_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat/arm/board/arm_fpga/fpga_def.h b/plat/arm/board/arm_fpga/fpga_def.h index 03787293c..5f1951f79 100644 --- a/plat/arm/board/arm_fpga/fpga_def.h +++ b/plat/arm/board/arm_fpga/fpga_def.h @@ -18,7 +18,7 @@ * that are present will still be indexed appropriately regardless of any empty * entries in the array used to represent the topology. */ -#define FPGA_MAX_CLUSTER_COUNT 2 +#define FPGA_MAX_CLUSTER_COUNT 4 #define FPGA_MAX_CPUS_PER_CLUSTER 8 #define FPGA_MAX_PE_PER_CPU 4 From 2c13ef906132973e0dfb33eda6028770e6bda73c Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 25 Jun 2020 13:10:38 +0100 Subject: [PATCH 2/3] arm_fpga: Add Klein and Matterhorn support To support FPGAs with those cores as well, as the respective cpulib files to the Makefile. Change-Id: I1a60867d5937be88b32b210c7817be4274554a76 Signed-off-by: Andre Przywara --- plat/arm/board/arm_fpga/platform.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plat/arm/board/arm_fpga/platform.mk b/plat/arm/board/arm_fpga/platform.mk index 34e50ea13..399f97748 100644 --- a/plat/arm/board/arm_fpga/platform.mk +++ b/plat/arm/board/arm_fpga/platform.mk @@ -64,7 +64,10 @@ else lib/cpus/aarch64/neoverse_zeus.S \ lib/cpus/aarch64/cortex_hercules_ae.S \ lib/cpus/aarch64/cortex_a65.S \ - lib/cpus/aarch64/cortex_a65ae.S + lib/cpus/aarch64/cortex_a65ae.S \ + lib/cpus/aarch64/cortex_klein.S \ + lib/cpus/aarch64/cortex_matterhorn.S + # AArch64/AArch32 cores FPGA_CPU_LIBS += lib/cpus/aarch64/cortex_a55.S \ lib/cpus/aarch64/cortex_a75.S From c5346ed5e5498b0ea0352785ed21c0f2d794c13f Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Wed, 8 Jul 2020 13:01:00 +0100 Subject: [PATCH 3/3] arm_fpga: Predefine DTB and BL33 load addresses The memory layout for the FPGA is fairly uniform for most of the FPGA images, and we already assume that DRAM starts at 2GB by default. Prepopulate PRELOADED_BL33_BASE and FPGA_PRELOADED_DTB_BASE to some sane default values, to simplify building some stock image. If people want to deviate from that, they can always override those addresses on the make command line. Change-Id: I2238fafb3f8253a01ad2d88d45827c141d9b29dd Signed-off-by: Andre Przywara --- plat/arm/board/arm_fpga/platform.mk | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plat/arm/board/arm_fpga/platform.mk b/plat/arm/board/arm_fpga/platform.mk index 399f97748..e57912cfe 100644 --- a/plat/arm/board/arm_fpga/platform.mk +++ b/plat/arm/board/arm_fpga/platform.mk @@ -24,15 +24,10 @@ ifeq (${TRUSTED_BOARD_BOOT}, 1) $(error "TRUSTED_BOARD_BOOT must be disabled") endif -ifndef PRELOADED_BL33_BASE -$(error "PRELOADED_BL33_BASE is not set") -endif +PRELOADED_BL33_BASE := 0x80080000 -ifndef FPGA_PRELOADED_DTB_BASE -$(error "FPGA_PRELOADED_DTB_BASE is not set") -else +FPGA_PRELOADED_DTB_BASE := 0x80070000 $(eval $(call add_define,FPGA_PRELOADED_DTB_BASE)) -endif # Treating this as a memory-constrained port for now USE_COHERENT_MEM := 0