SPM: Add First-Level Interrupt Handling implementation

Change-Id: I5cc6d63f9864c5ea35e7a5236a736799d727855e
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/secure_fw/spm/cmsis_psa/tfm_thread.h b/secure_fw/spm/cmsis_psa/tfm_thread.h
index 3841f94..76a274f 100644
--- a/secure_fw/spm/cmsis_psa/tfm_thread.h
+++ b/secure_fw/spm/cmsis_psa/tfm_thread.h
@@ -45,6 +45,7 @@
     void            *param;             /* entry parameter              */
     uintptr_t       stk_btm;            /* stack bottom (lower address) */
     uintptr_t       stk_top;            /* stack top    (higher address)*/
+    uintptr_t       flih_ctx;           /* FLIH context pointer         */
     uint32_t        prior;              /* priority                     */
     uint32_t        state;              /* state                        */
 
@@ -175,6 +176,18 @@
 struct tfm_core_thread_t *tfm_core_thrd_get_curr(void);
 
 /*
+ * Set the current running thread
+ * Note:
+ *  This API is intended to update the current thread in FLIH handling.
+ *  So that in nested FLIH interrupts, the handler knows which isolation
+ *  boundary was preempted.
+ *  Although the CURR_THRD is updated, it does not mean the running Partition
+ *  thread is changed. It could also be the FLIH function which runs with the
+ *  same isolation boundary of the CURR_THRD.
+ */
+void tfm_core_thrd_set_curr(struct tfm_core_thread_t *pth);
+
+/*
  * Get next thread to run in list.
  *
  * Return :