Core: Make initial debug config platform-specific

This patch defines a platform abstraction layer for the initial debug
configuration, which needs to be implemented per each platform,
and executed in tfm_core.c, as an extra step in the tfm_core_init
function.

Change-Id: I27bdbe35b47e3124f7176a931f1895bd06187dc4
Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index d3505b8..a33c1fb 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -87,6 +87,18 @@
  */

 void tfm_spm_hal_configure_default_isolation(

                  const struct tfm_spm_partition_platform_data_t *platform_data);

+/**

+ * \brief Configures the system debug properties.

+ *        The default configuration of this function should disable secure debug

+ *        when either DAUTH_NONE or DAUTH_NS_ONLY define is set. It is up to the

+ *        platform owner to decide if secure debug can be turned on in their

+ *        system, if DAUTH_FULL define is present.

+ *        The DAUTH_CHIP_DEFAULT define should not be considered a safe default

+ *        option unless explicitly noted by the chip vendor.

+ *        The implementation has to expect that one of those defines is going to

+ *        be set. Otherwise, a compile error needs to be triggered.

+ */

+void tfm_spm_hal_init_debug(void);

 

 /**

  * \brief Enables the fault handlers

@@ -97,7 +109,7 @@
  * \brief Configures the system reset request properties
  */
 void system_reset_cfg(void);
-
+

 /**
  * \brief Configures all external interrupts to target the

  *        NS state, apart for the ones associated to secure