[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/18] hw/mips/jazz: Map the UART devices unconditionally
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 18/18] hw/mips/jazz: Map the UART devices unconditionally |
Date: |
Fri, 2 Jul 2021 15:35:57 +0200 |
When using the Magnum ARC firmware we can see accesses to the
UART1 being rejected, because the device is not mapped:
$ qemu-system-mips64el -M magnum -d guest_errors,unimp -bios NTPROM.RAW
Invalid access at addr 0x80007004, size 1, region '(null)', reason: rejected
Invalid access at addr 0x80007001, size 1, region '(null)', reason: rejected
Invalid access at addr 0x80007002, size 1, region '(null)', reason: rejected
Invalid access at addr 0x80007003, size 1, region '(null)', reason: rejected
Invalid access at addr 0x80007004, size 1, region '(null)', reason: rejected
Since both UARTs are present (soldered on the board) regardless
of whether there are character devices connected, map them
unconditionally.
(This code pre-dated commit 12051d82f004 which made it safe to pass
NULL in as a chardev to serial devices.)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210629053704.2584504-1-f4bug@amsat.org>
---
hw/mips/jazz.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index ee1789183eb..d6183e18821 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -361,16 +361,12 @@ static void mips_jazz_init(MachineState *machine,
memory_region_add_subregion(address_space, 0x80005000, i8042);
/* Serial ports */
- if (serial_hd(0)) {
- serial_mm_init(address_space, 0x80006000, 0,
- qdev_get_gpio_in(rc4030, 8), 8000000 / 16,
- serial_hd(0), DEVICE_NATIVE_ENDIAN);
- }
- if (serial_hd(1)) {
- serial_mm_init(address_space, 0x80007000, 0,
- qdev_get_gpio_in(rc4030, 9), 8000000 / 16,
- serial_hd(1), DEVICE_NATIVE_ENDIAN);
- }
+ serial_mm_init(address_space, 0x80006000, 0,
+ qdev_get_gpio_in(rc4030, 8), 8000000 / 16,
+ serial_hd(0), DEVICE_NATIVE_ENDIAN);
+ serial_mm_init(address_space, 0x80007000, 0,
+ qdev_get_gpio_in(rc4030, 9), 8000000 / 16,
+ serial_hd(1), DEVICE_NATIVE_ENDIAN);
/* Parallel port */
if (parallel_hds[0])
--
2.31.1
- [PULL 08/18] g364fb: use RAM memory region for framebuffer, (continued)
- [PULL 08/18] g364fb: use RAM memory region for framebuffer, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 09/18] g364fb: add VMStateDescription for G364SysBusState, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 10/18] dp8393x: checkpatch fixes, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 11/18] dp8393x: convert to trace-events, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 12/18] hw/mips/jazz: move PROM and checksum calculation from dp8393x device to board, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 13/18] hw/m68k/q800: move PROM and checksum calculation from dp8393x device to board, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 14/18] dp8393x: remove onboard PROM containing MAC address and checksum, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 15/18] qemu/bitops.h: add bitrev8 implementation, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 16/18] hw/m68k/q800: fix PROM checksum and MAC address storage, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 17/18] hw/mips/jazz: specify correct endian for dp8393x device, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 18/18] hw/mips/jazz: Map the UART devices unconditionally,
Philippe Mathieu-Daudé <=
- Re: [PULL 00/18] MIPS patches for 2021-07-02, Peter Maydell, 2021/07/04