SPM: Add fault injection protection support in Library model

Create a reference implementation of fault injection protection in
Library model SPM initialization.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Co-authorized-by: David Hu <david.hu@arm.com>
Change-Id: Ifa4a83bfb9a43de785cee27a13a783a52cf47c7c
diff --git a/secure_fw/spm/ffm/utilities.c b/secure_fw/spm/ffm/utilities.c
index 98a3e19..e3f3697 100644
--- a/secure_fw/spm/ffm/utilities.c
+++ b/secure_fw/spm/ffm/utilities.c
@@ -1,15 +1,18 @@
 /*
- * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
  */
 #include <inttypes.h>
+#include "fih.h"
 #include "utilities.h"
 #include "tfm_hal_platform.h"
 
 void tfm_core_panic(void)
 {
+    fih_delay();
+
     /*
      * FixMe: In the first stage, the SPM will restart the entire system when a
      * programmer error is detected in either the SPE or NSPE.
@@ -19,4 +22,10 @@
      * functionality for terminating an execution context.
      */
     tfm_hal_system_reset();
+
+#ifdef TFM_FIH_PROFILE_ON
+    fih_delay();
+
+    tfm_hal_system_reset();
+#endif
 }