xref: /rk3399_ARM-atf/plat/arm/board/fvp/fvp_el3_spmc.c (revision 758ccb802d4f2a5fe55ec936a21ad4ae8cbd7b4f)
1 /*
2  * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 #include <services/el3_spmc_ffa_memory.h>
7 
8 #include <platform_def.h>
9 
10 IMPORT_SYM(uintptr_t, __PLAT_SPMC_SHMEM_DATASTORE_START__, DATASTORE_BASE);
11 
12 __section(".arm_el3_tzc_dram") __unused static uint8_t
13 plat_spmc_shmem_datastore[PLAT_SPMC_SHMEM_DATASTORE_SIZE];
14 
15 int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size)
16 {
17 	*datastore = (uint8_t *)DATASTORE_BASE;
18 	*size = PLAT_SPMC_SHMEM_DATASTORE_SIZE;
19 	return 0;
20 }
21 
22 /*
23  * Add dummy implementations of memory management related platform hooks.
24  * These can be used to implement platform specific functionality to support
25  * a memory sharing/lending operation.
26  *
27  * Note: The hooks must be located as part of the initial share request and
28  * final reclaim to prevent order dependencies with operations that may take
29  * place in the normal world without visibility of the SPMC.
30  */
31 int plat_spmc_shmem_begin(struct ffa_mtd *desc)
32 {
33 	return 0;
34 }
35 int plat_spmc_shmem_reclaim(struct ffa_mtd *desc)
36 {
37 	return 0;
38 }
39