summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorHyung Taek Ryoo <hryoo@nvidia.com>2013-02-19 13:45:53 -0800
committerSimone Willett <swillett@nvidia.com>2013-04-22 15:07:42 -0700
commita723349c9fe6cda48fe72b0eb61acee30f035c75 (patch)
treec03c4f8dd2f76839fd3a64f93b2662766fcf8523 /security
parent48e77540489b412eef56efb9782957bc34adb1e5 (diff)
security: tf_driver: integrate latest TL release
Tegra4 version: TF_TEGRA4_AC02.06.40323 Added support of secure interrupts in the custom drivers. Bug 969938 Change-Id: Ic08d0a9c73cf6ab2f147bf89377c306fbe58fd2a Signed-off-by: Hyung Taek Ryoo <hryoo@nvidia.com> Reviewed-on: http://git-master/r/202154 (cherry picked from commit fd6034d233f615f0a442ddc2cde1f0363e4571c6) Reviewed-on: http://git-master/r/221140 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Tested-by: Sang-Hun Lee <sanlee@nvidia.com> Reviewed-by: Ankit Pashiney <apashiney@nvidia.com>
Diffstat (limited to 'security')
-rw-r--r--security/tf_driver/s_version.h6
-rw-r--r--security/tf_driver/tf_comm_tz.c29
-rw-r--r--security/tf_driver/tf_device.c13
3 files changed, 22 insertions, 26 deletions
diff --git a/security/tf_driver/s_version.h b/security/tf_driver/s_version.h
index f0664eb734a0..89356a9e5483 100644
--- a/security/tf_driver/s_version.h
+++ b/security/tf_driver/s_version.h
@@ -1,7 +1,9 @@
-/*
+/**
* Copyright (c) 2011 Trusted Logic S.A.
* All Rights Reserved.
*
+ * Copyright (C) 2011-2013 NVIDIA Corporation.
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
@@ -59,7 +61,7 @@
#elif defined(CONFIG_ARCH_TEGRA_11x_SOC)
#define S_VERSION_OS "A" /* "A" for all Android */
#define S_VERSION_PLATFORM "C"
-#define S_VERSION_MAIN "02.05"
+#define S_VERSION_MAIN "02.06"
#define S_VERSION_ENG 0
#define S_VERSION_PATCH 0
diff --git a/security/tf_driver/tf_comm_tz.c b/security/tf_driver/tf_comm_tz.c
index 0f36209add7a..58152adaaa51 100644
--- a/security/tf_driver/tf_comm_tz.c
+++ b/security/tf_driver/tf_comm_tz.c
@@ -2,7 +2,7 @@
* Copyright (c) 2011 Trusted Logic S.A.
* All Rights Reserved.
*
- * Copyright (C) 2011-2012 NVIDIA Corporation.
+ * Copyright (C) 2011-2013 NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -139,24 +139,6 @@ static inline int tf_smc_init(u32 shared_page_descriptor)
return generic_smc.reg0;
}
-
-/*
- * Calls the reset irq SMC.
- */
-static inline void tf_smc_reset_irq(void)
-{
- struct tf_generic_smc generic_smc;
-
- generic_smc.reg0 = TF_SMC_RESET_IRQ;
- generic_smc.reg1 = 0;
- generic_smc.reg2 = 0;
- generic_smc.reg3 = 0;
- generic_smc.reg4 = 0;
-
- tf_smc_generic_call(&generic_smc);
-}
-
-
/*
* Calls the WAKE_UP SMC.
* Returns zero upon successful completion, or an appropriate error code upon
@@ -718,7 +700,14 @@ static irqreturn_t tf_soft_int_handler(int irq, void *dev_id)
/* interrupt not issued by the Trusted Foundations Software */
return IRQ_NONE;
- tf_smc_reset_irq();
+ /*
+ * This "reply" from N-world to S-world is not required
+ * in the new design of S-interrupt processing.
+ * Moreover, the call
+ * tf_smc_reset_irq() -> tf_smc_generic_call() ->
+ * sched_setaffinity(0, &local_cpu_mask)
+ * can break the atomic behavior of Linux scheduler.
+ */
/* signal N_SM_EVENT */
wake_up(&comm->wait_queue);
diff --git a/security/tf_driver/tf_device.c b/security/tf_driver/tf_device.c
index 51dbb37dbdec..70d6a70a6244 100644
--- a/security/tf_driver/tf_device.c
+++ b/security/tf_driver/tf_device.c
@@ -2,7 +2,7 @@
* Copyright (c) 2011 Trusted Logic S.A.
* All Rights Reserved.
*
- * Copyright (C) 2011-2012 NVIDIA Corporation.
+ * Copyright (C) 2011-2013 NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -123,10 +123,15 @@ MODULE_PARM_DESC(device_major_number,
"device driver");
#ifdef CONFIG_TF_TRUSTZONE
-/**
- * The softint interrupt line used by the Secure World.
+/*
+ * This software interrupt line is used by the S-World interrupt system
+ * to inform N-World that it must schedule S-World as soon as it is possible.
+ */
+static int soft_interrupt = 191; /*-1;*/
+/*
+ * Interrupt line #191 is not used by the hardware of Tegra3 and Tegra4.
+ * The same signaling interrupt must be specified in S-World (GIC driver)
*/
-static int soft_interrupt = -1;
module_param(soft_interrupt, int, 0000);
MODULE_PARM_DESC(soft_interrupt,