blob: a8519a1ba9210cde7df83816f9469fbc4938458f [file] [log] [blame]
Andrew Walbranb5ab43c2020-04-30 11:32:54 +01001/*
2 * Copyright 2019 The Hafnium Authors.
3 *
Andrew Walbrane959ec12020-06-17 15:01:09 +01004 * Use of this source code is governed by a BSD-style
5 * license that can be found in the LICENSE file or at
6 * https://opensource.org/licenses/BSD-3-Clause.
Andrew Walbranb5ab43c2020-04-30 11:32:54 +01007 */
8
9#pragma once
10
11#include "hf/mpool.h"
12#include "hf/vm.h"
13
14#include "vmapi/hf/ffa.h"
15
Andrew Walbran1a86aa92020-05-15 17:22:28 +010016struct ffa_value ffa_memory_send(struct vm_locked from_locked,
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010017 struct ffa_memory_region *memory_region,
Andrew Walbran130a8ae2020-05-15 16:27:15 +010018 uint32_t memory_share_length,
Andrew Walbran1a86aa92020-05-15 17:22:28 +010019 uint32_t fragment_length, uint32_t share_func,
20 struct mpool *page_pool);
Andrew Walbranca808b12020-05-15 17:22:28 +010021struct ffa_value ffa_memory_send_continue(struct vm_locked from_locked,
22 void *fragment,
23 uint32_t fragment_length,
24 ffa_memory_handle_t handle,
25 struct mpool *page_pool);
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010026struct ffa_value ffa_memory_retrieve(struct vm_locked to_locked,
27 struct ffa_memory_region *retrieve_request,
Andrew Walbran130a8ae2020-05-15 16:27:15 +010028 uint32_t retrieve_request_length,
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010029 struct mpool *page_pool);
Andrew Walbranca808b12020-05-15 17:22:28 +010030struct ffa_value ffa_memory_retrieve_continue(struct vm_locked to_locked,
31 ffa_memory_handle_t handle,
32 uint32_t fragment_offset,
J-Alves59ed0042022-07-28 18:26:41 +010033 ffa_vm_id_t sender_vm_id,
Andrew Walbranca808b12020-05-15 17:22:28 +010034 struct mpool *page_pool);
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010035struct ffa_value ffa_memory_relinquish(
36 struct vm_locked from_locked,
37 struct ffa_mem_relinquish *relinquish_request, struct mpool *page_pool);
38struct ffa_value ffa_memory_reclaim(struct vm_locked to_locked,
Andrew Walbranca808b12020-05-15 17:22:28 +010039 ffa_memory_handle_t handle,
40 ffa_memory_region_flags_t flags,
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010041 struct mpool *page_pool);