On 14/06/17 13:38, Paolo Bonzini wrote: > On 12/06/2017 23:21, Mark Cave-Ayland wrote: >> As part of some ongoing sun4u work, I need to be able to wire the fw_cfg >> IO interface to a separate IO space by instantiating the qdev device instead >> of calling fw_cfg_init_io(). This patchset brings FW_CFG_IO in line with >> FW_CFG_MEM and tidies up the realize methods accordingly. > > Could you use FW_CFG_MEM instead, and add a new function > > void sysbus_mmio_map_subregion(SysBusDevice *dev, int n, > MemoryRegion *mr, hwaddr addr) > > ?
Hmmm possibly that could work with some wrappers to emulate the ioport accesses, however Laszlo wasn't too keen on the ioport regions appearing as MMIO in the device tree and I believe that the final patchset will offer some useful cleanups. There's also the argument that outside of OpenBIOS I don't have a large set of clients for testing so I'd much prefer to leave access-related changes if at all possible. ATB, Mark.