From: jvetter@kalrayinc.com
To: barebox@lists.infradead.org
Cc: ysionneau@kalrayinc.com, jborne@kalrayinc.com,
jhascoet@kalrayinc.com, clement@clement-leger.fr,
Julian Vetter <jvetter@kalrayinc.com>
Subject: [PATCH 4/5] kvx: handle syscalls gracefully
Date: Mon, 17 Jun 2024 15:43:28 +0200 [thread overview]
Message-ID: <20240617134329.3671762-5-jvetter@kalrayinc.com> (raw)
In-Reply-To: <20240617134329.3671762-1-jvetter@kalrayinc.com>
From: Clement Leger <clement@clement-leger.fr>
Upon syscall, return to caller via 'rfe' (return from exception)
without any modification or handling.
Signed-off-by: Clement Leger <clement@clement-leger.fr>
Signed-off-by: Julian Vetter <jvetter@kalrayinc.com>
Reviewed-by: Yann Sionneau <ysionneau@kalrayinc.com>
Reviewed-by: Jonathan Borne <jborne@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
next prev parent reply other threads:[~2024-06-17 13:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 13:43 Update kvx support jvetter
2024-06-17 13:43 ` [PATCH 1/5] kvx: Fix barebox build for kvx jvetter
2024-06-18 6:13 ` Sascha Hauer
2024-06-17 13:43 ` [PATCH 2/5] kvx: Add 'stop' instruction to power down sequence jvetter
2024-06-17 13:43 ` [PATCH 3/5] kvx: robustify i/d cache startup jvetter
2024-06-17 13:43 ` jvetter [this message]
2024-06-17 13:43 ` [PATCH 5/5] kvx: add support for Coolidge V1/V2 march selection jvetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240617134329.3671762-5-jvetter@kalrayinc.com \
--to=jvetter@kalrayinc.com \
--cc=barebox@lists.infradead.org \
--cc=clement@clement-leger.fr \
--cc=jborne@kalrayinc.com \
--cc=jhascoet@kalrayinc.com \
--cc=ysionneau@kalrayinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox