diff options
author | Dmitry Osipenko <[email protected]> | 2019-03-18 01:52:08 +0300 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2019-04-09 16:36:24 +0200 |
commit | 2af6597ac3fab8a3796786bb73f8bd14a9f2d376 (patch) | |
tree | 6dc818ac2224193e2e96c7426a9bdf9f3eb16c5d /arch/arm/mach-tegra/reset.c | |
parent | 6ad27b8350401a3c79899b431097afc361b46374 (diff) |
ARM: tegra: Don't apply CPU erratas in insecure mode
CPU isn't allowed to touch secure registers while running under secure
monitor. Hence skip applying of CPU erratas in the reset handler if
Trusted Foundations firmware presents.
Partially based on work done by Michał Mirosław [1].
[1] https://www.spinics.net/lists/arm-kernel/msg594768.html
Tested-by: Robert Yang <[email protected]>
Tested-by: Michał Mirosław <[email protected]>
Signed-off-by: Michał Mirosław <[email protected]>
Signed-off-by: Dmitry Osipenko <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'arch/arm/mach-tegra/reset.c')
-rw-r--r-- | arch/arm/mach-tegra/reset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c index dc558892753c..b02ae7699842 100644 --- a/arch/arm/mach-tegra/reset.c +++ b/arch/arm/mach-tegra/reset.c @@ -24,6 +24,7 @@ #include <asm/cacheflush.h> #include <asm/firmware.h> #include <asm/hardware/cache-l2x0.h> +#include <asm/trusted_foundations.h> #include "iomap.h" #include "irammap.h" @@ -89,6 +90,8 @@ static void __init tegra_cpu_reset_handler_enable(void) void __init tegra_cpu_reset_handler_init(void) { + __tegra_cpu_reset_handler_data[TEGRA_RESET_TF_PRESENT] = + trusted_foundations_registered(); #ifdef CONFIG_SMP __tegra_cpu_reset_handler_data[TEGRA_RESET_MASK_PRESENT] = |