aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorArwed Meyer <arwed.meyer@gmx.de>2022-09-11 20:18:40 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-09-29 14:38:05 +0400
commit769a726ccb9a8ab9b2a05bca648c79b3f80ab8de (patch)
treed974a3da56771ebb6dbe072158364c499322ea61 /hw
parent50d03d485251d63931a69b3ad7004f3bb6ac8eee (diff)
serial: Allow unaligned i/o access
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/char/serial.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 7061aacbce..41b5e61977 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -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,