hw/mips/jazz: Map the UART devices unconditionally
commita13bfa5a056b2ffe5f2ce71170c15772fa3b2cda
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 1 Dec 2019 20:26:59 +0000 (1 21:26 +0100)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Fri, 2 Jul 2021 15:35:08 +0000 (2 17:35 +0200)
tree097f0927db7de51fa8094a3f972bb6cf671b9278
parentb1600ff19553c7acfe10b43d4f50331deff876d5
hw/mips/jazz: Map the UART devices unconditionally

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