Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 The Hafnium Authors. |
| 3 | * |
Andrew Walbran | e959ec1 | 2020-06-17 15:01:09 +0100 | [diff] [blame^] | 4 | * 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 Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "hf/mpool.h" |
| 12 | #include "hf/vm.h" |
| 13 | |
| 14 | #include "vmapi/hf/ffa.h" |
| 15 | |
Andrew Walbran | 1a86aa9 | 2020-05-15 17:22:28 +0100 | [diff] [blame] | 16 | struct ffa_value ffa_memory_send(struct vm_locked from_locked, |
Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame] | 17 | struct ffa_memory_region *memory_region, |
Andrew Walbran | 130a8ae | 2020-05-15 16:27:15 +0100 | [diff] [blame] | 18 | uint32_t memory_share_length, |
Andrew Walbran | 1a86aa9 | 2020-05-15 17:22:28 +0100 | [diff] [blame] | 19 | uint32_t fragment_length, uint32_t share_func, |
| 20 | struct mpool *page_pool); |
| 21 | struct ffa_value ffa_memory_tee_send( |
| 22 | struct vm_locked from_locked, struct vm_locked to_locked, |
| 23 | struct ffa_memory_region *memory_region, uint32_t memory_share_length, |
| 24 | uint32_t fragment_length, uint32_t share_func, struct mpool *page_pool); |
Andrew Walbran | ca808b1 | 2020-05-15 17:22:28 +0100 | [diff] [blame] | 25 | struct ffa_value ffa_memory_send_continue(struct vm_locked from_locked, |
| 26 | void *fragment, |
| 27 | uint32_t fragment_length, |
| 28 | ffa_memory_handle_t handle, |
| 29 | struct mpool *page_pool); |
| 30 | struct ffa_value ffa_memory_tee_send_continue(struct vm_locked from_locked, |
| 31 | struct vm_locked to_locked, |
| 32 | void *fragment, |
| 33 | uint32_t fragment_length, |
| 34 | ffa_memory_handle_t handle, |
| 35 | struct mpool *page_pool); |
Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame] | 36 | struct ffa_value ffa_memory_retrieve(struct vm_locked to_locked, |
| 37 | struct ffa_memory_region *retrieve_request, |
Andrew Walbran | 130a8ae | 2020-05-15 16:27:15 +0100 | [diff] [blame] | 38 | uint32_t retrieve_request_length, |
Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame] | 39 | struct mpool *page_pool); |
Andrew Walbran | ca808b1 | 2020-05-15 17:22:28 +0100 | [diff] [blame] | 40 | struct ffa_value ffa_memory_retrieve_continue(struct vm_locked to_locked, |
| 41 | ffa_memory_handle_t handle, |
| 42 | uint32_t fragment_offset, |
| 43 | struct mpool *page_pool); |
Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame] | 44 | struct ffa_value ffa_memory_relinquish( |
| 45 | struct vm_locked from_locked, |
| 46 | struct ffa_mem_relinquish *relinquish_request, struct mpool *page_pool); |
| 47 | struct ffa_value ffa_memory_reclaim(struct vm_locked to_locked, |
Andrew Walbran | ca808b1 | 2020-05-15 17:22:28 +0100 | [diff] [blame] | 48 | ffa_memory_handle_t handle, |
| 49 | ffa_memory_region_flags_t flags, |
Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame] | 50 | struct mpool *page_pool); |
| 51 | struct ffa_value ffa_memory_tee_reclaim(struct vm_locked to_locked, |
Andrew Walbran | ca808b1 | 2020-05-15 17:22:28 +0100 | [diff] [blame] | 52 | struct vm_locked from_locked, |
Andrew Walbran | b5ab43c | 2020-04-30 11:32:54 +0100 | [diff] [blame] | 53 | ffa_memory_handle_t handle, |
Andrew Walbran | ca808b1 | 2020-05-15 17:22:28 +0100 | [diff] [blame] | 54 | ffa_memory_region_flags_t flags, |
| 55 | struct mpool *page_pool); |