qemu-patch-raspberry4/hw
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
..
9pfs trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
acpi acpi: verify file entries in bios_linker_loader_add_pointer() 2019-04-02 11:49:14 -04:00
adc kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
alpha * Kconfig improvements (msi_nonbroken, imply for default PCI devices) 2019-03-28 09:18:53 +00:00
arm Kconfig settings for the Arm machines 2019-05-13 16:52:56 +01:00
audio Revert "audio: fix pc speaker init" 2019-04-01 08:53:40 +02:00
block pflash_cfi01: New pflash_cfi01_legacy_drive() 2019-05-07 12:55:02 +01:00
bt kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
char hw/char/escc: Lower irq when transmit buffer is filled 2019-05-17 09:11:50 +01:00
core hw: add compat machines for 4.1 2019-04-25 14:16:41 -03:00
cpu kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
cris cris-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
display Kconfig settings for the Arm machines 2019-05-13 16:52:56 +01:00
dma hw/dma: Compile the bcm2835_dma device as common object 2019-04-29 17:36:03 +01:00
gpio Pull request 2019-03-25 17:01:10 +00:00
hppa * Kconfig improvements (msi_nonbroken, imply for default PCI devices) 2019-03-28 09:18:53 +00:00
hyperv hyperv: express dependencies with kconfig 2019-03-07 21:45:53 +01:00
i2c hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig 2019-05-13 09:36:31 +02:00
i386 Kconfig settings for the Arm machines 2019-05-13 16:52:56 +01:00
ide Kconfig settings for the Arm machines 2019-05-13 16:52:56 +01:00
input virtio-input: fix Kconfig dependency and Makefile 2019-05-13 08:49:30 +02:00
intc hw/intc/armv7m_nvic: Don't enable ARMV7M_EXCP_DEBUG from reset 2019-05-07 12:55:03 +01:00
ipack build: convert pci.mak to Kconfig 2019-03-07 21:45:53 +01:00
ipmi ipmi: express dependencies with kconfig 2019-03-07 21:45:53 +01:00
isa * Kconfig improvements (msi_nonbroken, imply for default PCI devices) 2019-03-28 09:18:53 +00:00
lm32 pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
m68k m68k-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
mem trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
microblaze pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
mips mips/boston: Report errors with error_report(), not error_printf() 2019-04-17 21:21:49 +02:00
misc hw/arm: Express dependencies of the fsl-imx31 machine with Kconfig 2019-05-13 09:36:31 +02:00
moxie moxie-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
net hw/net/pcnet: Use qemu_log_mask(GUEST_ERROR) instead of printf 2019-05-02 18:12:58 +02:00
nios2 Add generic Nios II board. 2019-04-29 16:09:51 +01:00
nvram trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
openrisc target/openrisc: Fix LGPL information in the file headers 2019-05-08 17:45:54 +02:00
pci hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs 2019-05-13 09:36:31 +02:00
pci-bridge kconfig: add dependencies on CONFIG_MSI_NONBROKEN 2019-03-18 09:39:57 +01:00
pci-host hw/pci-host: Use object_initialize_child for correct reference counting 2019-05-02 16:56:33 +02:00
pcmcia kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
ppc ppc patch queue 2019-04-26 2019-04-27 21:34:46 +01:00
rdma Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
riscv riscv: plic: Log guest errors 2019-04-04 16:36:21 -07:00
s390x Machine queue, 2019-04-25 2019-04-26 14:30:18 +01:00
scsi trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
sd Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
sh4 hw/usb/hcd-ohci: Move PCI-related code into a separate file 2019-05-02 08:42:17 +02:00
smbios kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
sparc hw/sparc/leon3: Allow load of uImage firmwares 2019-05-03 13:03:04 +02:00
sparc64 * Kconfig improvements (msi_nonbroken, imply for default PCI devices) 2019-03-28 09:18:53 +00:00
ssi hw/ssi/xilinx_spips: Avoid variable length array 2019-04-29 17:35:57 +01:00
timer Normalize header guard symbol definition. 2019-05-13 08:58:55 +02:00
tpm Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
tricore - qtest fixes 2019-03-08 16:31:34 +00:00
unicore32 unicore32-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
usb hw/usb: avoid format truncation warning when formatting port name 2019-05-03 08:56:58 +02:00
vfio ppc patch queue 2019-04-26 2019-04-27 21:34:46 +01:00
virtio virtio-input-host-pci: cleanup types 2019-05-13 08:49:30 +02:00
watchdog trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
xen trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
xenpv xen: Replace few mentions of xend by libxl 2019-01-14 13:45:40 +00:00
xtensa Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
Kconfig kconfig: add dependencies on CONFIG_MSI_NONBROKEN 2019-03-18 09:39:57 +01:00
Makefile.objs i2c: express dependencies with Kconfig 2019-03-07 21:45:53 +01:00