riscv: hang on unhandled exceptions
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>
Thu, 22 Nov 2018 10:26:22 +0000 (11:26 +0100)
committerAndes <uboot@andestech.com>
Mon, 26 Nov 2018 05:57:30 +0000 (13:57 +0800)
Hang on unhandled exceptions to prevent execution in a faulty state.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
arch/riscv/lib/interrupts.c

index d0d8de500ee65e31a32a61ad7638f4bc2d47348d..903a1c4cd55766f7383b6c3eb93fff67c72ef652 100644 (file)
@@ -87,4 +87,6 @@ static void _exit_trap(ulong code, ulong epc, struct pt_regs *regs)
        } else {
                printf("Reserved\n");
        }
+
+       hang();
 }