SPM: Fix SP log for SFN backend

Change-Id: I7c6ee09135d90c14440f2c3c373ad54972bdeae9
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c b/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
index 8ee8621..91b8a95 100644
--- a/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
+++ b/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
@@ -114,11 +114,6 @@
         break;
 #endif
 #endif /* CONFIG_TFM_FLIH_API == 1 || CONFIG_TFM_SLIH_API == 1 */
-
-#if TFM_SP_LOG_RAW_ENABLED
-    case TFM_SVC_OUTPUT_UNPRIV_STRING:
-        return tfm_hal_output_spm_log((const char *)ctx[0], ctx[1]);
-#endif
     default:
 #ifdef PLATFORM_SVC_HANDLERS
         return (platform_svc_handlers(svc_num, ctx, lr));
@@ -188,6 +183,12 @@
                                             (struct context_flih_ret_t *)msp);
         break;
 #endif
+#if TFM_SP_LOG_RAW_ENABLED
+    case TFM_SVC_OUTPUT_UNPRIV_STRING:
+        svc_args[0] = tfm_hal_output_spm_log((const char *)svc_args[0],
+                                             svc_args[1]);
+        break;
+#endif
     default:
 #if CONFIG_TFM_SPM_BACKEND_IPC == 1
         if (((uint32_t)&REGION_NAME(Image$$, ARM_LIB_STACK, $$ZI$$Limit)