]> xenbits.xensource.com Git - people/pauldu/qemu.git/commitdiff
serial: Allow unaligned i/o access
authorArwed Meyer <arwed.meyer@gmx.de>
Sun, 11 Sep 2022 18:18:40 +0000 (20:18 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 29 Sep 2022 10:38:05 +0000 (14:38 +0400)
Unaligned i/o access on serial UART works on real PCs.
This is used for example by FreeDOS CTMouse driver. Without this it
can't reset and detect serial mice.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/77
Signed-off-by: Arwed Meyer <arwed.meyer@gmx.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220911181840.8933-6-arwed.meyer@gmx.de>

hw/char/serial.c

index 7061aacbce9cd6a63449129c1e102047eb2543bc..41b5e61977d362e2cda86707d4255bb6486a1993 100644 (file)
@@ -961,6 +961,9 @@ void serial_set_frequency(SerialState *s, uint32_t frequency)
 const MemoryRegionOps serial_io_ops = {
     .read = serial_ioport_read,
     .write = serial_ioport_write,
+    .valid = {
+        .unaligned = 1,
+    },
     .impl = {
         .min_access_size = 1,
         .max_access_size = 1,