[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 06/26] emul/ns16x50: implement SCR register





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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.