[PATCH 4/5] kvx: handle syscalls gracefully

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Clement Leger <clement@xxxxxxxxxxxxxxxx>

Upon syscall, return to caller via 'rfe' (return from exception)
without any modification or handling.

Signed-off-by: Clement Leger <clement@xxxxxxxxxxxxxxxx>
Signed-off-by: Julian Vetter <jvetter@xxxxxxxxxxxxx>
Reviewed-by: Yann Sionneau <ysionneau@xxxxxxxxxxxxx>
Reviewed-by: Jonathan Borne <jborne@xxxxxxxxxxxxx>
---
 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









[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux