diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-18 10:45:18 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2024-07-22 09:38:06 +0100 |
commit | fca2ffcb0b1292ef5dc29e2d1a33e30de9876da0 (patch) | |
tree | 89843f7f15ce8e63c6369c817cc8cac8f318897f | |
parent | bf9ab9d1317e9e27e27d63e94c2e13db2319e2c2 (diff) | |
download | qemu-fca2ffcb0b1292ef5dc29e2d1a33e30de9876da0.zip qemu-fca2ffcb0b1292ef5dc29e2d1a33e30de9876da0.tar.gz qemu-fca2ffcb0b1292ef5dc29e2d1a33e30de9876da0.tar.bz2 |
target/mips: Add semihosting stub
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>
Message-Id: <20240717105723.58965-4-philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240718094523.1198645-11-alex.bennee@linaro.org>
-rw-r--r-- | target/mips/tcg/sysemu/meson.build | 6 | ||||
-rw-r--r-- | target/mips/tcg/sysemu/semihosting-stub.c | 15 |
2 files changed, 19 insertions, 2 deletions
diff --git a/target/mips/tcg/sysemu/meson.build b/target/mips/tcg/sysemu/meson.build index ec665a4..911341a 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', )) diff --git a/target/mips/tcg/sysemu/semihosting-stub.c b/target/mips/tcg/sysemu/semihosting-stub.c new file mode 100644 index 0000000..7ae27d7 --- /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(); +} |