blob: d372636662cc102e3261ba0a6c514eb7fab49624 [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
15ffa_vm_id_t arch_ffa_spmc_id_get(void)
16{
17 return HF_SPMC_VM_ID;
18}
Olivier Deprez55a189e2021-06-09 15:45:27 +020019
20void plat_ffa_log_init(void)
21{
22}
23
24bool plat_ffa_is_direct_request_valid(struct vcpu *current,
25 ffa_vm_id_t sender_vm_id,
26 ffa_vm_id_t receiver_vm_id)
27{
28 (void)current;
29 (void)sender_vm_id;
30 (void)receiver_vm_id;
31
32 return true;
33}
34
35bool plat_ffa_is_direct_response_valid(struct vcpu *current,
36 ffa_vm_id_t sender_vm_id,
37 ffa_vm_id_t receiver_vm_id)
38{
39 (void)current;
40 (void)sender_vm_id;
41 (void)receiver_vm_id;
42
43 return true;
44}
45
Raghu Krishnamurthy62f97a72021-07-27 02:14:59 -070046bool plat_ffa_run_forward(ffa_vm_id_t vm_id, ffa_vcpu_index_t vcpu_idx,
47 struct ffa_value *ret)
48{
49 (void)vm_id;
50 (void)vcpu_idx;
51 (void)ret;
52
53 return false;
54}
55
Olivier Deprez55a189e2021-06-09 15:45:27 +020056bool plat_ffa_direct_request_forward(ffa_vm_id_t receiver_vm_id,
57 struct ffa_value args,
58 struct ffa_value *ret)
59{
60 (void)receiver_vm_id;
61 (void)args;
62 (void)ret;
63 return false;
64}
65
66ffa_memory_handle_t plat_ffa_memory_handle_make(uint64_t index)
67{
68 return index;
69}
70
71bool plat_ffa_memory_handle_allocated_by_current_world(
72 ffa_memory_handle_t handle)
73{
74 (void)handle;
75 return false;
76}
Maksims Svecovsb596eab2021-04-27 00:52:27 +010077
J-Alvesc003a7a2021-03-18 13:06:53 +000078bool plat_ffa_is_notifications_bind_valid(struct vcpu *current,
79 ffa_vm_id_t sender_id,
80 ffa_vm_id_t receiver_id)
81{
82 (void)current;
83 (void)sender_id;
84 (void)receiver_id;
85 return false;
86}
87
Maksims Svecovsb596eab2021-04-27 00:52:27 +010088ffa_partition_properties_t plat_ffa_partition_properties(
89 ffa_vm_id_t current_id, const struct vm *target)
90{
91 (void)current_id;
92 (void)target;
93 return 0;
94}
Maksims Svecovs9ddf86a2021-05-06 17:17:21 +010095
96bool plat_ffa_vm_managed_exit_supported(struct vm *vm)
97{
98 (void)vm;
99 return false;
100}
J-Alvesa0f317d2021-06-09 13:31:59 +0100101
102bool plat_ffa_is_notifications_create_valid(struct vcpu *current,
103 ffa_vm_id_t vm_id)
104{
105 (void)current;
106 (void)vm_id;
107
108 return false;
109}
110
111struct ffa_value plat_ffa_notifications_bitmap_create(
112 ffa_vm_id_t vm_id, ffa_vcpu_count_t vcpu_count)
113{
114 (void)vm_id;
115 (void)vcpu_count;
116
117 return ffa_error(FFA_NOT_SUPPORTED);
118}
119
120struct ffa_value plat_ffa_notifications_bitmap_destroy(ffa_vm_id_t vm_id)
121{
122 (void)vm_id;
123
124 return ffa_error(FFA_NOT_SUPPORTED);
125}
J-Alvesc003a7a2021-03-18 13:06:53 +0000126
127struct vm_locked plat_ffa_vm_find_locked(ffa_vm_id_t vm_id)
128{
129 (void)vm_id;
130 return (struct vm_locked){.vm = NULL};
131}
132
133bool plat_ffa_is_vm_id(ffa_vm_id_t vm_id)
134{
135 (void)vm_id;
136 return false;
137}