[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/57] hw/mips/mipssim: Use MMIO serial device on fake ISA I/O
From: |
Paolo Bonzini |
Subject: |
[PULL 18/57] hw/mips/mipssim: Use MMIO serial device on fake ISA I/O |
Date: |
Sat, 19 Sep 2020 11:58:37 -0400 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
The 'mipssim' is not a real hardware, it is a simulator.
There is an ISA MMIO space mapped at 0x1fd00000, however
this is not a real ISA bus (no ISA IRQ). So can not use
the TYPE_ISA_SERIAL device...
Instead we have been using a plain MMIO device, but named
it IO.
TYPE_SERIAL_IO is a subset of TYPE_SERIAL_MM, using
regshift=0 and endianness=DEVICE_LITTLE_ENDIAN.
Directly use the TYPE_SERIAL_MM device, enforcing the
regshift/endianness values. 'regshift' default is already
'0'. 'endianness' is meaningless for 8-bit accesses.
This change breaks migration back compatibility, but
this is not an issue for the mipssim machine.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200907011538.818996-2-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/mips/mipssim.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
index 1b3b762203..5d4ad74828 100644
--- a/hw/mips/mipssim.c
+++ b/hw/mips/mipssim.c
@@ -216,10 +216,11 @@ mips_mipssim_init(MachineState *machine)
* MIPS CPU INT2, which is interrupt 4.
*/
if (serial_hd(0)) {
- DeviceState *dev = qdev_new(TYPE_SERIAL_IO);
+ DeviceState *dev = qdev_new(TYPE_SERIAL_MM);
qdev_prop_set_chr(dev, "chardev", serial_hd(0));
- qdev_set_legacy_instance_id(dev, 0x3f8, 2);
+ qdev_prop_set_uint8(dev, "regshift", 0);
+ qdev_prop_set_uint8(dev, "endianness", DEVICE_LITTLE_ENDIAN);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, env->irq[4]);
sysbus_add_io(SYS_BUS_DEVICE(dev), 0x3f8,
--
2.26.2
- [PULL 15/57] numa: drop support for '-numa node' (without memory specified), (continued)
- [PULL 15/57] numa: drop support for '-numa node' (without memory specified), Paolo Bonzini, 2020/09/19
- [PULL 26/57] hw/char/serial-{isa, pci}: Alias QDEV properties from generic serial object, Paolo Bonzini, 2020/09/19
- [PULL 29/57] hw: megasas: consider 'iov_count=0' is an error in megasas_map_sgl, Paolo Bonzini, 2020/09/19
- [PULL 31/57] meson: move libudev test, Paolo Bonzini, 2020/09/19
- [PULL 45/57] oslib-posix: relocate path to /var, Paolo Bonzini, 2020/09/19
- [PULL 21/57] hw/char/serial: Assert serial_ioport_read/write offset fits 8 bytes, Paolo Bonzini, 2020/09/19
- [PULL 32/57] meson: move libmpathpersist test, Paolo Bonzini, 2020/09/19
- [PULL 47/57] net: relocate paths to helpers and scripts, Paolo Bonzini, 2020/09/19
- [PULL 35/57] configure: fix --meson=/path/to/meson, Paolo Bonzini, 2020/09/19
- [PULL 52/57] ui: relocate paths to icons and translations, Paolo Bonzini, 2020/09/19
- [PULL 18/57] hw/mips/mipssim: Use MMIO serial device on fake ISA I/O,
Paolo Bonzini <=
- [PULL 40/57] meson: report accelerator support, Paolo Bonzini, 2020/09/19
- [PULL 53/57] configure: use a platform-neutral prefix, Paolo Bonzini, 2020/09/19
- [PULL 20/57] configure: rename QEMU_GA_MSI_ENABLED to CONFIG_QGA_MSI, Paolo Bonzini, 2020/09/19
- [PULL 22/57] hw/char/serial: Replace commented DPRINTF() by trace event, Paolo Bonzini, 2020/09/19
- [PULL 25/57] hw/char/serial: Make 'wakeup' property boolean, Paolo Bonzini, 2020/09/19
- [PULL 41/57] oslib: do not call g_strdup from qemu_get_exec_dir, Paolo Bonzini, 2020/09/19
- [PULL 56/57] checkpatch: avoid error on cover letter files, Paolo Bonzini, 2020/09/19
- [PULL 38/57] meson: qtest: set "depends" correctly, Paolo Bonzini, 2020/09/19
- [PULL 44/57] cutils: introduce get_relocated_path, Paolo Bonzini, 2020/09/19
- [PULL 34/57] configure: move malloc_trim/tcmalloc/jemalloc to meson, Paolo Bonzini, 2020/09/19