aboutsummaryrefslogtreecommitdiff
path: root/plat/rockchip/common
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2017-06-19 17:05:30 -0700
committerJulius Werner <jwerner@chromium.org>2017-12-12 15:00:34 -0800
commita33e763c40b532859a1793025075b06adc553c4c (patch)
tree220296fa88ae3417e51433a9b86f075a2b989d47 /plat/rockchip/common
parent155a10068ac6feefcc783b7b023fc90390e5cc44 (diff)
downloadtrusted-firmware-a-a33e763c40b532859a1793025075b06adc553c4c.tar.gz
rockchip: Implement a panic handler that will reboot the system
The current Rockchip platform code retains the "common" default panic handler which simply hangs the system (until the watchdog kicks in, if enabled). This is usually not a great user experience. This patch implements a Rockchip-specific panic handler that calls the platform's reboot implementation to reset the system. Change-Id: I4cbe09c48f1b3f86ebdfc0108c186565f9ffc119 Signed-off-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'plat/rockchip/common')
-rw-r--r--plat/rockchip/common/aarch64/plat_helpers.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/plat/rockchip/common/aarch64/plat_helpers.S b/plat/rockchip/common/aarch64/plat_helpers.S
index abfb5a7951..24cb8e45af 100644
--- a/plat/rockchip/common/aarch64/plat_helpers.S
+++ b/plat/rockchip/common/aarch64/plat_helpers.S
@@ -23,6 +23,7 @@
.globl plat_crash_console_putc
.globl plat_my_core_pos
.globl plat_reset_handler
+ .globl plat_panic_handler
/*
* void plat_reset_handler(void);
@@ -108,6 +109,19 @@ func plat_crash_console_putc
endfunc plat_crash_console_putc
/* --------------------------------------------------------------------
+ * void plat_panic_handler(void)
+ * Call system reset function on panic. Set up an emergency stack so we
+ * can run C functions (it only needs to last for a few calls until we
+ * reboot anyway).
+ * --------------------------------------------------------------------
+ */
+func plat_panic_handler
+ msr spsel, #0
+ bl plat_set_my_stack
+ b rockchip_soc_soft_reset
+endfunc plat_panic_handler
+
+ /* --------------------------------------------------------------------
* void platform_cpu_warmboot (void);
* cpus online or resume enterpoint
* --------------------------------------------------------------------