Skip to content
Snippets Groups Projects
  • Philippe Mathieu-Daudé's avatar
    a13bfa5a
    hw/mips/jazz: Map the UART devices unconditionally · a13bfa5a
    Philippe Mathieu-Daudé authored
    
    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 12051d82 which made it safe to pass
    NULL in as a chardev to serial devices.)
    
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Message-Id: <20210629053704.2584504-1-f4bug@amsat.org>
    a13bfa5a
    History
    hw/mips/jazz: Map the UART devices unconditionally
    Philippe Mathieu-Daudé authored
    
    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 12051d82 which made it safe to pass
    NULL in as a chardev to serial devices.)
    
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Message-Id: <20210629053704.2584504-1-f4bug@amsat.org>