fvp_el3_spmc.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #include <platform_def.h>
  8. IMPORT_SYM(uintptr_t, __PLAT_SPMC_SHMEM_DATASTORE_START__, DATASTORE_BASE);
  9. __section(".arm_el3_tzc_dram") __unused static uint8_t
  10. plat_spmc_shmem_datastore[PLAT_SPMC_SHMEM_DATASTORE_SIZE];
  11. int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size)
  12. {
  13. *datastore = (uint8_t *)DATASTORE_BASE;
  14. *size = PLAT_SPMC_SHMEM_DATASTORE_SIZE;
  15. return 0;
  16. }
  17. /*
  18. * Add dummy implementations of memory management related platform hooks.
  19. * These can be used to implement platform specific functionality to support
  20. * a memory sharing/lending operation.
  21. *
  22. * Note: The hooks must be located as part of the initial share request and
  23. * final reclaim to prevent order dependencies with operations that may take
  24. * place in the normal world without visibility of the SPMC.
  25. */
  26. int plat_spmc_shmem_begin(struct ffa_mtd *desc)
  27. {
  28. return 0;
  29. }
  30. int plat_spmc_shmem_reclaim(struct ffa_mtd *desc)
  31. {
  32. return 0;
  33. }