From feebd4c7a86b6f0fcc1eb5008ba5f7d44e75beaf Mon Sep 17 00:00:00 2001 From: Lukas Hanel Date: Tue, 1 Mar 2022 15:40:39 +0100 Subject: [PATCH] feat(hikey960): add plat-defines for SPMC_AT_EL3 To use SPMC_AT_EL3, a platform must define a few configuration options. Copied them from fvp platform to hikey960. Change-Id: Ifd60d69bf79f2f340fe93fe030ab8c538b3a56e4 Signed-off-by: vallau01 Signed-off-by: Lukas Hanel --- plat/hisilicon/hikey960/hikey960_def.h | 23 +++++++++++++++++++++++ plat/hisilicon/hikey960/platform.mk | 6 ++++++ 2 files changed, 29 insertions(+) diff --git a/plat/hisilicon/hikey960/hikey960_def.h b/plat/hisilicon/hikey960/hikey960_def.h index 38d96c206..e103cf465 100644 --- a/plat/hisilicon/hikey960/hikey960_def.h +++ b/plat/hisilicon/hikey960/hikey960_def.h @@ -56,4 +56,27 @@ #define HIKEY960_UFS_DATA_BASE 0x10000000 #define HIKEY960_UFS_DATA_SIZE 0x0A000000 /* 160MB */ +#if defined(SPMC_AT_EL3) +/* + * Number of Secure Partitions supported. + * SPMC at EL3, uses this count to configure the maximum number of supported + * secure partitions. + */ +#define SECURE_PARTITION_COUNT 1 + +/* + * Number of Nwld Partitions supported. + * SPMC at EL3, uses this count to configure the maximum number of supported + * nwld partitions. + */ +#define NS_PARTITION_COUNT 1 +/* + * Number of Logical Partitions supported. + * SPMC at EL3, uses this count to configure the maximum number of supported + * logical partitions. + */ +#define MAX_EL3_LP_DESCS_COUNT 1 + +#endif /* SPMC_AT_EL3 */ + #endif /* HIKEY960_DEF_H */ diff --git a/plat/hisilicon/hikey960/platform.mk b/plat/hisilicon/hikey960/platform.mk index 395967b69..4c3c8178b 100644 --- a/plat/hisilicon/hikey960/platform.mk +++ b/plat/hisilicon/hikey960/platform.mk @@ -165,6 +165,12 @@ FIP_ALIGN := 512 # SPM dispatcher ifeq (${SPD},spmd) ifeq (${SPMC_AT_EL3},1) +# include device tree helper library +include lib/libfdt/libfdt.mk +BL31_SOURCES += common/fdt_wrappers.c \ + ${LIBFDT_SRCS} \ + common/uuid.c + # Add support for platform supplied linker script for BL31 build $(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT)) endif -- 2.39.5