summaryrefslogtreecommitdiff
path: root/plat/nvidia/tegra/soc/t186/plat_trampoline.S
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2018-08-09 15:11:23 -0700
committerVarun Wadekar <vwadekar@nvidia.com>2020-03-18 17:47:22 -0700
commit8336c94dc4c7b25d34bb6f3c5008720746407dad (patch)
tree466cc6752b1ecd82e0edb2f98c2066de3034b8b8 /plat/nvidia/tegra/soc/t186/plat_trampoline.S
parent35aa1c1e51b62467ac31958983a67ef0d5646acb (diff)
downloadarm-trusted-firmware-8336c94dc4c7b25d34bb6f3c5008720746407dad.tar.gz
Tegra186: disable PROGRAMMABLE_RESET_ADDRESS
This patch disables the code to program reset vector for secondary CPUs to a different entry point, than cold boot. The cold boot entry point has the ability to differentiate between a cold boot and a warm boot, that is controlled by the PROGRAMMABLE_RESET_ADDRESS macro. By reusing the same entry point, we can lock the CPU reset vector during cold boot. Change-Id: Iad400841d57c139469e1d29b5d467197e11958c4 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'plat/nvidia/tegra/soc/t186/plat_trampoline.S')
-rw-r--r--plat/nvidia/tegra/soc/t186/plat_trampoline.S40
1 files changed, 0 insertions, 40 deletions
diff --git a/plat/nvidia/tegra/soc/t186/plat_trampoline.S b/plat/nvidia/tegra/soc/t186/plat_trampoline.S
index 818c24b49..adb39f572 100644
--- a/plat/nvidia/tegra/soc/t186/plat_trampoline.S
+++ b/plat/nvidia/tegra/soc/t186/plat_trampoline.S
@@ -12,31 +12,12 @@
#include <plat/common/common_def.h>
#include <tegra_def.h>
-#define TEGRA186_STATE_SYSTEM_SUSPEND 0x5C7
-#define TEGRA186_STATE_SYSTEM_RESUME 0x600D
#define TEGRA186_MC_CTX_SIZE 0x93
.globl tegra186_cpu_reset_handler
/* CPU reset handler routine */
func tegra186_cpu_reset_handler _align=4
- /* check if we are exiting system suspend state */
- adr x0, __tegra186_system_suspend_state
- ldr x1, [x0]
- mov x2, #TEGRA186_STATE_SYSTEM_SUSPEND
- lsl x2, x2, #16
- add x2, x2, #TEGRA186_STATE_SYSTEM_SUSPEND
- cmp x1, x2
- bne boot_cpu
-
- /* set system resume state */
- mov x1, #TEGRA186_STATE_SYSTEM_RESUME
- lsl x1, x1, #16
- mov x2, #TEGRA186_STATE_SYSTEM_RESUME
- add x1, x1, x2
- str x1, [x0]
- dsb sy
-
/* prepare to relocate to TZSRAM */
mov x0, #BL31_BASE
adr x1, __tegra186_cpu_reset_handler_end
@@ -101,7 +82,6 @@ __tegra186_cpu_reset_handler_end:
.globl tegra186_get_cpu_reset_handler_size
.globl tegra186_get_cpu_reset_handler_base
.globl tegra186_get_mc_ctx_offset
- .globl tegra186_set_system_suspend_entry
/* return size of the CPU reset handler */
func tegra186_get_cpu_reset_handler_size
@@ -124,23 +104,3 @@ func tegra186_get_mc_ctx_offset
sub x0, x0, x1
ret
endfunc tegra186_get_mc_ctx_offset
-
-/* set system suspend state before SC7 entry */
-func tegra186_set_system_suspend_entry
- mov x0, #TEGRA_MC_BASE
- mov x3, #MC_SECURITY_CFG3_0
- ldr w1, [x0, x3]
- lsl x1, x1, #32
- mov x3, #MC_SECURITY_CFG0_0
- ldr w2, [x0, x3]
- orr x3, x1, x2 /* TZDRAM base */
- adr x0, __tegra186_system_suspend_state
- adr x1, tegra186_cpu_reset_handler
- sub x2, x0, x1 /* offset in TZDRAM */
- mov x0, #TEGRA186_STATE_SYSTEM_SUSPEND
- lsl x0, x0, #16
- add x0, x0, #TEGRA186_STATE_SYSTEM_SUSPEND
- str x0, [x3, x2] /* set value in TZDRAM */
- dsb sy
- ret
-endfunc tegra186_set_system_suspend_entry