[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 06/11] hw/char/pl011: Extract pl011_write_txdata() from pl
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 06/11] hw/char/pl011: Extract pl011_write_txdata() from pl011_write() |
Date: |
Thu, 12 Oct 2023 15:07:15 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 14/7/23 08:58, Richard Henderson wrote:
On 7/10/23 18:50, Philippe Mathieu-Daudé wrote:
+static void pl011_write_txdata(PL011State *s, const uint8_t *buf, int
length)
+{
+ /* ??? Check if transmitter is enabled. */
+
+ /* XXX this blocks entire thread. Rewrite to use
+ * qemu_chr_fe_write and background I/O callbacks */
+ qemu_chr_fe_write_all(&s->chr, buf, 1);
Not using length?
This is a simple "code extract" patch. Length is used when
we switch to FIFO in the last patch.
+ pl011_write_txdata(s, (uint8_t *) &value, 1);
Host endianness error. Copy to local uint8_t first.
Oops, good catch, thanks.
- Re: [PATCH v2 06/11] hw/char/pl011: Extract pl011_write_txdata() from pl011_write(),
Philippe Mathieu-Daudé <=