blob: c423748ad1c0c6c6d9c2350e518095670dd194af [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"
J-Alvesc003a7a2021-03-18 13:06:53 +000013#include "hf/vm.h"
Daniel Boulbyb2fb80e2021-02-03 15:09:23 +000014
Daniel Boulby87b2dc82021-08-04 14:07:43 +010015struct ffa_value arch_ffa_features(uint32_t function_id)
16{
17 (void)function_id;
18 return ffa_error(FFA_NOT_SUPPORTED);
19}
20
Daniel Boulbyb2fb80e2021-02-03 15:09:23 +000021ffa_vm_id_t arch_ffa_spmc_id_get(void)
22{
23 return HF_SPMC_VM_ID;
24}
Olivier Deprez55a189e2021-06-09 15:45:27 +020025
26void plat_ffa_log_init(void)
27{
28}
29
30bool plat_ffa_is_direct_request_valid(struct vcpu *current,
31 ffa_vm_id_t sender_vm_id,
32 ffa_vm_id_t receiver_vm_id)
33{
34 (void)current;
35 (void)sender_vm_id;
36 (void)receiver_vm_id;
37
38 return true;
39}
40
41bool plat_ffa_is_direct_response_valid(struct vcpu *current,
42 ffa_vm_id_t sender_vm_id,
43 ffa_vm_id_t receiver_vm_id)
44{
45 (void)current;
46 (void)sender_vm_id;
47 (void)receiver_vm_id;
48
49 return true;
50}
51
Raghu Krishnamurthy62f97a72021-07-27 02:14:59 -070052bool plat_ffa_run_forward(ffa_vm_id_t vm_id, ffa_vcpu_index_t vcpu_idx,
53 struct ffa_value *ret)
54{
55 (void)vm_id;
56 (void)vcpu_idx;
57 (void)ret;
58
59 return false;
60}
61
Olivier Deprez55a189e2021-06-09 15:45:27 +020062bool plat_ffa_direct_request_forward(ffa_vm_id_t receiver_vm_id,
63 struct ffa_value args,
64 struct ffa_value *ret)
65{
66 (void)receiver_vm_id;
67 (void)args;
68 (void)ret;
69 return false;
70}
71
72ffa_memory_handle_t plat_ffa_memory_handle_make(uint64_t index)
73{
74 return index;
75}
76
77bool plat_ffa_memory_handle_allocated_by_current_world(
78 ffa_memory_handle_t handle)
79{
80 (void)handle;
81 return false;
82}
Maksims Svecovsb596eab2021-04-27 00:52:27 +010083
J-Alvesc003a7a2021-03-18 13:06:53 +000084bool plat_ffa_is_notifications_bind_valid(struct vcpu *current,
85 ffa_vm_id_t sender_id,
86 ffa_vm_id_t receiver_id)
87{
88 (void)current;
89 (void)sender_id;
90 (void)receiver_id;
91 return false;
92}
93
Maksims Svecovsb596eab2021-04-27 00:52:27 +010094ffa_partition_properties_t plat_ffa_partition_properties(
95 ffa_vm_id_t current_id, const struct vm *target)
96{
97 (void)current_id;
98 (void)target;
99 return 0;
100}
Maksims Svecovs9ddf86a2021-05-06 17:17:21 +0100101
102bool plat_ffa_vm_managed_exit_supported(struct vm *vm)
103{
104 (void)vm;
105 return false;
106}
J-Alvesa0f317d2021-06-09 13:31:59 +0100107
108bool plat_ffa_is_notifications_create_valid(struct vcpu *current,
109 ffa_vm_id_t vm_id)
110{
111 (void)current;
112 (void)vm_id;
113
114 return false;
115}
116
117struct ffa_value plat_ffa_notifications_bitmap_create(
118 ffa_vm_id_t vm_id, ffa_vcpu_count_t vcpu_count)
119{
120 (void)vm_id;
121 (void)vcpu_count;
122
123 return ffa_error(FFA_NOT_SUPPORTED);
124}
125
126struct ffa_value plat_ffa_notifications_bitmap_destroy(ffa_vm_id_t vm_id)
127{
128 (void)vm_id;
129
130 return ffa_error(FFA_NOT_SUPPORTED);
131}
J-Alvesc003a7a2021-03-18 13:06:53 +0000132
133struct vm_locked plat_ffa_vm_find_locked(ffa_vm_id_t vm_id)
134{
135 (void)vm_id;
136 return (struct vm_locked){.vm = NULL};
137}
138
139bool plat_ffa_is_vm_id(ffa_vm_id_t vm_id)
140{
141 (void)vm_id;
142 return false;
143}