SPM: Add a "connection_based" flag for service

Add a "connection_based" flag in service static data to
indicate whether a service is stateless. The flag is
valid only when the FF-M version greater than 1.0.

Change-Id: I18210e93f7709fbdc2bfdf026f7d739a683183d5
Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
diff --git a/secure_fw/partitions/tfm_service_list.inc.template b/secure_fw/partitions/tfm_service_list.inc.template
index e2e3f8d..0816d2f 100644
--- a/secure_fw/partitions/tfm_service_list.inc.template
+++ b/secure_fw/partitions/tfm_service_list.inc.template
@@ -37,6 +37,11 @@
             {% else %}
         .non_secure_client = false,
             {% endif %}
+            {% if partition.manifest.psa_framework_version > 1.0 and service.connection_based is sameas false %}
+        .connection_based = false,
+            {% else %}
+        .connection_based = true,
+            {% endif %}
             {% if service.version %}
         .version = {{service.version}},
             {% else %}
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.h b/secure_fw/spm/cmsis_psa/spm_ipc.h
index 1a1c1ea..188420e 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.h
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.h
@@ -123,6 +123,7 @@
     psa_signal_t signal;            /* Service signal                        */
     uint32_t sid;                   /* Service identifier                    */
     bool non_secure_client;         /* If can be called by non secure client */
+    bool connection_based;          /* 'true' for connection-based service   */
     uint32_t version;               /* Service version                       */
     uint32_t version_policy;        /* Service version policy                */
 };