Alex Bennée | 16932bb | 2019-05-13 15:25:27 +0100 | [diff] [blame] | 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" |
Philippe Mathieu-Daudé | 6b5fe13 | 2021-03-05 13:54:49 +0000 | [diff] [blame] | 14 | #include "semihosting/semihost.h" |
Alex Bennée | 16932bb | 2019-05-13 15:25:27 +0100 | [diff] [blame] | 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 | /* Queries to config status default to off */ |
| 26 | bool semihosting_enabled(void) |
| 27 | { |
| 28 | return false; |
| 29 | } |
| 30 | |
| 31 | SemihostingTarget semihosting_get_target(void) |
| 32 | { |
| 33 | return SEMIHOSTING_TARGET_AUTO; |
| 34 | } |
| 35 | |
| 36 | /* |
| 37 | * All the rest are empty subs. We could g_assert_not_reached() but |
| 38 | * that adds extra weight to the final binary. Waste not want not. |
| 39 | */ |
| 40 | void qemu_semihosting_enable(void) |
| 41 | { |
| 42 | } |
| 43 | |
| 44 | int qemu_semihosting_config_options(const char *optarg) |
| 45 | { |
| 46 | return 1; |
| 47 | } |
| 48 | |
| 49 | const char *semihosting_get_arg(int i) |
| 50 | { |
| 51 | return NULL; |
| 52 | } |
| 53 | |
| 54 | int semihosting_get_argc(void) |
| 55 | { |
| 56 | return 0; |
| 57 | } |
| 58 | |
| 59 | const char *semihosting_get_cmdline(void) |
| 60 | { |
| 61 | return NULL; |
| 62 | } |
| 63 | |
| 64 | void semihosting_arg_fallback(const char *file, const char *cmd) |
| 65 | { |
| 66 | } |
Alex Bennée | 4e7f903 | 2019-05-14 15:30:14 +0100 | [diff] [blame] | 67 | |
| 68 | void qemu_semihosting_connect_chardevs(void) |
| 69 | { |
| 70 | } |
Keith Packard | 8de702c | 2019-11-04 12:42:30 -0800 | [diff] [blame] | 71 | |
| 72 | void qemu_semihosting_console_init(void) |
| 73 | { |
| 74 | } |