TFTF: get FVP platform's topology from build options
This patch extends passing FVP topology parameters with
FVP_CLUSTER_COUNT and FVP_MAX_CPUS_PER_CLUSTER build
options to match TF-A. The change adds more test options,
make FVP platform configuration more flexible and eliminates
test errors when the platform is configured with number
of CPUs less than default values in the makefile.
These build options are documented in 'Arm FVP Platform
Specific Build Options' section of 'build-options.rst'
document.
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Change-Id: I01c6437d468885755a5415804b3688e4c878170d
diff --git a/Makefile b/Makefile
index 1851775..fea13db 100644
--- a/Makefile
+++ b/Makefile
@@ -94,6 +94,17 @@
$(and $(patsubst 0,,$(value $(1))),$(patsubst 1,,$(value $(1))),$(error $(1) must be boolean))
endef
+# CREATE_SEQ is a recursive function to create sequence of numbers from 1 to
+# $(2) and assign the sequence to $(1)
+define CREATE_SEQ
+$(if $(word $(2), $($(1))),\
+ $(eval $(1) += $(words $($(1))))\
+ $(eval $(1) := $(filter-out 0,$($(1)))),\
+ $(eval $(1) += $(words $($(1))))\
+ $(call CREATE_SEQ,$(1),$(2))\
+)
+endef
+
ifeq (${PLAT},)
$(error "Error: Unknown platform. Please use PLAT=<platform name> to specify the platform")
endif