53c1557b | 14-Aug-2024 |
Alistair Francis <alistair.francis@wdc.com> |
hw/char: sifive_uart: Print uart characters async
The current approach of using qemu_chr_fe_write() and ignoring the return values results in dropped characters [1].
Let's update the SiFive UART to
hw/char: sifive_uart: Print uart characters async
The current approach of using qemu_chr_fe_write() and ignoring the return values results in dropped characters [1].
Let's update the SiFive UART to use a async sifive_uart_xmit() function to transmit the characters and apply back pressure to the guest with the SIFIVE_UART_TXFIFO_FULL status.
This should avoid dropped characters and more realisticly model the hardware.
1: https://gitlab.com/qemu-project/qemu/-/issues/2114
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Tested-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240910045419.1252277-3-alistair.francis@wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
37b724cd | 05-Sep-2024 |
Bernhard Beschow <shentey@gmail.com> |
hw/char/serial.h: Extract serial-isa.h
The includes where updated based on compile errors. Now, the inclusion of the header roughly matches Kconfig dependencies:
# grep -r -e "select SERIAL_ISA"
hw/char/serial.h: Extract serial-isa.h
The includes where updated based on compile errors. Now, the inclusion of the header roughly matches Kconfig dependencies:
# grep -r -e "select SERIAL_ISA" hw/ppc/Kconfig: select SERIAL_ISA hw/isa/Kconfig: select SERIAL_ISA hw/sparc64/Kconfig: select SERIAL_ISA hw/i386/Kconfig: select SERIAL_ISA hw/i386/Kconfig: select SERIAL_ISA # for serial_hds_isa_init()
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Link: https://lore.kernel.org/r/20240905073832.16222-3-shentey@gmail.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
283e0d9d | 10-Sep-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
hw/char: replace assert(0) with g_assert_not_reached()
Use of assert(false) can trip spurious control flow warnings from some versions of GCC (i.e. using -fsanitize=thread with gcc-12):
error: co
hw/char: replace assert(0) with g_assert_not_reached()
Use of assert(false) can trip spurious control flow warnings from some versions of GCC (i.e. using -fsanitize=thread with gcc-12):
error: control reaches end of non-void function [-Werror=return-type] default: assert(0); | } | ^
Solve that by unifying the code base on g_assert_not_reached() instead.
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240910221606.1817478-5-pierrick.bouvier@linaro.org> [PMD: Add description suggested by Eric Blake] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
34acb67f | 04-Sep-2024 |
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
hw/char/escc: convert Sun mouse to use QemuInputHandler
Update the Sun mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function.
Note that this con
hw/char/escc: convert Sun mouse to use QemuInputHandler
Update the Sun mouse implementation to use QemuInputHandler instead of the legacy qemu_add_mouse_event_handler() function.
Note that this conversion adds extra sunmouse_* members to ESCCChannelState but they are not added to the migration stream (similar to the Sun keyboard members). If this were desired in future, the Sun devices should be split into separate devices and added to the migration stream there instead.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2518 Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Carl Hauser <chauser@pullman.com> Message-ID: <20240904102301.175706-1-mark.cave-ayland@ilande.co.uk> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
40871ca7 | 18-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/char/pl011: Rename RX FIFO methods
In preparation of having a TX FIFO, rename the RX FIFO methods.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee
hw/char/pl011: Rename RX FIFO methods
In preparation of having a TX FIFO, rename the RX FIFO methods.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240719181041.49545-12-philmd@linaro.org>
show more ...
|
51b61dd4 | 18-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/char/pl011: Warn when using disabled transmitter
We shouldn't transmit characters when the full UART or its transmitter is disabled. However we don't want to break the possibly incomplete "my fir
hw/char/pl011: Warn when using disabled transmitter
We shouldn't transmit characters when the full UART or its transmitter is disabled. However we don't want to break the possibly incomplete "my first bare metal assembly program"s, so we choose to simply display a warning when this occurs.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240719181041.49545-9-philmd@linaro.org>
show more ...
|
dee8284b | 18-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/char/pl011: Extract pl011_read_rxdata() from pl011_read()
To keep MemoryRegionOps read/write handlers with similar logic, factor pl011_read_txdata() out of pl011_read(), similar to what the previ
hw/char/pl011: Extract pl011_read_rxdata() from pl011_read()
To keep MemoryRegionOps read/write handlers with similar logic, factor pl011_read_txdata() out of pl011_read(), similar to what the previous commit did to pl011_write(). No functional change intended.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240719181041.49545-8-philmd@linaro.org>
show more ...
|
bd6051b7 | 22-May-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/char/pl011: Extract pl011_write_txdata() from pl011_write()
When implementing FIFO, this code will become more complex. Start by factoring it out to a new pl011_write_txdata() function. No functi
hw/char/pl011: Extract pl011_write_txdata() from pl011_write()
When implementing FIFO, this code will become more complex. Start by factoring it out to a new pl011_write_txdata() function. No functional change intended.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240719181041.49545-7-philmd@linaro.org>
show more ...
|
02b1f7f6 | 22-May-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/char/pl011: Split RX/TX path of pl011_reset_fifo()
To be able to reset the RX or TX FIFO separately, split pl011_reset_fifo() in two.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Re
hw/char/pl011: Split RX/TX path of pl011_reset_fifo()
To be able to reset the RX or TX FIFO separately, split pl011_reset_fifo() in two.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240719181041.49545-6-philmd@linaro.org>
show more ...
|
1fb2721a | 18-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/char/pl011: Move pl011_loopback_enabled|tx() around
We'll soon use pl011_loopback_enabled() and pl011_loopback_tx() from functions defined before their declarations. In order to avoid forward-dec
hw/char/pl011: Move pl011_loopback_enabled|tx() around
We'll soon use pl011_loopback_enabled() and pl011_loopback_tx() from functions defined before their declarations. In order to avoid forward-declaring them, move them around.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20240719181041.49545-5-philmd@linaro.org>
show more ...
|
56608022 | 18-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
hw/char/pl011: Move pl011_put_fifo() earlier
Avoid forward-declaring pl011_put_fifo() by moving it earlier.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <pet
hw/char/pl011: Move pl011_put_fifo() earlier
Avoid forward-declaring pl011_put_fifo() by moving it earlier.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20240719181041.49545-4-philmd@linaro.org>
show more ...
|