blob: c133f7661c77a78e8eb20270d41d83bc2a82d067 [file] [log] [blame]
Andrew Walbranb5ab43c2020-04-30 11:32:54 +01001/*
2 * Copyright 2019 The Hafnium Authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "hf/mpool.h"
20#include "hf/vm.h"
21
22#include "vmapi/hf/ffa.h"
23
24struct ffa_value ffa_memory_send(struct vm *to, struct vm_locked from_locked,
25 struct ffa_memory_region *memory_region,
26 uint32_t memory_share_size,
27 uint32_t share_func, struct mpool *page_pool);
28struct ffa_value ffa_memory_retrieve(struct vm_locked to_locked,
29 struct ffa_memory_region *retrieve_request,
30 uint32_t retrieve_request_size,
31 struct mpool *page_pool);
32struct ffa_value ffa_memory_relinquish(
33 struct vm_locked from_locked,
34 struct ffa_mem_relinquish *relinquish_request, struct mpool *page_pool);
35struct ffa_value ffa_memory_reclaim(struct vm_locked to_locked,
36 ffa_memory_handle_t handle, bool clear,
37 struct mpool *page_pool);
38struct ffa_value ffa_memory_tee_reclaim(struct vm_locked to_locked,
39 ffa_memory_handle_t handle,
40 struct ffa_memory_region *memory_region,
41 bool clear, struct mpool *page_pool);