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