fix: in case the mailbox is FULL return FFA_RUN
The FFA_RUN interface will return back to the caller
if the target SP is in waiting state with no operations
to do.
FFA_MSG_WAIT has the ability to let the SP go back to
waiting whilst retaining the ownership of the RX buffer.
So in case the RX buffer state is FULL, let the FFA_RUN
interface resume the SP with eret FFA_RUN.
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I9c8eaad8001ff53599bd84d55c47b490a861433b
diff --git a/src/api.c b/src/api.c
index 603f2ac..974e507 100644
--- a/src/api.c
+++ b/src/api.c
@@ -1025,7 +1025,7 @@
.arg1 = (receiver->mailbox.recv_sender << 16) |
receiver->id,
.arg3 = receiver->mailbox.recv_size};
- case FFA_MSG_SEND2_32:
+ default:
return (struct ffa_value){
.func = FFA_RUN_32,
/*
@@ -1035,11 +1035,6 @@
* other APIs (eg: FFA_NOTIFICATION_GET).
*/
.arg1 = receiver->id};
- default:
- /* This should never be reached, but return an error in case. */
- dlog_error("Tried to return an invalid message function %#x\n",
- receiver->mailbox.recv_func);
- return ffa_error(FFA_DENIED);
}
}