blob: 7b61f0bae4efc4464a7c8ed0ea27f8fd082e26c9 [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
46bool plat_ffa_direct_request_forward(ffa_vm_id_t receiver_vm_id,
47 struct ffa_value args,
48 struct ffa_value *ret)
49{
50 (void)receiver_vm_id;
51 (void)args;
52 (void)ret;
53 return false;
54}
55
56ffa_memory_handle_t plat_ffa_memory_handle_make(uint64_t index)
57{
58 return index;
59}
60
61bool plat_ffa_memory_handle_allocated_by_current_world(
62 ffa_memory_handle_t handle)
63{
64 (void)handle;
65 return false;
66}
Maksims Svecovsb596eab2021-04-27 00:52:27 +010067
J-Alvesc003a7a2021-03-18 13:06:53 +000068bool plat_ffa_is_notifications_bind_valid(struct vcpu *current,
69 ffa_vm_id_t sender_id,
70 ffa_vm_id_t receiver_id)
71{
72 (void)current;
73 (void)sender_id;
74 (void)receiver_id;
75 return false;
76}
77
Maksims Svecovsb596eab2021-04-27 00:52:27 +010078ffa_partition_properties_t plat_ffa_partition_properties(
79 ffa_vm_id_t current_id, const struct vm *target)
80{
81 (void)current_id;
82 (void)target;
83 return 0;
84}
Maksims Svecovs9ddf86a2021-05-06 17:17:21 +010085
86bool plat_ffa_vm_managed_exit_supported(struct vm *vm)
87{
88 (void)vm;
89 return false;
90}
J-Alvesa0f317d2021-06-09 13:31:59 +010091
92bool plat_ffa_is_notifications_create_valid(struct vcpu *current,
93 ffa_vm_id_t vm_id)
94{
95 (void)current;
96 (void)vm_id;
97
98 return false;
99}
100
101struct ffa_value plat_ffa_notifications_bitmap_create(
102 ffa_vm_id_t vm_id, ffa_vcpu_count_t vcpu_count)
103{
104 (void)vm_id;
105 (void)vcpu_count;
106
107 return ffa_error(FFA_NOT_SUPPORTED);
108}
109
110struct ffa_value plat_ffa_notifications_bitmap_destroy(ffa_vm_id_t vm_id)
111{
112 (void)vm_id;
113
114 return ffa_error(FFA_NOT_SUPPORTED);
115}
J-Alvesc003a7a2021-03-18 13:06:53 +0000116
117struct vm_locked plat_ffa_vm_find_locked(ffa_vm_id_t vm_id)
118{
119 (void)vm_id;
120 return (struct vm_locked){.vm = NULL};
121}
122
123bool plat_ffa_is_vm_id(ffa_vm_id_t vm_id)
124{
125 (void)vm_id;
126 return false;
127}