From: "Alex Bennée" <alex.bennee@linaro.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Richard Henderson <richard.henderson@linaro.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH v5 2/2] target/xtensa: Use semihosting/syscalls.h
Date: Wed, 29 Jun 2022 11:02:27 +0100 [thread overview]
Message-ID: <87h743ixob.fsf@linaro.org> (raw)
In-Reply-To: <CAMo8BfLmQFKh-BuFXWqU2w+T_nVmBjXZ24THHneyJmdgcYPZ5Q@mail.gmail.com>
Max Filippov <jcmvbkbc@gmail.com> writes:
> On Wed, Jun 29, 2022 at 1:09 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>> Richard Henderson <richard.henderson@linaro.org> writes:
>> > On 6/28/22 19:08, Max Filippov wrote:
>> >> On Tue, Jun 28, 2022 at 4:43 AM Richard Henderson
>> >> <richard.henderson@linaro.org> wrote:
>
>> >>> }
>> >>> - if (serial_hd(0)) {
>> >>> - xtensa_sim_open_console(serial_hd(0));
>> >>> - }
>> >> I've noticed that with this change '-serial stdio' and its variants
>> >> are still
>> >> accepted in the command line, but now they do nothing.
>> >
>> > Pardon? They certainly will do something, via writes to the serial hardware.
>> >
>> >
>> >> This quiet
>> >> change of behavior is unfortunate. I wonder if it would be acceptable
>> >> to map the '-serial stdio' option in the presence of '-semihosting' to
>> >> something like '-chardev stdio,id=id1 -semihosting-config chardev=id1'?
>> >
>> > I dunno. I'm wary of having xtensa be unique here. Alex, thoughts?
>>
>> Is semihosting *the* serial hardware for xtensa-sim or is it overriding
>> another serial interface? I'm wary of adding more magical behaviour for
>> -serial as it can be confusing enough already what actually gets routed
>> to it if not doing everything explicitly.
>
> There's no notion of 'serial hardware' for the xtensa-sim, all it has is
> the three standard stdio file descriptors.
Which are accessed via semihosting calls? Are they implicitly mapped to
3 chardev devices for stdin, stdout and stderr?
> But it was convenient thinking
> of them as a serial port. I agree that no magic is needed here, but
> the change shouldn't be quiet eiter, so xtensa-sim should warn (or
> maybe even quit with an error code) when it sees the -serial option.
If the default chardevs already map to the 3 FDs then perhaps -serial
should be invalid because it is more explicit to use -chardev to
redirect the stream you want somewhere else. However I don't see them at
the moment:
➜ ./qemu-system-xtensa -M sim -semihosting -S -display none -monitor stdio
QEMU 7.0.50 monitor - type 'help' for more information
(qemu) info chardev
compat_monitor0: filename=stdio
parallel0: filename=vc
--
Alex Bennée
next prev parent reply other threads:[~2022-06-29 10:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 11:43 [PATCH v5 0/2] target/xtensa: semihosting cleanup Richard Henderson
2022-06-28 11:43 ` [PATCH v5 1/2] target/xtensa: Use an exception for semihosting Richard Henderson
2022-06-28 11:43 ` [PATCH v5 2/2] target/xtensa: Use semihosting/syscalls.h Richard Henderson
2022-06-28 13:38 ` Max Filippov
2022-06-29 0:36 ` Richard Henderson
2022-06-29 8:06 ` Alex Bennée
2022-06-29 8:40 ` Max Filippov
2022-06-29 10:02 ` Alex Bennée [this message]
2022-06-29 10:38 ` Max Filippov
2022-06-29 8:34 ` Max Filippov
2022-06-28 13:40 ` [PATCH v5 0/2] target/xtensa: semihosting cleanup Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h743ixob.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=jcmvbkbc@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.