summaryrefslogtreecommitdiff
path: root/plat/hisilicon/hikey960/hikey960_bl31_setup.c
diff options
context:
space:
mode:
authorvallau01 <valentin.laurent@trustonic.com>2022-08-02 16:16:11 +0200
committerLukas Hanel <lukas.hanel@trustonic.com>2022-11-02 15:35:03 +0100
commit5f905a249839e9e20ebf44c22d95caaf3a2e5611 (patch)
tree3a63aa24042fd9806e6f5ddaf6bc7539fd83886f /plat/hisilicon/hikey960/hikey960_bl31_setup.c
parentfeebd4c7a86b6f0fcc1eb5008ba5f7d44e75beaf (diff)
downloadarm-trusted-firmware-5f905a249839e9e20ebf44c22d95caaf3a2e5611.tar.gz
feat(hikey960): add memory sharing hooks for SPMC_AT_EL3
These allows a platform to do any System-MMU/IOMMU configuration in line with FF-A memory sharing. Change-Id: Id517759198421a32c5d16bf5bb99590275e77736 Signed-off-by: vallau01 <valentin.laurent@trustonic.com> Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
Diffstat (limited to 'plat/hisilicon/hikey960/hikey960_bl31_setup.c')
-rw-r--r--plat/hisilicon/hikey960/hikey960_bl31_setup.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/plat/hisilicon/hikey960/hikey960_bl31_setup.c b/plat/hisilicon/hikey960/hikey960_bl31_setup.c
index f39476ebf..49918ef87 100644
--- a/plat/hisilicon/hikey960/hikey960_bl31_setup.c
+++ b/plat/hisilicon/hikey960/hikey960_bl31_setup.c
@@ -22,6 +22,7 @@
#include <lib/mmio.h>
#include <lib/xlat_tables/xlat_tables_v2.h>
#include <plat/common/platform.h>
+#include <services/el3_spmc_ffa_memory.h>
#include <hi3660.h>
#include <hisi_ipc.h>
@@ -182,6 +183,26 @@ int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size)
*size = SPMC_SHARED_MEMORY_OBJ_SIZE;
return 0;
}
+
+/*
+ * Add dummy implementations of memory management related platform hooks.
+ * These can be used to implement platform specific functionality to support
+ * a memory sharing/lending operation.
+ *
+ * Note: The hooks must be located as part of the initial share request and
+ * final reclaim to prevent order dependencies with operations that may take
+ * place in the normal world without visibility of the SPMC.
+ */
+int plat_spmc_shmem_begin(struct ffa_mtd *desc)
+{
+ return 0;
+}
+
+int plat_spmc_shmem_reclaim(struct ffa_mtd *desc)
+{
+ return 0;
+}
+
#endif
void bl31_platform_setup(void)