[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 06/26] emul/ns16x50: implement SCR register
- To: dmukhin@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Mon, 16 Nov 2026 11:42:49 +0100
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20260707 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Content-Type:In-Reply-To:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
- Cc: andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, jbeulich@xxxxxxxx, julien@xxxxxxx, michal.orzel@xxxxxxx, roger@xxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx, xakep.amatop@xxxxxxxxx, dmukhin@xxxxxxx
- Delivery-date: Mon, 16 Nov 2026 10:42:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11/11/26 8:47 PM, dmukhin@xxxxxxxx wrote:
From: Denis Mukhin <dmukhin@xxxxxxxx>
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 <dmukhin@xxxxxxxx>
---
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 80805ee6ecc6..2371aa32d03f 100644
--- a/xen/common/emul/vuart/ns16x50.c
+++ b/xen/common/emul/vuart/ns16x50.c
@@ -145,6 +145,11 @@ static int ns16x50_io_write8(
/* DLAB=0 */
break;
+ /* NB: Firmware (e.g. OVMF) may rely on SCR presence. */
Nit: the comment sits only on the write side, and above the case label
rather than inside it like the other DLAB comments; with the commit
message saying the same, I'd drop it or move it next to the definition
of NS16X50_REGS_NUM, which is what makes SCR emulated at all.
+ case UART_SCR:
+ regs[UART_SCR] = val;
+ break;
+
default:
rc = -EINVAL;
break;
@@ -234,6 +239,10 @@ static int ns16x50_io_read8(
/* DLAB=0 */
break;
+ case UART_SCR:
+ val = regs[UART_SCR];
+ break;
+
default:
rc = -EINVAL;
break;
Reviwed-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
~ Oleksii
|