blob: c57a244425f3972ceaf9bb79052e03eca591b887 [file] [log] [blame]
Marc Bonnicic66fc1b2021-12-16 18:31:02 +00001/*
2 * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
Marc Bonnici503320e2022-02-21 15:02:36 +00006#include <services/el3_spmc_ffa_memory.h>
Marc Bonnicic66fc1b2021-12-16 18:31:02 +00007
8#include <platform_def.h>
9
Shruti Guptaa72adec2022-12-20 18:01:43 +000010IMPORT_SYM(uintptr_t, __PLAT_SPMC_SHMEM_DATASTORE_START__, DATASTORE_BASE);
Marc Bonnicic66fc1b2021-12-16 18:31:02 +000011
Shruti Guptaa72adec2022-12-20 18:01:43 +000012__section(".arm_el3_tzc_dram") __unused static uint8_t
Marc Bonnicic66fc1b2021-12-16 18:31:02 +000013plat_spmc_shmem_datastore[PLAT_SPMC_SHMEM_DATASTORE_SIZE];
14
15int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size)
16{
Shruti Guptaa72adec2022-12-20 18:01:43 +000017 *datastore = (uint8_t *)DATASTORE_BASE;
Marc Bonnicic66fc1b2021-12-16 18:31:02 +000018 *size = PLAT_SPMC_SHMEM_DATASTORE_SIZE;
19 return 0;
20}
Marc Bonnici503320e2022-02-21 15:02:36 +000021
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 */
31int plat_spmc_shmem_begin(struct ffa_mtd *desc)
32{
33 return 0;
34}
35int plat_spmc_shmem_reclaim(struct ffa_mtd *desc)
36{
37 return 0;
38}