OSDN Git Service

hw/char/pl011: better handling of FIFO flags on LCR reset
authorEvgeny Iakovlev <eiakovlev@linux.microsoft.com>
Mon, 23 Jan 2023 16:23:03 +0000 (17:23 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 3 Feb 2023 12:59:22 +0000 (12:59 +0000)
commit23dcbfc080eb8a8e8395d753f07adbb0ab761143
tree5e821f12780adcc31902a9da95eecb391a1a9771
parent3b7a165e8c94b1f7eee326fa6b68eb45f0324ea1
hw/char/pl011: better handling of FIFO flags on LCR reset

Current FIFO handling code does not reset RXFE/RXFF flags when guest
resets FIFO by writing to UARTLCR register, although internal FIFO state
is reset to 0 read count. Actual guest-visible flag update will happen
only on next data read or write attempt. As a result of that any guest
that expects RXFE flag to be set (and RXFF to be cleared) after resetting
FIFO will never see that happen.

Signed-off-by: Evgeny Iakovlev <eiakovlev@linux.microsoft.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230123162304.26254-5-eiakovlev@linux.microsoft.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/char/pl011.c