From: Duo jia <jiaduo19920301@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: Application of QEMUTimer in short timing.
Date: Thu, 9 Sep 2021 20:21:53 +0800 [thread overview]
Message-ID: <CALUzjTY3AP6AQKU4kAT0NT4CAwJpy9dsgXHT8YHq7PdWEokfDg@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-LOUvZu4g1gK3WjrmZpH+B8aj5wrEY77isihetQmPUpA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]
Got it.
Peter Maydell <peter.maydell@linaro.org> 于2021年9月8日周三 下午5:47写道:
> On Wed, 8 Sept 2021 at 03:50, Duo jia <jiaduo19920301@gmail.com> wrote:
> > Also I want to know how to make a delay in qemu.
> > For example, when I send a UART data, there is a certain time interval
> from setting the register to when the data is sent. Most of this time does
> not affect the simulation effect, but some guest firmware will execute
> errors when there is no such delay. This is a comparison. Few, but it does
> exist.
> >
> > My question is, if I really want to add such a delay, how to do it. For
> example, in USART, can I set a callback for sending completion, or add some
> delays that will not cause qemu to freeze.
>
> You can do this kind of thing with an additional timer.
> Look at hw/char/cadenc_uart.c and its handling of char_tx_time
> for an example. In that case it is (despite the name)
> modelling slow data receive, not slow data transmit, but
> the basic idea is the same.
>
> As you say, though, very little guest code really cares about
> UART character timings (and the guest code that does is probably
> buggy strictly speaking). So if I were you I would put "model
> delays in UART timings" very low on your priority list...
>
> -- PMM
>
[-- Attachment #2: Type: text/html, Size: 1700 bytes --]
prev parent reply other threads:[~2021-09-09 12:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 11:26 Application of QEMUTimer in short timing Duo jia
2021-09-07 12:19 ` Peter Maydell
2021-09-08 2:50 ` Duo jia
2021-09-08 9:46 ` Peter Maydell
2021-09-09 12:21 ` Duo jia [this message]
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=CALUzjTY3AP6AQKU4kAT0NT4CAwJpy9dsgXHT8YHq7PdWEokfDg@mail.gmail.com \
--to=jiaduo19920301@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).