feat: allow FFA_RUN as return from Waiting state

FF-A v1.1 EAC0 Figure 7.1 depicts an endpoint in Waiting state can
enter the runtime model for FFA_RUN through the ERET conduit.
This change adds this case to the cactus main loop.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I655ac0a7240bcfd25932e1a4cf51c331baceaf47
diff --git a/spm/cactus/cactus_main.c b/spm/cactus/cactus_main.c
index f610a3f..5a274f6 100644
--- a/spm/cactus/cactus_main.c
+++ b/spm/cactus/cactus_main.c
@@ -70,19 +70,24 @@
 
 		if (ffa_func_id(ffa_ret) != FFA_MSG_SEND_DIRECT_REQ_SMC32 &&
 		    ffa_func_id(ffa_ret) != FFA_MSG_SEND_DIRECT_REQ_SMC64 &&
-		    ffa_func_id(ffa_ret) != FFA_INTERRUPT) {
+		    ffa_func_id(ffa_ret) != FFA_INTERRUPT &&
+		    ffa_func_id(ffa_ret) != FFA_RUN) {
 			ERROR("%s(%u) unknown func id 0x%x\n",
 				__func__, vm_id, ffa_func_id(ffa_ret));
 			break;
 		}
 
-		if (ffa_func_id(ffa_ret) == FFA_INTERRUPT) {
+		if ((ffa_func_id(ffa_ret) == FFA_INTERRUPT) ||
+		    (ffa_func_id(ffa_ret) == FFA_RUN)) {
 			/*
 			 * Received FFA_INTERRUPT in waiting state.
 			 * The interrupt id is passed although this is just
 			 * informational as we're running with virtual
 			 * interrupts unmasked and the interrupt is processed
 			 * by the interrupt handler.
+			 *
+			 * Received FFA_RUN in waiting state, the endpoint
+			 * simply returns by FFA_MSG_WAIT.
 			 */
 			ffa_ret = ffa_msg_wait();
 			continue;