1*5837db46SPaolo Bonzini /* 2*5837db46SPaolo Bonzini * Semihosting Stubs for system emulation 3*5837db46SPaolo Bonzini * 4*5837db46SPaolo Bonzini * Copyright (c) 2019 Linaro Ltd 5*5837db46SPaolo Bonzini * 6*5837db46SPaolo Bonzini * Stubs for system targets that don't actually do semihosting. 7*5837db46SPaolo Bonzini * 8*5837db46SPaolo Bonzini * SPDX-License-Identifier: GPL-2.0-or-later 9*5837db46SPaolo Bonzini */ 10*5837db46SPaolo Bonzini 11*5837db46SPaolo Bonzini #include "qemu/osdep.h" 12*5837db46SPaolo Bonzini #include "qemu/option.h" 13*5837db46SPaolo Bonzini #include "qemu/error-report.h" 14*5837db46SPaolo Bonzini #include "semihosting/semihost.h" 15*5837db46SPaolo Bonzini 16*5837db46SPaolo Bonzini /* Empty config */ 17*5837db46SPaolo Bonzini QemuOptsList qemu_semihosting_config_opts = { 18*5837db46SPaolo Bonzini .name = "", 19*5837db46SPaolo Bonzini .head = QTAILQ_HEAD_INITIALIZER(qemu_semihosting_config_opts.head), 20*5837db46SPaolo Bonzini .desc = { 21*5837db46SPaolo Bonzini { /* end of list */ } 22*5837db46SPaolo Bonzini }, 23*5837db46SPaolo Bonzini }; 24*5837db46SPaolo Bonzini 25*5837db46SPaolo Bonzini /* Queries to config status default to off */ semihosting_enabled(bool is_user)26*5837db46SPaolo Bonzinibool semihosting_enabled(bool is_user) 27*5837db46SPaolo Bonzini { 28*5837db46SPaolo Bonzini return false; 29*5837db46SPaolo Bonzini } 30*5837db46SPaolo Bonzini 31*5837db46SPaolo Bonzini /* 32*5837db46SPaolo Bonzini * All the rest are empty subs. We could g_assert_not_reached() but 33*5837db46SPaolo Bonzini * that adds extra weight to the final binary. Waste not want not. 34*5837db46SPaolo Bonzini */ qemu_semihosting_enable(void)35*5837db46SPaolo Bonzinivoid qemu_semihosting_enable(void) 36*5837db46SPaolo Bonzini { 37*5837db46SPaolo Bonzini } 38*5837db46SPaolo Bonzini qemu_semihosting_config_options(const char * optstr)39*5837db46SPaolo Bonziniint qemu_semihosting_config_options(const char *optstr) 40*5837db46SPaolo Bonzini { 41*5837db46SPaolo Bonzini return 1; 42*5837db46SPaolo Bonzini } 43*5837db46SPaolo Bonzini semihosting_get_arg(int i)44*5837db46SPaolo Bonziniconst char *semihosting_get_arg(int i) 45*5837db46SPaolo Bonzini { 46*5837db46SPaolo Bonzini return NULL; 47*5837db46SPaolo Bonzini } 48*5837db46SPaolo Bonzini semihosting_get_argc(void)49*5837db46SPaolo Bonziniint semihosting_get_argc(void) 50*5837db46SPaolo Bonzini { 51*5837db46SPaolo Bonzini return 0; 52*5837db46SPaolo Bonzini } 53*5837db46SPaolo Bonzini semihosting_get_cmdline(void)54*5837db46SPaolo Bonziniconst char *semihosting_get_cmdline(void) 55*5837db46SPaolo Bonzini { 56*5837db46SPaolo Bonzini return NULL; 57*5837db46SPaolo Bonzini } 58*5837db46SPaolo Bonzini semihosting_arg_fallback(const char * file,const char * cmd)59*5837db46SPaolo Bonzinivoid semihosting_arg_fallback(const char *file, const char *cmd) 60*5837db46SPaolo Bonzini { 61*5837db46SPaolo Bonzini } 62*5837db46SPaolo Bonzini qemu_semihosting_chardev_init(void)63*5837db46SPaolo Bonzinivoid qemu_semihosting_chardev_init(void) 64*5837db46SPaolo Bonzini { 65*5837db46SPaolo Bonzini } 66