From 4e571e426a41d0a5297854bd8bf303a2b8be66f1 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Tue, 3 Apr 2012 12:53:58 -0700 Subject: tf_driver: integrate latest TL release: Tegra 2 version: TF_TEGRA2_AA01.09.34784 Tegra 3 version: TF_TEGRA3_AB01.08.34931 Add dynamic support for UART used by the Secure World trace driver. The files are from the Tegra 3 version of SDK. Bug 960201. Change-Id: I14c3cfc35f81d3a37981e82760c2a2259164a904 Signed-off-by: Marvin Zhang Reviewed-on: http://git-master/r/94306 (cherry picked from commit 173b55aa4d30fc3771719093d675972fca600cd3) Reviewed-on: http://git-master/r/104037 Reviewed-by: Chris Johnson Reviewed-by: Karan Jhavar Tested-by: Karan Jhavar Reviewed-by: Yu-Huan Hsu GVS: Gerrit_Virtual_Submit --- security/tf_driver/tf_comm_tz.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'security/tf_driver/tf_comm_tz.c') 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; } -- cgit v1.2.3