[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 3/8] target/mips: Add semihosting stub
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v4 3/8] target/mips: Add semihosting stub |
Date: |
Wed, 17 Jul 2024 12:57:18 +0200 |
Since the SEMIHOSTING feature is optional, we need
a stub to link when it is disabled.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/mips/tcg/sysemu/semihosting-stub.c | 15 +++++++++++++++
target/mips/tcg/sysemu/meson.build | 6 ++++--
2 files changed, 19 insertions(+), 2 deletions(-)
create mode 100644 target/mips/tcg/sysemu/semihosting-stub.c
diff --git a/target/mips/tcg/sysemu/semihosting-stub.c
b/target/mips/tcg/sysemu/semihosting-stub.c
new file mode 100644
index 0000000000..7ae27d746f
--- /dev/null
+++ b/target/mips/tcg/sysemu/semihosting-stub.c
@@ -0,0 +1,15 @@
+/*
+ * MIPS 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 "internal.h"
+
+void mips_semihosting(CPUMIPSState *env)
+{
+ g_assert_not_reached();
+}
diff --git a/target/mips/tcg/sysemu/meson.build
b/target/mips/tcg/sysemu/meson.build
index ec665a4b1e..911341ac37 100644
--- a/target/mips/tcg/sysemu/meson.build
+++ b/target/mips/tcg/sysemu/meson.build
@@ -1,10 +1,12 @@
mips_system_ss.add(files(
'cp0_helper.c',
- 'mips-semi.c',
'special_helper.c',
'tlb_helper.c',
))
-
+mips_system_ss.add(when: ['CONFIG_SEMIHOSTING'],
+ if_true: files('mips-semi.c'),
+ if_false: files('semihosting-stub.c')
+)
mips_system_ss.add(when: 'TARGET_MIPS64', if_true: files(
'lcsr_helper.c',
))
--
2.41.0
- [PATCH v4 0/8] semihosting: Restrict to TCG, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v4 1/8] semihosting: Include missing 'gdbstub/syscalls.h' header, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v4 2/8] target/m68k: Add semihosting stub, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v4 3/8] target/mips: Add semihosting stub,
Philippe Mathieu-Daudé <=
- [PATCH v4 4/8] target/m68k: Restrict semihosting to TCG, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v4 5/8] target/mips: Restrict semihosting to TCG, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v4 6/8] target/riscv: Restrict semihosting to TCG, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v4 7/8] target/xtensa: Restrict semihosting to TCG, Philippe Mathieu-Daudé, 2024/07/17
- [PATCH v4 8/8] semihosting: Restrict to TCG, Philippe Mathieu-Daudé, 2024/07/17
- Re: [PATCH v4 0/8] semihosting: Restrict to TCG, Alex Bennée, 2024/07/17