aboutsummaryrefslogtreecommitdiff
path: root/target/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'target/m68k')
-rw-r--r--target/m68k/m68k-semi.c36
-rw-r--r--target/m68k/meson.build6
2 files changed, 4 insertions, 38 deletions
diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c
index 37b409b0b9..d0697ddbd1 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);
diff --git a/target/m68k/meson.build b/target/m68k/meson.build
index 05cd9fbd1e..27d2d7ba87 100644
--- a/target/m68k/meson.build
+++ b/target/m68k/meson.build
@@ -4,14 +4,16 @@ m68k_ss.add(files(
'fpu_helper.c',
'gdbstub.c',
'helper.c',
- 'm68k-semi.c',
'op_helper.c',
'softfloat.c',
'translate.c',
))
m68k_softmmu_ss = ss.source_set()
-m68k_softmmu_ss.add(files('monitor.c'))
+m68k_softmmu_ss.add(files(
+ 'm68k-semi.c',
+ 'monitor.c'
+))
target_arch += {'m68k': m68k_ss}
target_softmmu_arch += {'m68k': m68k_softmmu_ss}