blob: 97159188ae5873525c7ae3ba74a56c79b96a7015 [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
Andrew Walbran1a86aa92020-05-15 17:22:28 +010024struct ffa_value ffa_memory_send(struct vm_locked from_locked,
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010025 struct ffa_memory_region *memory_region,
Andrew Walbran130a8ae2020-05-15 16:27:15 +010026 uint32_t memory_share_length,
Andrew Walbran1a86aa92020-05-15 17:22:28 +010027 uint32_t fragment_length, uint32_t share_func,
28 struct mpool *page_pool);
29struct ffa_value ffa_memory_tee_send(
30 struct vm_locked from_locked, struct vm_locked to_locked,
31 struct ffa_memory_region *memory_region, uint32_t memory_share_length,
32 uint32_t fragment_length, uint32_t share_func, struct mpool *page_pool);
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010033struct ffa_value ffa_memory_retrieve(struct vm_locked to_locked,
34 struct ffa_memory_region *retrieve_request,
Andrew Walbran130a8ae2020-05-15 16:27:15 +010035 uint32_t retrieve_request_length,
Andrew Walbranb5ab43c2020-04-30 11:32:54 +010036 struct mpool *page_pool);
37struct ffa_value ffa_memory_relinquish(
38 struct vm_locked from_locked,
39 struct ffa_mem_relinquish *relinquish_request, struct mpool *page_pool);
40struct ffa_value ffa_memory_reclaim(struct vm_locked to_locked,
41 ffa_memory_handle_t handle, bool clear,
42 struct mpool *page_pool);
43struct ffa_value ffa_memory_tee_reclaim(struct vm_locked to_locked,
44 ffa_memory_handle_t handle,
45 struct ffa_memory_region *memory_region,
46 bool clear, struct mpool *page_pool);