[PATCH v2 0/2] xen/ns16550: preserve UART operation across firmware handover

Zhang Zheng posted 2 patches 1 month, 2 weeks ago
Only 1 patches received!
There is a newer version of this series
xen/drivers/char/ns16550.c  | 16 +++++++++++++++-
xen/include/xen/8250-uart.h |  1 +
2 files changed, 16 insertions(+), 1 deletion(-)
[PATCH v2 0/2] xen/ns16550: preserve UART operation across firmware handover
Posted by Zhang Zheng 1 month, 2 weeks ago
V1 replaced the RISC-V SBI early console with direct 8250 MMIO access.
Following review, v2 keeps the generic SBI console and instead fixes the
handover in ns16550.

K3 testing exposed two issues during this handover: clearing IER disables
its XScale-compatible UART, and resetting the FIFO can discard output
still pending after an SBI console call.  I originally planned to submit
the XScale support separately, but both fixes are needed for the same
handover, so they are included here as two patches.

Tested with QEMU 11.0.0/OpenSBI 1.7 and on SpacemiT K3 hardware.

Changes in v2:
  - Keep the SBI early console and legacy SBI v0.1 support.
  - Preserve UART_IER_UUE and drain TX before ns16550 reinitialization.

v1: https://lore.kernel.org/xen-devel/20260928023857.1030884-1-zhangzheng@iscas.ac.cn/

Zhang Zheng (2):
  xen/ns16550: detect and preserve UART_IER_UUE
  xen/ns16550: drain TX before reinitializing

 xen/drivers/char/ns16550.c  | 16 +++++++++++++++-
 xen/include/xen/8250-uart.h |  1 +
 2 files changed, 16 insertions(+), 1 deletion(-)


base-commit: 0d3bb3c98bc99ec1c84ebb3df71b6e18daebff4f
-- 
2.54.0