summaryrefslogtreecommitdiffstats
path: root/semihosting/config.c
diff options
context:
space:
mode:
authorRichard Henderson2022-06-28 06:54:30 +0200
committerRichard Henderson2022-06-28 06:54:31 +0200
commitad4c7f529a279685da84297773b4ec8080153c2d (patch)
treeb5cc9c2dab4334b6ccd544a71a372424e3bd0f74 /semihosting/config.c
parentMerge tag 'pull-target-arm-20220627' of https://git.linaro.org/people/pmaydel... (diff)
parenttarget/nios2: Move nios2-semi.c to nios2_softmmu_ss (diff)
downloadqemu-ad4c7f529a279685da84297773b4ec8080153c2d.tar.gz
qemu-ad4c7f529a279685da84297773b4ec8080153c2d.tar.xz
qemu-ad4c7f529a279685da84297773b4ec8080153c2d.zip
Merge tag 'pull-semi-20220628' of https://gitlab.com/rth7680/qemu into staging
Semihosting syscall reorg: * Split out semihosting/syscalls.c with common implementations. * Reorg arm-compat-semi.c to use syscalls.c. * Minor prep cleanups to m68k, mips, nios2. # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmK6iSodHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8SEwgAmmowW2oeFA9uCrwz # gUJo17AJ+RmRF/zXHyu5CPswylvfwH0zJXAm5BV7P/pVdyaL36b8YcgSEf+EWLsf # rLFHxCshTYEnZSk6yFtWk5bn5azfevHm9/ObPeS9XGL4seQqGy7C/FReoTQ7/zI0 # W3zUDd3bWah3fXw8XYgSzh/RCrC5E2gFFc1G1g+6SIVZ7pbgkre2rRk5WMmylCLd # jf9pmyswrheaKumCoBxU/S4XDgxVpaf3khiIqdbo8A20MDGnK/SZUWsBwJLK3QB8 # SKKv8o1ovbnl/HykABaszCIkO/LIu6SX3LoK7pF2CujkgSuwEN3WW0DOml6+b3fU # J7YeZg== # =sTbM # -----END PGP SIGNATURE----- # gpg: Signature made Tue 28 Jun 2022 10:22:58 AM +0530 # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate] * tag 'pull-semi-20220628' of https://gitlab.com/rth7680/qemu: (60 commits) target/nios2: Move nios2-semi.c to nios2_softmmu_ss target/nios2: Eliminate nios2_semi_is_lseek target/mips: Drop pread and pwrite syscalls from semihosting target/mips: Add UHI errno values target/mips: Use an exception for semihosting target/m68k: Make semihosting system only target/m68k: Eliminate m68k_semi_is_fseek semihosting: Create semihost_sys_poll_one semihosting: Remove qemu_semihosting_console_outs semihosting: Use console_out_gf for SYS_WRITE0 semihosting: Remove qemu_semihosting_console_outc semihosting: Use console_out_gf for SYS_WRITEC semihosting: Use console_in_gf for SYS_READC semihosting: Create qemu_semihosting_guestfd_init semihosting: Add GuestFDConsole semihosting: Create qemu_semihosting_console_write semihosting: Cleanup chardev init semihosting: Expand qemu_semihosting_console_inc to read semihosting: Pass CPUState to qemu_semihosting_console_inc semihosting: Fix docs comment for qemu_semihosting_console_inc ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'semihosting/config.c')
-rw-r--r--semihosting/config.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/semihosting/config.c b/semihosting/config.c
index 3afacf54ab..e171d4d6bc 100644
--- a/semihosting/config.c
+++ b/semihosting/config.c
@@ -51,7 +51,6 @@ QemuOptsList qemu_semihosting_config_opts = {
typedef struct SemihostingConfig {
bool enabled;
SemihostingTarget target;
- Chardev *chardev;
char **argv;
int argc;
const char *cmdline; /* concatenated argv */
@@ -122,11 +121,6 @@ void semihosting_arg_fallback(const char *file, const char *cmd)
}
}
-Chardev *semihosting_get_chardev(void)
-{
- return semihosting.chardev;
-}
-
void qemu_semihosting_enable(void)
{
semihosting.enabled = true;
@@ -172,16 +166,19 @@ int qemu_semihosting_config_options(const char *optarg)
return 0;
}
-void qemu_semihosting_connect_chardevs(void)
+/* We had to defer this until chardevs were created */
+void qemu_semihosting_chardev_init(void)
{
- /* We had to defer this until chardevs were created */
+ Chardev *chr = NULL;
+
if (semihost_chardev) {
- Chardev *chr = qemu_chr_find(semihost_chardev);
+ chr = qemu_chr_find(semihost_chardev);
if (chr == NULL) {
error_report("semihosting chardev '%s' not found",
semihost_chardev);
exit(1);
}
- semihosting.chardev = chr;
}
+
+ qemu_semihosting_console_init(chr);
}