xref: /rk3399_ARM-atf/plat/arm/board/juno/juno_el3_spmc.c (revision fa0df1bd76b176f7832031c1fa3a0044aacf4e37)
1 /*
2  * Copyright (c) 2022-2025, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <lib/xlat_tables/xlat_tables_defs.h>
8 #include <services/el3_spmc_ffa_memory.h>
9 
10 #include <platform_def.h>
11 
12 __section(".arm_el3_tzc_dram") __unused static uint8_t plat_spmc_shmem_datastore[PAGE_SIZE];
13 
14 int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size)
15 {
16 	*datastore = (uint8_t *)plat_spmc_shmem_datastore;
17 	*size = PAGE_SIZE;
18 	return 0;
19 }
20 
21 /*
22  * Add dummy implementations of memory management related platform hooks.
23  * These can be used to implement platform specific functionality to support
24  * a memory sharing/lending operation.
25  *
26  * Note: The hooks must be located as part of the initial share request and
27  * final reclaim to prevent order dependencies with operations that may take
28  * place in the normal world without visibility of the SPMC.
29  */
30 int plat_spmc_shmem_begin(struct ffa_mtd *desc)
31 {
32 	return 0;
33 }
34 int plat_spmc_shmem_reclaim(struct ffa_mtd *desc)
35 {
36 	return 0;
37 }
38 
39 int plat_spmd_handle_group0_interrupt(uint32_t intid)
40 {
41 	/*
42 	 * As of now, there are no sources of Group0 secure interrupt enabled
43 	 * for Juno.
44 	 */
45 	(void)intid;
46 	return -1;
47 }
48 
49