diff options
author | Bryan O'Donoghue <bryan.odonoghue@linaro.org> | 2018-07-04 13:16:35 +0100 |
---|---|---|
committer | Bryan O'Donoghue <bryan.odonoghue@linaro.org> | 2018-09-04 14:18:31 +0100 |
commit | 20c0eca0f2a859c2e90b711493360cd5b239d905 (patch) | |
tree | e2b48a46e1a8cec5ce32d50e5527e85b77f59581 /plat/imx/imx7 | |
parent | a22d06ce4a3bb73e174dcf91b8bb58b3ed7cc394 (diff) |
warp7: panic: hab: Call into BootROM failsafe on panic path
This patch adds a callback into the BootROM's provided High Assurance Boot
(HAB) failsafe function when panicking i.e. the call is done without making
use of stack.
The HAB failsafe function allows a piece of software to call into the
BootROM and place the processor into failsafe mode.
Failsafe mode is a special mode which presents a serial download protocol
interface over UART or USB at the time of writing.
If the board has been set into secure mode, then only a signed binary can
be used to recover the board.
Thus failsafe gives a putatively secure method of performing a secure
recovery over UART or USB.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Diffstat (limited to 'plat/imx/imx7')
-rw-r--r-- | plat/imx/imx7/warp7/aarch32/warp7_helpers.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plat/imx/imx7/warp7/aarch32/warp7_helpers.S b/plat/imx/imx7/warp7/aarch32/warp7_helpers.S index b12ff325..b1921cc3 100644 --- a/plat/imx/imx7/warp7/aarch32/warp7_helpers.S +++ b/plat/imx/imx7/warp7/aarch32/warp7_helpers.S @@ -8,11 +8,13 @@ #include <asm_macros.S> #include <assert_macros.S> #include <platform_def.h> +#include <imx_hab.h> .globl platform_mem_init .globl plat_get_my_entrypoint .globl plat_crash_console_init .globl plat_crash_console_putc + .globl plat_panic_handler /* --------------------------------------------- * int plat_mem_init(void) @@ -42,3 +44,9 @@ func plat_crash_console_putc mov_imm r1, PLAT_WARP7_BOOT_UART_BASE b imx_crash_uart_putc endfunc plat_crash_console_putc + +func plat_panic_handler + mov r3, #HAB_ROM_VECTOR_TABLE_FAILSAFE + ldr r3, [r3, #0] + blx r3 +endfunc plat_panic_handler |