blob: da090c0dc50c0e395720f64f5e43219f95a6baf3 [file] [log] [blame]
Marc Bonnici6a0788b2021-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 */
6
7#include <platform_def.h>
8
9/*
10 * On the FVP platform when using the EL3 SPMC implementation allocate the
11 * datastore for tracking shared memory descriptors in the TZC DRAM section
12 * to ensure sufficient storage can be allocated.
13 * Provide an implementation of the accessor method to allow the datastore
14 * details to be retrieved by the SPMC.
15 * The SPMC will take care of initializing the memory region.
16 */
17
18#define PLAT_SPMC_SHMEM_DATASTORE_SIZE 512 * 1024
19
20__section("arm_el3_tzc_dram") static uint8_t
21plat_spmc_shmem_datastore[PLAT_SPMC_SHMEM_DATASTORE_SIZE];
22
23int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size)
24{
25 *datastore = plat_spmc_shmem_datastore;
26 *size = PLAT_SPMC_SHMEM_DATASTORE_SIZE;
27 return 0;
28}