[U-Boot] [PATCH 16/30] riscv: hang on unhandled exceptions

Lukas Auer lukas.auer at aisec.fraunhofer.de
Fri Oct 19 22:07:29 UTC 2018


Hang on unhandled exceptions to prevent execution in a faulty state.

Signed-off-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
---

 arch/riscv/lib/interrupts.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c
index 32d0598750..3b74b76c70 100644
--- a/arch/riscv/lib/interrupts.c
+++ b/arch/riscv/lib/interrupts.c
@@ -87,4 +87,6 @@ static void _exit_trap(ulong code, ulong epc, struct pt_regs *regs)
 	} else {
 		printf("Reserved\n");
 	}
+
+	hang();
 }
-- 
2.17.2



More information about the U-Boot mailing list