security: tf_driver: integrate latest TL release
authorHyung Taek Ryoo <hryoo@nvidia.com>
Tue, 19 Feb 2013 21:45:53 +0000 (13:45 -0800)
committerSimone Willett <swillett@nvidia.com>
Mon, 22 Apr 2013 22:07:42 +0000 (15:07 -0700)
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>
security/tf_driver/s_version.h
security/tf_driver/tf_comm_tz.c
security/tf_driver/tf_device.c

index f0664eb734a0c89db16304b8a4dad9dc96b70b64..89356a9e548314b77b1e1978ba6baed178c4575e 100644 (file)
@@ -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
 
index 0f36209add7abf29189ae7c10942e39598899bdd..58152adaaa5117f35802e7a3f75bf72845546883 100644 (file)
@@ -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);
index 51dbb37dbdec78d4de9b32b757c87c2e42c1533f..70d6a70a6244ed98dd3d8d585b1426e91d1cf6a9 100644 (file)
@@ -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,