Core: Clear FP status before SPM initialization

Float point (FP) is forbidden during SPM initialization, clear it
before handler mode SPM initialization. And return the generic
EXC_RETURN for subsequent thread scheduling.

The usage of FP is still valid before SPM initialization and
the subsequent thread execution, just do not happen during SPM
initialization.

Change-Id: I48d7bd0f140cb1c933cdd621d598446cb81eaee3
Signed-off-by: Ken Liu <ken.liu@arm.com>
diff --git a/secure_fw/spm/spm_api_ipc.c b/secure_fw/spm/spm_api_ipc.c
index dc27023..38ab043 100644
--- a/secure_fw/spm/spm_api_ipc.c
+++ b/secure_fw/spm/spm_api_ipc.c
@@ -510,7 +510,7 @@
 
 /********************** SPM functions for thread mode ************************/
 
-void tfm_spm_init(void)
+uint32_t tfm_spm_init(void)
 {
     uint32_t i, j, num;
     struct spm_partition_desc_t *partition;
@@ -615,6 +615,8 @@
      * the scheduler that the current thread is non-secure entry thread.
      */
     tfm_thrd_start_scheduler(p_ns_entry_thread);
+
+    return p_ns_entry_thread->state_ctx.ctxb.lr;
 }
 
 void tfm_pendsv_do_schedule(struct tfm_state_context_ext *ctxb)