SPM: Add SFN Partition support in IPC backend

In the IPC backend, the SFN Partitions are treated as if they were
IPC Partitions.

The execution model of SFN Partitions are very similiar to IPC ones.
They have a common thread loop to wait for signals and callback
the corresponding SFNs.

This patch:
- Makes member 'sfn' always available in the service load info.
- Assigns signals to SFN Partition in load info
- Adds metadata processing for SFN Partitions in IPC backend
- Adds a common thread function for SFN Partitions

Change-Id: I926f614ca6fbc7ab92afa51392743ccd5f7dc755
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/secure_fw/partitions/lib/sprt/sprt_main.c b/secure_fw/partitions/lib/sprt/sprt_main.c
index 7ca6039..55d6402 100644
--- a/secure_fw/partitions/lib/sprt/sprt_main.c
+++ b/secure_fw/partitions/lib/sprt/sprt_main.c
@@ -14,9 +14,21 @@
 #pragma required = meta_init_c
 #endif
 
+extern void common_sfn_thread(void);
+
 __used static uintptr_t runtime_init_c(void)
 {
-    return PART_METADATA()->entry;
+    struct runtime_metadata_t *p_rt_meta;
+
+    p_rt_meta = PART_METADATA();
+
+    if (p_rt_meta->n_sfn == 0) {
+        /* IPC Partition */
+        return p_rt_meta->entry;
+    } else {
+        /* SFN Partition */
+        return (uintptr_t)common_sfn_thread;
+    }
 }
 
 __naked void sprt_main(void)