From: Denis Mukhin <dmuk...@ford.com> Add SCR register emulation to the I/O port handler. Firmware (e.g. OVMF) may use SCR during the guest OS boot.
Signed-off-by: Denis Mukhin <dmuk...@ford.com> --- Changes since v4: - new patch --- xen/common/emul/vuart/ns16x50.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xen/common/emul/vuart/ns16x50.c b/xen/common/emul/vuart/ns16x50.c index 670c3c6dba9d..d57695564329 100644 --- a/xen/common/emul/vuart/ns16x50.c +++ b/xen/common/emul/vuart/ns16x50.c @@ -444,6 +444,11 @@ static int ns16x50_io_write8( break; } + /* NB: Firmware (e.g. OVMF) may rely on SCR presence. */ + case UART_SCR: + regs[UART_SCR] = val; + break; + case UART_LSR: /* RO */ case UART_MSR: /* RO */ default: @@ -566,6 +571,10 @@ static int ns16x50_io_read8( regs[UART_MSR] &= ~UART_MSR_CHANGE; break; + case UART_SCR: + val = regs[UART_SCR]; + break; + default: rc = -EINVAL; break; -- 2.51.0