summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShujuan Chen <shujuan.chen@stericsson.com>2010-08-31 17:14:54 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:34 +0200
commit4c93613a4a5f25b739fa32f86ae67bfe033ee0d3 (patch)
tree059a89a97d589ca89541afe23589cc2c0db16fe4
parent6e66274cbeb53f22a4dd08f9c1ac119c50d34768 (diff)
ux500: tee bug fix for returning wrong values
- Fix the missing the ret argument sent to secure world. - Fix the mismatch return btw kernel and secure world in closesession. Dependencies: WP269815 ST-Ericsson ID: ER270978 Change-Id: I86b4af518660987663632d04d11d5d4967878bca Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/4545 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Tested-by: Shujuan CHEN <shujuan.chen@stericsson.com> Reviewed-by: Fredric MORENIUS <fredric.morenius@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/tee_ux500.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/tee_ux500.c b/arch/arm/mach-ux500/tee_ux500.c
index ab3782a323c..c009afe26ae 100644
--- a/arch/arm/mach-ux500/tee_ux500.c
+++ b/arch/arm/mach-ux500/tee_ux500.c
@@ -52,6 +52,7 @@ int call_sec_world(struct tee_session *ts, int sec_cmd)
virt_to_phys(ts->ta),
ts->cmd,
virt_to_phys((void *)(ts->op)),
+ virt_to_phys((void *)(&ts->err)),
virt_to_phys((void *)(&ts->origin)));
} else {
call_sec_rom_bridge(ISSWAPI_EXECUTE_TA,
@@ -61,6 +62,7 @@ int call_sec_world(struct tee_session *ts, int sec_cmd)
virt_to_phys(ts->ta),
ts->cmd,
virt_to_phys((void *)(ts->op)),
+ virt_to_phys((void *)(&ts->err)),
virt_to_phys((void *)(&ts->origin)));
}
break;
@@ -71,7 +73,16 @@ int call_sec_world(struct tee_session *ts, int sec_cmd)
ts->id,
NULL,
virt_to_phys(ts->ta),
- virt_to_phys((void *)(&ts->origin)));
+ virt_to_phys((void *)(&ts->err)));
+
+ /* Since the TEE Client API does NOT take care of
+ * the return value, we print a warning here if
+ * something went wrong in secure world.
+ */
+ if (ts->err != TEED_SUCCESS)
+ pr_warning("[%s] failed in secure world\n",
+ __func__);
+
break;
}