diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-04-29 20:16:53 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-06-28 10:13:22 +0530 |
commit | a638af09b6c6b1259803a377a53ef242c5af6af5 (patch) | |
tree | d177f1219a1850f29735d5ec5415d84d7dc69c1e /target/m68k/m68k-semi.c | |
parent | ab294b6c3adfc8a9241f2aaff0709c51acf0370b (diff) | |
download | qemu-a638af09b6c6b1259803a377a53ef242c5af6af5.zip qemu-a638af09b6c6b1259803a377a53ef242c5af6af5.tar.gz qemu-a638af09b6c6b1259803a377a53ef242c5af6af5.tar.bz2 |
target/m68k: Make semihosting system only
While we had a call to do_m68k_semihosting in linux-user, it
wasn't actually reachable. We don't include DISAS_INSN(halt)
as an instruction unless system mode.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/m68k/m68k-semi.c')
-rw-r--r-- | target/m68k/m68k-semi.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c index 37b409b..d0697dd 100644 --- a/target/m68k/m68k-semi.c +++ b/target/m68k/m68k-semi.c @@ -21,13 +21,8 @@ #include "cpu.h" #include "exec/gdbstub.h" -#if defined(CONFIG_USER_ONLY) -#include "qemu.h" -#define SEMIHOSTING_HEAP_SIZE (128 * 1024 * 1024) -#else #include "semihosting/softmmu-uaccess.h" #include "hw/boards.h" -#endif #include "qemu/log.h" #define HOSTED_EXIT 0 @@ -377,43 +372,12 @@ void do_m68k_semihosting(CPUM68KState *env, int nr) } break; case HOSTED_INIT_SIM: -#if defined(CONFIG_USER_ONLY) - { - CPUState *cs = env_cpu(env); - TaskState *ts = cs->opaque; - /* Allocate the heap using sbrk. */ - if (!ts->heap_limit) { - abi_ulong ret; - uint32_t size; - uint32_t base; - - base = do_brk(0); - size = SEMIHOSTING_HEAP_SIZE; - /* Try a big heap, and reduce the size if that fails. */ - for (;;) { - ret = do_brk(base + size); - if (ret >= (base + size)) { - break; - } - size >>= 1; - } - ts->heap_limit = base + size; - } - /* - * This call may happen before we have writable memory, so return - * values directly in registers. - */ - env->dregs[1] = ts->heap_limit; - env->aregs[7] = ts->stack_base; - } -#else /* * FIXME: This is wrong for boards where RAM does not start at * address zero. */ env->dregs[1] = current_machine->ram_size; env->aregs[7] = current_machine->ram_size; -#endif return; default: cpu_abort(env_cpu(env), "Unsupported semihosting syscall %d\n", nr); |