[PATCH 4/5] kvx: handle syscalls gracefully
jvetter at kalrayinc.com
jvetter at kalrayinc.com
Mon Jun 17 06:43:28 PDT 2024
From: Clement Leger <clement at clement-leger.fr>
Upon syscall, return to caller via 'rfe' (return from exception)
without any modification or handling.
Signed-off-by: Clement Leger <clement at clement-leger.fr>
Signed-off-by: Julian Vetter <jvetter at kalrayinc.com>
Reviewed-by: Yann Sionneau <ysionneau at kalrayinc.com>
Reviewed-by: Jonathan Borne <jborne at kalrayinc.com>
---
arch/kvx/cpu/exception.S | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/kvx/cpu/exception.S b/arch/kvx/cpu/exception.S
index 0017e8ea12..a00e2f93b8 100644
--- a/arch/kvx/cpu/exception.S
+++ b/arch/kvx/cpu/exception.S
@@ -21,4 +21,15 @@ ENDPROC(kvx_ ## __type ## _early_handler)
exception_stub(debug)
exception_stub(trap)
exception_stub(interrupt)
-exception_stub(syscall)
+
+/**
+ * The only time this handle syscalls is when debug routines are not present
+ * (which can happen when booted without JTAG). For instance the "magic
+ * console" uses a syscall catched by the debug routine and if not handled
+ * barebox will crash.
+ */
+.section .exception.syscall, "ax", @progbits
+ENTRY(kvx_syscall_handler):
+ rfe
+ ;;
+ENDPROC(kvx_syscall_handler)
--
2.34.1
More information about the barebox
mailing list