On 08/05/2018 01:28 PM, Mark Cave-Ayland wrote: > Some SysBusDevices either use sysbus_init_mmio() without > sysbus_mmio_map() or the first MMIO memory region doesn't represent the > bus address, causing a firmware device path with an invalid address to > be generated. > > SysBusDeviceClass does provide a virtual explicit_ofw_unit_address() > method that can be used to override this process, but it was originally > intended > only as as a fallback option meaning that any existing MMIO memory regions > still > take priority whilst determining the firmware device address. > > There is currently only one user of explicit_ofw_unit_address() and that > is the PCI expander bridge (PXB) device which has no MMIO/PIO resources > defined. This enables us to allow explicit_ofw_unit_address() to take > priority without affecting backwards compatibility, allowing the address > to be customised as required. > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> > Reviewed-by: Laszlo Ersek <ler...@redhat.com> > --- > hw/core/sysbus.c | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-)
Looks reasonable. Reviewed-by: Thomas Huth <th...@redhat.com>