blob: 30be4d8c88b199756897659ccfcc8614439175f1 [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,
Andrew Walbran130a8ae2020-05-15 16:27:15 +010026 uint32_t memory_share_length,
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010027 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,
Andrew Walbran130a8ae2020-05-15 16:27:15 +010030 uint32_t retrieve_request_length,
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010031 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);