[U-Boot] [PATCH v3 13/28] riscv: hang on unhandled exceptions

Lukas Auer lukas.auer at aisec.fraunhofer.de
Fri Nov 9 12:59:08 UTC 2018


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

Signed-off-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
Reviewed-by: Rick Chen <rick at andestech.com>
---

Changes in v3: None
Changes in v2: None

 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 d0d8de500e..903a1c4cd5 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