summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/sleep.S
diff options
context:
space:
mode:
authorChris Johnson <cwj@nvidia.com>2011-11-18 16:14:07 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 01:35:56 -0700
commit15ef9ae4928cf2e96b55859894cb5389c47ace66 (patch)
tree75f8aca3f120943cee6ee0d9e982ef54acf75974 /arch/arm/mach-tegra/sleep.S
parentc36df0096881fc0bb8f39e4c798e4506f3804bc4 (diff)
arm: tegra: add Trusted Foundations hooks and driver
Add CONFIG_TRUSTED_FOUNDATIONS build option and calls to issue SMCs to the TL secure monitor (used when needing to update state not writable by non-secure code). Make security/tf_driver an optional part of the build, which is part of the TL framework to interact with secure services. Bug 883391 Change-Id: I9c6c14ff457fb3a0c612d558fe731a17c2480750 Signed-off-by: Chris Johnson <cwj@nvidia.com> Reviewed-on: http://git-master/r/65616 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R57977499bb6b372ac4faa360e442e8733265e9f3
Diffstat (limited to 'arch/arm/mach-tegra/sleep.S')
-rw-r--r--arch/arm/mach-tegra/sleep.S27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S
index b1f7ed739bfc..5a5467a3e1e0 100644
--- a/arch/arm/mach-tegra/sleep.S
+++ b/arch/arm/mach-tegra/sleep.S
@@ -203,3 +203,30 @@ ENTRY(tegra_cpu_pllp)
mov pc, lr
ENDPROC(tegra_cpu_pllp)
#endif
+
+#ifdef CONFIG_TRUSTED_FOUNDATIONS
+/*
+ * tegra_generic_smc
+ *
+ * r0 = smc type
+ * r1 = smc subtype
+ * r2 = argument passed to smc
+ *
+ * issues SMC (secure monitor call) instruction with
+ * the specified parameters.
+ */
+ENTRY(tegra_generic_smc)
+ adr r3, __tegra_smc_stack
+ stmia r3, {r4-r12, lr}
+ mov r3, #0
+ mov r4, #0
+ dsb
+ smc #0
+ adr r3, __tegra_smc_stack
+ ldmia r3, {r4-r12, pc}
+ENDPROC(tegra_generic_smc)
+ .type __tegra_smc_stack, %object
+__tegra_smc_stack:
+ .long 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ .size __tegra_smc_stack, . - __tegra_smc_stack
+#endif