blob: 5a5a13b22949b758d732f9b35872b93f0d57aa3d [file] [log] [blame]
Daniel Boulbyb2fb80e2021-02-03 15:09:23 +00001/*
2 * Copyright 2021 The Hafnium Authors.
3 *
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.
7 */
8
9#include "hf/ffa.h"
10
J-Alvesa0f317d2021-06-09 13:31:59 +010011#include "hf/ffa_internal.h"
Olivier Deprez55a189e2021-06-09 15:45:27 +020012#include "hf/vcpu.h"
Daniel Boulbyb2fb80e2021-02-03 15:09:23 +000013
14ffa_vm_id_t arch_ffa_spmc_id_get(void)
15{
16 return HF_SPMC_VM_ID;
17}
Olivier Deprez55a189e2021-06-09 15:45:27 +020018
19void plat_ffa_log_init(void)
20{
21}
22
23bool plat_ffa_is_direct_request_valid(struct vcpu *current,
24 ffa_vm_id_t sender_vm_id,
25 ffa_vm_id_t receiver_vm_id)
26{
27 (void)current;
28 (void)sender_vm_id;
29 (void)receiver_vm_id;
30
31 return true;
32}
33
34bool plat_ffa_is_direct_response_valid(struct vcpu *current,
35 ffa_vm_id_t sender_vm_id,
36 ffa_vm_id_t receiver_vm_id)
37{
38 (void)current;
39 (void)sender_vm_id;
40 (void)receiver_vm_id;
41
42 return true;
43}
44
45bool plat_ffa_direct_request_forward(ffa_vm_id_t receiver_vm_id,
46 struct ffa_value args,
47 struct ffa_value *ret)
48{
49 (void)receiver_vm_id;
50 (void)args;
51 (void)ret;
52 return false;
53}
54
55ffa_memory_handle_t plat_ffa_memory_handle_make(uint64_t index)
56{
57 return index;
58}
59
60bool plat_ffa_memory_handle_allocated_by_current_world(
61 ffa_memory_handle_t handle)
62{
63 (void)handle;
64 return false;
65}
Maksims Svecovsb596eab2021-04-27 00:52:27 +010066
67ffa_partition_properties_t plat_ffa_partition_properties(
68 ffa_vm_id_t current_id, const struct vm *target)
69{
70 (void)current_id;
71 (void)target;
72 return 0;
73}
Maksims Svecovs9ddf86a2021-05-06 17:17:21 +010074
75bool plat_ffa_vm_managed_exit_supported(struct vm *vm)
76{
77 (void)vm;
78 return false;
79}
J-Alvesa0f317d2021-06-09 13:31:59 +010080
81bool plat_ffa_is_notifications_create_valid(struct vcpu *current,
82 ffa_vm_id_t vm_id)
83{
84 (void)current;
85 (void)vm_id;
86
87 return false;
88}
89
90struct ffa_value plat_ffa_notifications_bitmap_create(
91 ffa_vm_id_t vm_id, ffa_vcpu_count_t vcpu_count)
92{
93 (void)vm_id;
94 (void)vcpu_count;
95
96 return ffa_error(FFA_NOT_SUPPORTED);
97}
98
99struct ffa_value plat_ffa_notifications_bitmap_destroy(ffa_vm_id_t vm_id)
100{
101 (void)vm_id;
102
103 return ffa_error(FFA_NOT_SUPPORTED);
104}