2
0

semihost.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. #include "qemu/osdep.h"
  11. #include "qemu/option.h"
  12. #include "qemu/error-report.h"
  13. #include "hw/semihosting/semihost.h"
  14. #include "sysemu/sysemu.h"
  15. /* Empty config */
  16. QemuOptsList qemu_semihosting_config_opts = {
  17. .name = "",
  18. .head = QTAILQ_HEAD_INITIALIZER(qemu_semihosting_config_opts.head),
  19. .desc = {
  20. { /* end of list */ }
  21. },
  22. };
  23. /* Queries to config status default to off */
  24. bool semihosting_enabled(void)
  25. {
  26. return false;
  27. }
  28. SemihostingTarget semihosting_get_target(void)
  29. {
  30. return SEMIHOSTING_TARGET_AUTO;
  31. }
  32. /*
  33. * All the rest are empty subs. We could g_assert_not_reached() but
  34. * that adds extra weight to the final binary. Waste not want not.
  35. */
  36. void qemu_semihosting_enable(void)
  37. {
  38. }
  39. int qemu_semihosting_config_options(const char *optarg)
  40. {
  41. return 1;
  42. }
  43. const char *semihosting_get_arg(int i)
  44. {
  45. return NULL;
  46. }
  47. int semihosting_get_argc(void)
  48. {
  49. return 0;
  50. }
  51. const char *semihosting_get_cmdline(void)
  52. {
  53. return NULL;
  54. }
  55. void semihosting_arg_fallback(const char *file, const char *cmd)
  56. {
  57. }
  58. void qemu_semihosting_connect_chardevs(void)
  59. {
  60. }
  61. void qemu_semihosting_console_init(void)
  62. {
  63. }