summaryrefslogtreecommitdiff
path: root/security/tf_driver/tf_comm_tz.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tf_driver/tf_comm_tz.c')
-rw-r--r--security/tf_driver/tf_comm_tz.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/security/tf_driver/tf_comm_tz.c b/security/tf_driver/tf_comm_tz.c
index 4c89de84accf..4628f24f3cf2 100644
--- a/security/tf_driver/tf_comm_tz.c
+++ b/security/tf_driver/tf_comm_tz.c
@@ -194,6 +194,20 @@ static inline void tf_smc_nyield(void)
tf_smc_generic_call(&generic_smc);
}
+#ifdef CONFIG_SECURE_TRACES
+static void tf_print_secure_traces(struct tf_comm *comm)
+{
+ spin_lock(&(comm->lock));
+ if (comm->l1_buffer->traces_status != 0) {
+ if (comm->l1_buffer->traces_status > 1)
+ pr_info("TF : traces lost...\n");
+ pr_info("TF : %s", comm->l1_buffer->traces_buffer);
+ comm->l1_buffer->traces_status = 0;
+ }
+ spin_unlock(&(comm->lock));
+}
+#endif
+
/* Yields the Secure World */
int tf_schedule_secure_world(struct tf_comm *comm)
{
@@ -202,6 +216,10 @@ int tf_schedule_secure_world(struct tf_comm *comm)
/* yield to the Secure World */
tf_smc_nyield();
+#ifdef CONFIG_SECURE_TRACES
+ tf_print_secure_traces(comm);
+#endif
+
return 0;
}