qemu-patch-raspberry4/hw/char
Stephen Checkoway 6b99a110c7 hw/char/escc: Lower irq when transmit buffer is filled
The SCC/ESCC will briefly stop asserting an interrupt when the
transmit FIFO is filled.

This code doesn't model the transmit FIFO/shift register so the
pending transmit interrupt is never deasserted which means that an
edge-triggered interrupt controller will never see the low-to-high
transition it needs to raise another interrupt. The practical
consequence of this is that guest firmware with an interrupt service
routine for the ESCC that does not send all of the data it has
immediately will stop sending data if the following sequence of
events occurs:
1. Disable processor interrupts
2. Write a character to the ESCC
3. Add additional characters to a buffer which is drained by the ISR
4. Enable processor interrupts

In this case, the first character will be sent, the interrupt will
fire and the ISR will output the second character. Since the pending
transmit interrupt remains asserted, no additional interrupts will
ever fire.

This behavior was triggered by firmware for an embedded system with a
Z85C30 which necessitated this patch.

This patch fixes that situation by explicitly lowering the IRQ when a
character is written to the buffer and no other interrupts are currently
pending.

Signed-off-by: Stephen Checkoway <stephen.checkoway@oberlin.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-05-17 09:11:50 +01:00
..
bcm2835_aux.c bcm2835_aux: Swap RX and TX interrupt assignments 2018-07-16 17:18:42 +01:00
cadence_uart.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
cmsdk-apb-uart.c hw/char/cmsdk-apb-uart.c: Accept more input after character read 2018-05-04 18:05:50 +01:00
debugcon.c misc: drop old i386 dependency 2017-12-18 17:07:03 +03:00
digic-uart.c hw/digic: Add trailing '\n' to qemu_log() calls 2018-06-08 13:15:33 +01:00
escc.c hw/char/escc: Lower irq when transmit buffer is filled 2019-05-17 09:11:50 +01:00
etraxfs_ser.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
exynos4210_uart.c hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev 2018-04-26 13:57:00 +01:00
grlib_apbuart.c char/grlib_apbuart: Convert sysbus init function to realize function 2018-12-13 13:47:57 +00:00
imx_serial.c imx_serial: Generate interrupt on receive data ready if enabled 2018-08-20 11:24:31 +01:00
ipoctal232.c char: avoid chardevice direct access 2017-07-14 11:04:33 +02:00
Kconfig virtio: express virtio dependencies with Kconfig 2019-03-07 21:45:53 +01:00
lm32_juart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
lm32_uart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
Makefile.objs hw/char/parallel: Make it possible to compile also without CONFIG_PARALLEL 2019-03-18 09:39:57 +01:00
mcf_uart.c hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
milkymist-uart.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
nrf51_uart.c hw/char: Implement nRF51 SoC UART 2018-11-02 14:03:33 +00:00
omap_uart.c char: allow specifying a GMainContext at opening time 2019-02-13 14:23:39 +01:00
parallel-isa.c hw/char/parallel: Make it possible to compile also without CONFIG_PARALLEL 2019-03-18 09:39:57 +01:00
parallel.c hw/char/parallel: Convert from pdebug() macro to trace events 2018-06-29 15:04:18 +01:00
pl011.c hw/char/pl011: Use '0x' prefix when logging hex numbers 2019-02-21 18:17:46 +00:00
sclpconsole-lm.c s390x/sclp: clean up sclp masks 2018-03-08 15:49:23 +01:00
sclpconsole.c s390x/sclp: clean up sclp masks 2018-03-08 15:49:23 +01:00
serial-isa.c serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS 2018-04-26 13:57:00 +01:00
serial-pci.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
serial.c qmp hmp: Make system_wakeup check wake-up support and run state 2018-12-18 07:55:47 +01:00
sh_serial.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
spapr_vty.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
stm32f2xx_usart.c hw/char/stm32f2xx_usart: Do not update data register when device is disabled 2019-01-21 10:23:10 +00:00
terminal3270.c terminal3270: do not use backend timer sources 2019-02-13 16:46:39 +01:00
trace-events trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
virtio-console.c qapi: Drop qapi_event_send_FOO()'s Error ** argument 2018-08-28 18:21:38 +02:00
virtio-serial-bus.c qdev: pass an Object * to qbus_set_hotplug_handler() 2019-02-17 21:54:02 +11:00
xen_console.c char: allow specifying a GMainContext at opening time 2019-02-13 14:23:39 +01:00
xilinx_uartlite.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00