FF-A: implement direct messaging interface
Implement direct messaging ABI for message passing (PSA FF-A EAC spec
sections 4.4, 10.2, 10.3).
In this implementation only the primary VM is allowed to send direct
message requests to secondary VMs. Only secondary VMs are allowed to
reply with direct message responses. When a direct message request is
being serviced, a secondary VM is not allowed to call other FF-A ABIs
that may result in a vCPU switch (e.g. yield, indirect messaging).
A new vCPU field is introduced indicating if a direct message request is
on-going for the corresponding VM.
Per PSA FF-A v1.0, secondary VMs implement the same number of vCPUs as
the number of PEs. A direct message request arrives on the same vCPU
index as the originating vCPU index which emitted the request.
A direct message request sent from the primary VM or a direct message
response sent from a secondary VM blocks the corresponding vCPU.
Change-Id: Iae6f76d82e91253b6685b3d5fe0d087d3cf7e242
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/inc/hf/api.h b/inc/hf/api.h
index 6db4783..12ffa22 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -43,7 +43,7 @@
struct ffa_value api_ffa_rxtx_map(ipaddr_t send, ipaddr_t recv,
uint32_t page_count, struct vcpu *current,
struct vcpu **next);
-void api_yield(struct vcpu *current, struct vcpu **next);
+struct ffa_value api_yield(struct vcpu *current, struct vcpu **next);
struct ffa_value api_ffa_version(uint32_t requested_version);
struct ffa_value api_ffa_partition_info_get(struct vcpu *current,
const struct ffa_uuid *uuid);
@@ -70,3 +70,13 @@
uint32_t fragment_length,
ffa_vm_id_t sender_vm_id,
struct vcpu *current);
+struct ffa_value api_ffa_msg_send_direct_req(ffa_vm_id_t sender_vm_id,
+ ffa_vm_id_t receiver_vm_id,
+ struct ffa_value args,
+ struct vcpu *current,
+ struct vcpu **next);
+struct ffa_value api_ffa_msg_send_direct_resp(ffa_vm_id_t sender_vm_id,
+ ffa_vm_id_t receiver_vm_id,
+ struct ffa_value args,
+ struct vcpu *current,
+ struct vcpu **next);