refactor: implementation of HF_MAILBOX_*_GET interfaces
The interfaces HF_MAILBOX_WRITABLE_GET and HF_MAILBOX_WAITER_GET
are to accompany the FF-A v1.0 indirect message implementation.
This functionality is not used in the context of the SPMC,
hence factoring it out of common source files to SPMC
and hypervisor. This is now place in an hypervisor-specific
file.
Change-Id: I81332c286ad8a48fbe9a2425023d94ed7520fee8
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index 83c59c1..31ccc83 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -591,6 +591,7 @@
case FFA_MSG_WAIT_32:
*args = api_ffa_msg_wait(current, next, args);
return true;
+#if SECURE_WORLD == 0
case FFA_MSG_POLL_32: {
struct vcpu_locked current_locked;
@@ -599,6 +600,7 @@
vcpu_unlock(¤t_locked);
return true;
}
+#endif
case FFA_RUN_32:
*args = api_ffa_run(ffa_vm_id(*args), ffa_vcpu_index(*args),
current, next);
@@ -1035,14 +1037,15 @@
}
switch (args.func) {
+#if SECURE_WORLD == 0
case HF_MAILBOX_WRITABLE_GET:
- vcpu->regs.r[0] = api_mailbox_writable_get(vcpu);
+ vcpu->regs.r[0] = plat_ffa_mailbox_writable_get(vcpu);
break;
case HF_MAILBOX_WAITER_GET:
- vcpu->regs.r[0] = api_mailbox_waiter_get(args.arg1, vcpu);
+ vcpu->regs.r[0] = plat_ffa_mailbox_waiter_get(args.arg1, vcpu);
break;
-
+#endif
case HF_INTERRUPT_ENABLE:
vcpu->regs.r[0] = api_interrupt_enable(args.arg1, args.arg2,
args.arg3, vcpu);