sun4u: remap ebus BAR0 to use unassigned_io_ops instead of alias to PCI IO space
commitc1c73b31d941220392ead0ea5ab6966943cb1b55
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 11 Mar 2024 06:43:45 +0000 (11 06:43 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 11 Mar 2024 21:10:18 +0000 (11 22:10 +0100)
tree8b6e65e1a7db5d9bb0c90452f2e49abd54bcddc0
parentb691b250d3860f007799b1b427689c707b796bba
sun4u: remap ebus BAR0 to use unassigned_io_ops instead of alias to PCI IO space

During kernel startup OpenBSD accesses addresses mapped by BAR0 of the ebus device
but at offsets where no IO devices exist. Before commit 4aa07e8649 ("hw/sparc64/ebus:
Access memory regions via pci_address_space_io()") BAR0 was mapped to legacy IO
space which allows accesses to unmapped devices to succeed, but afterwards these
accesses to unmapped PCI IO space cause a memory fault which prevents OpenBSD from
booting.

Since no devices are mapped at the addresses accessed by OpenBSD, change ebus BAR0
from a PCI IO space alias to an IO memory region using unassigned_io_ops which allows
these accesses to succeed and so allows OpenBSD to boot once again.

Fixes: 4aa07e8649 ("hw/sparc64/ebus: Access memory regions via pci_address_space_io()")
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240311064345.2531197-1-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/sparc64/sun4u.c