1 /* 2 * Copyright (c) 2022, ARM Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #pragma once 8 9 #include <trusty/arm_ffa.h> 10 11 /** 12 * plat_mem_set_shared - Share or reclaim memory. 13 * @mtd: Structure describing the memory being shared or reclaimed 14 * @shared: If %true, the memory is being shared. 15 * If %false, the memory is being reclaimed. 16 * 17 * Share or reclaim memory. This function is called with a lock held. 18 * This function must update the memory_region_attributes field of the 19 * struct ffa_mtd if the memory was secured. 20 * 21 * Return: 0 on success, other values indicates failure. 22 */ 23 int plat_mem_set_shared(struct ffa_mtd *mtd, bool shared); 24 25