refactor(interrupts): cleanup secure interrupt handling code

This patch ensures most of the secure interrupt handling is limited
to the plat/ffa/spmc.c module.

Change-Id: I0a58c709bca56e5fa9c97983e2f5270052be3a8f
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
diff --git a/src/api.c b/src/api.c
index b1ae667..b232a1a 100644
--- a/src/api.c
+++ b/src/api.c
@@ -684,6 +684,24 @@
 	}
 }
 
+struct ffa_value api_ffa_msg_wait(struct vcpu *current, struct vcpu **next,
+				  struct ffa_value *args)
+{
+	struct ffa_value ret;
+
+	if (args->arg1 != 0U || args->arg2 != 0U || args->arg3 != 0U ||
+	    args->arg4 != 0U || args->arg5 != 0U || args->arg6 != 0U ||
+	    args->arg7 != 0U) {
+		return ffa_error(FFA_INVALID_PARAMETERS);
+	}
+
+	if (plat_ffa_msg_wait_prepare(current, next, &ret)) {
+		return ret;
+	}
+
+	return api_ffa_msg_recv(true, current, next);
+}
+
 /**
  * Prepares the vCPU to run by updating its state and fetching whether a return
  * value needs to be forced onto the vCPU.