[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 02/29] semihosting: fix order of initialization functions

From: Paolo Bonzini
Subject: [PATCH 02/29] semihosting: fix order of initialization functions
Date: Tue, 27 Oct 2020 14:21:17 -0400

qemu_semihosting_console_init uses semihosting.chardev which is set
by qemu_semihosting_connect_chardevs.  Thus qemu_semihosting_connect_chardevs
has to be called first.

Both have to be called after processing -serial and friends though, so
that the semihosting console can connect to a multiplexer as in
"-serial mon:stdio -semihosting-config chardev=serial0"

Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: 619985e937 ("semihosting: defer connect_chardevs a little more to use 
serialx", 2020-07-27)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
 softmmu/vl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/softmmu/vl.c b/softmmu/vl.c
index d39d914dd0..b0ccfd750a 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -4280,9 +4280,6 @@ void qemu_init(int argc, char **argv, char **envp)
                       mon_init_func, NULL, &error_fatal);
-    /* connect semihosting console input if requested */
-    qemu_semihosting_console_init();
     if (foreach_device_config(DEV_SERIAL, serial_parse) < 0)
     if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0)
@@ -4292,6 +4289,7 @@ void qemu_init(int argc, char **argv, char **envp)
     /* now chardevs have been created we may have semihosting to connect */
+    qemu_semihosting_console_init();
     /* If no default VGA is requested, the default is "none".  */
     if (default_vga) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]