From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Anton Johansson" <anjo@rev.ng>,
qemu-riscv@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v4 2/8] target/m68k: Add semihosting stub
Date: Wed, 17 Jul 2024 12:57:17 +0200 [thread overview]
Message-ID: <20240717105723.58965-3-philmd@linaro.org> (raw)
In-Reply-To: <20240717105723.58965-1-philmd@linaro.org>
Since the SEMIHOSTING feature is optional, we need
a stub to link when it is disabled.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/m68k/semihosting-stub.c | 15 +++++++++++++++
target/m68k/meson.build | 5 ++++-
2 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 target/m68k/semihosting-stub.c
diff --git a/target/m68k/semihosting-stub.c b/target/m68k/semihosting-stub.c
new file mode 100644
index 0000000000..d6a5965e29
--- /dev/null
+++ b/target/m68k/semihosting-stub.c
@@ -0,0 +1,15 @@
+/*
+ * m68k/ColdFire semihosting stub
+ *
+ * SPDX-FileContributor: Philippe Mathieu-Daudé <philmd@linaro.org>
+ * SPDX-FileCopyrightText: 2024 Linaro Ltd.
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "cpu.h"
+
+void do_m68k_semihosting(CPUM68KState *env, int nr)
+{
+ g_assert_not_reached();
+}
diff --git a/target/m68k/meson.build b/target/m68k/meson.build
index 8d3f9ce288..4d213daaf6 100644
--- a/target/m68k/meson.build
+++ b/target/m68k/meson.build
@@ -11,9 +11,12 @@ m68k_ss.add(files(
m68k_system_ss = ss.source_set()
m68k_system_ss.add(files(
- 'm68k-semi.c',
'monitor.c'
))
+m68k_system_ss.add(when: ['CONFIG_SEMIHOSTING'],
+ if_true: files('m68k-semi.c'),
+ if_false: files('semihosting-stub.c')
+)
target_arch += {'m68k': m68k_ss}
target_system_arch += {'m68k': m68k_system_ss}
--
2.41.0
next prev parent reply other threads:[~2024-07-17 10:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 10:57 [PATCH v4 0/8] semihosting: Restrict to TCG Philippe Mathieu-Daudé
2024-07-17 10:57 ` [PATCH v4 1/8] semihosting: Include missing 'gdbstub/syscalls.h' header Philippe Mathieu-Daudé
2024-07-17 10:57 ` Philippe Mathieu-Daudé [this message]
2024-07-17 10:57 ` [PATCH v4 3/8] target/mips: Add semihosting stub Philippe Mathieu-Daudé
2024-07-17 10:57 ` [PATCH v4 4/8] target/m68k: Restrict semihosting to TCG Philippe Mathieu-Daudé
2024-07-17 10:57 ` [PATCH v4 5/8] target/mips: " Philippe Mathieu-Daudé
2024-07-17 10:57 ` [PATCH v4 6/8] target/riscv: " Philippe Mathieu-Daudé
2024-07-17 10:57 ` [PATCH v4 7/8] target/xtensa: " Philippe Mathieu-Daudé
2024-07-17 10:57 ` [PATCH v4 8/8] semihosting: Restrict " Philippe Mathieu-Daudé
2024-07-17 18:21 ` [PATCH v4 0/8] " Alex Bennée
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=20240717105723.58965-3-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=anjo@rev.ng \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).