diff options
author | Marvin Zhang <mzhang@nvidia.com> | 2012-04-03 12:53:58 -0700 |
---|---|---|
committer | Manish Tuteja <mtuteja@nvidia.com> | 2012-05-25 01:02:30 -0700 |
commit | f162a0b4c4a35da57e40c86cc7a8f812c7c43c11 (patch) | |
tree | 4883e95eb8848b1a8d75be7e2442094ff095085d /security | |
parent | 1d8b313be670f9375b68b1c2c1282b6c1313357c (diff) |
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.
Signed-off-by: Marvin Zhang <mzhang@nvidia.com>
Reviewed-on: http://git-master/r/94306
(cherry picked from commit 173b55aa4d30fc3771719093d675972fca600cd3)
Change-Id: I550aa92320f18f47885dc627849b03872be23e84
Reviewed-on: http://git-master/r/104689
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
Tested-by: Manish Tuteja <mtuteja@nvidia.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/tf_driver/Makefile | 2 | ||||
-rw-r--r-- | security/tf_driver/s_version.h | 4 | ||||
-rw-r--r-- | security/tf_driver/tf_comm_tz.c | 18 | ||||
-rw-r--r-- | security/tf_driver/tf_protocol.h | 4 |
4 files changed, 25 insertions, 3 deletions
diff --git a/security/tf_driver/Makefile b/security/tf_driver/Makefile index dfadb7d97406..5c48f626f5d8 100644 --- a/security/tf_driver/Makefile +++ b/security/tf_driver/Makefile @@ -21,7 +21,7 @@ # debug options #EXTRA_CFLAGS += -O0 -DDEBUG -D_DEBUG -DCONFIG_TF_DRIVER_DEBUG_SUPPORT EXTRA_CFLAGS += -DNDEBUG -EXTRA_CFLAGS += -DLINUX -DCONFIG_TF_TRUSTZONE -DCONFIG_TFN +EXTRA_CFLAGS += -DLINUX -DCONFIG_TF_TRUSTZONE -DCONFIG_TFN -DCONFIG_SECURE_TRACES ifdef S_VERSION_BUILD EXTRA_CFLAGS += -DS_VERSION_BUILD=$(S_VERSION_BUILD) diff --git a/security/tf_driver/s_version.h b/security/tf_driver/s_version.h index ba4d48c6f417..d812cdca75df 100644 --- a/security/tf_driver/s_version.h +++ b/security/tf_driver/s_version.h @@ -33,12 +33,12 @@ */ #define S_VERSION_OS "A" /* "A" for all Android */ -#define S_VERSION_PLATFORM "A" /* "A" for Tegra2 */ +#define S_VERSION_PLATFORM "B" /* "B" for Tegra3 */ /* * This version number must be updated for each new release */ -#define S_VERSION_MAIN "01.07" +#define S_VERSION_MAIN "01.08" /* * If this is a patch or engineering version use the following 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; } diff --git a/security/tf_driver/tf_protocol.h b/security/tf_driver/tf_protocol.h index 403df8ec8ef5..b264f04c4454 100644 --- a/security/tf_driver/tf_protocol.h +++ b/security/tf_driver/tf_protocol.h @@ -659,6 +659,10 @@ struct tf_l1_shared_buffer { #ifdef CONFIG_TF_ZEBRA u8 rpc_trace_buffer[140]; u8 rpc_cus_buffer[180]; + #elif CONFIG_SECURE_TRACES + u32 traces_status; + u8 traces_buffer[140]; + u8 reserved3[176]; #else u8 reserved3[320]; #endif |