feat(plat/fvp): introduce accessor function to obtain datastore
In order to provide the EL3 SPMC a sufficient datastore to record memory descriptors, a accessor function is used. This allows for the backing memory to be allocated in a platform defined manner, to accommodate memory constraints and desired use cases. Provide an implementation for the Arm FVP platform to use a default value of 512KB memory allocated in the TZC RAM section. Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: I92bc55ba6e04bdad429eb52f0d2960ceda682804
This commit is contained in:
parent
e0b1a6d59e
commit
6a0788bc0e
|
@ -347,6 +347,10 @@ int plat_spm_sp_get_next_address(void **sp_base, size_t *sp_size,
|
||||||
int plat_spm_core_manifest_load(spmc_manifest_attribute_t *manifest,
|
int plat_spm_core_manifest_load(spmc_manifest_attribute_t *manifest,
|
||||||
const void *pm_addr);
|
const void *pm_addr);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(SPMC_AT_EL3)
|
||||||
|
int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Mandatory BL image load functions(may be overridden).
|
* Mandatory BL image load functions(may be overridden).
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <platform_def.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* On the FVP platform when using the EL3 SPMC implementation allocate the
|
||||||
|
* datastore for tracking shared memory descriptors in the TZC DRAM section
|
||||||
|
* to ensure sufficient storage can be allocated.
|
||||||
|
* Provide an implementation of the accessor method to allow the datastore
|
||||||
|
* details to be retrieved by the SPMC.
|
||||||
|
* The SPMC will take care of initializing the memory region.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define PLAT_SPMC_SHMEM_DATASTORE_SIZE 512 * 1024
|
||||||
|
|
||||||
|
__section("arm_el3_tzc_dram") static uint8_t
|
||||||
|
plat_spmc_shmem_datastore[PLAT_SPMC_SHMEM_DATASTORE_SIZE];
|
||||||
|
|
||||||
|
int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size)
|
||||||
|
{
|
||||||
|
*datastore = plat_spmc_shmem_datastore;
|
||||||
|
*size = PLAT_SPMC_SHMEM_DATASTORE_SIZE;
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -425,3 +425,7 @@ ENABLE_SYS_REG_TRACE_FOR_NS := 1
|
||||||
|
|
||||||
# enable trace filter control registers access to NS by default
|
# enable trace filter control registers access to NS by default
|
||||||
ENABLE_TRF_FOR_NS := 1
|
ENABLE_TRF_FOR_NS := 1
|
||||||
|
|
||||||
|
ifeq (${SPMC_AT_EL3}, 1)
|
||||||
|
PLAT_BL_COMMON_SOURCES += plat/arm/board/fvp/fvp_el3_spmc.c
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in New Issue