Dualcpu: Add NS mailbox functions to handle reply in IRQ handler

Add tfm_ns_mailbox_fetch_reply_msg_isr() to fetch the handle of the
first replied mailbox message from NSPE mailbox queue in platform
inter-processor communication interrupt handler.
NS OS can get the handle of the waiting caller task by calling
tfm_ns_mailbox_get_msg_owner() and wake-up the caller task
according to the handle value.

Change-Id: Id86e0b23819cf8963831006fd037142d9efb4d9f
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/interface/include/tfm_mailbox.h b/interface/include/tfm_mailbox.h
index bb23b7a..76759aa 100644
--- a/interface/include/tfm_mailbox.h
+++ b/interface/include/tfm_mailbox.h
@@ -15,6 +15,7 @@
 #ifndef __TFM_MAILBOX_H__
 #define __TFM_MAILBOX_H__
 
+#include <stdbool.h>
 #include <stdint.h>
 #include <stddef.h>
 #include "psa/client.h"
@@ -108,9 +109,13 @@
 struct ns_mailbox_slot_t {
     struct mailbox_msg_t   msg;
     struct mailbox_reply_t reply;
-    const void             *owner;     /* Handle of the owner task of this
-                                        * slot
-                                        */
+    const void             *owner;          /* Handle of the owner task of this
+                                             * slot
+                                             */
+    bool                   is_woken;        /* Indicate that owner task has been
+                                             * or should be woken up, after the
+                                             * replied is received.
+                                             */
 };
 
 typedef uint32_t   mailbox_queue_status_t;