| 1 | /* |
| 2 | * Semihosting Stubs for system emulation |
| 3 | * |
| 4 | * Copyright (c) 2019 Linaro Ltd |
| 5 | * |
| 6 | * Stubs for system 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 "semihosting/semihost.h" |
| 15 | |
| 16 | /* Empty config */ |
| 17 | QemuOptsList qemu_semihosting_config_opts = { |
| 18 | .name = "", |
| 19 | .head = QTAILQ_HEAD_INITIALIZER(qemu_semihosting_config_opts.head), |
| 20 | .desc = { |
| 21 | { /* end of list */ } |
| 22 | }, |
| 23 | }; |
| 24 | |
| 25 | /* |
| 26 | * All the rest are empty subs. We could g_assert_not_reached() but |
| 27 | * that adds extra weight to the final binary. Waste not want not. |
| 28 | */ |
| 29 | void qemu_semihosting_enable(void) |
| 30 | { |
| 31 | } |
| 32 | |
| 33 | int qemu_semihosting_config_options(const char *optstr) |
| 34 | { |
| 35 | return 1; |
| 36 | } |
| 37 | |
| 38 | const char *semihosting_get_arg(int i) |
| 39 | { |
| 40 | return NULL; |
| 41 | } |
| 42 | |
| 43 | int semihosting_get_argc(void) |
| 44 | { |
| 45 | return 0; |
| 46 | } |
| 47 | |
| 48 | const char *semihosting_get_cmdline(void) |
| 49 | { |
| 50 | return NULL; |
| 51 | } |
| 52 | |
| 53 | void semihosting_arg_fallback(const char *file, const char *cmd) |
| 54 | { |
| 55 | } |
| 56 | |
| 57 | void qemu_semihosting_chardev_init(void) |
| 58 | { |
| 59 | } |