xref: /rk3399_ARM-atf/plat/arm/board/juno/juno_el3_spmc.c (revision 05d22c3045e2e972c2262b9ccd6c82cb7545bf83)
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 <plat/arm/common/plat_arm.h>
9 #include <services/el3_spmc_ffa_memory.h>
10 
11 #include <platform_def.h>
12 
13 __section(".arm_el3_tzc_dram") __unused static uint8_t plat_spmc_shmem_datastore[PAGE_SIZE];
14 
15 int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size)
16 {
17 	*datastore = (uint8_t *)plat_spmc_shmem_datastore;
18 	*size = PAGE_SIZE;
19 	return 0;
20 }
21 
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  */
31 int plat_spmc_shmem_begin(struct ffa_mtd *desc)
32 {
33 	return 0;
34 }
35 int plat_spmc_shmem_reclaim(struct ffa_mtd *desc)
36 {
37 	return 0;
38 }
39 
40 int plat_spmd_handle_group0_interrupt(uint32_t intid)
41 {
42 	/*
43 	 * As of now, there are no sources of Group0 secure interrupt enabled
44 	 * for Juno.
45 	 */
46 	(void)intid;
47 	return -1;
48 }
49 
50