+{
+ MemoryRegion *io_space = isabus->address_space_io;
+ const MemoryRegionPortio *pio_iter;
+
+ /* START is how we should treat DEV, regardless of the actual
+ contents of the portio array. This is how the old code
+ actually handled e.g. the FDC device. */
+ if (dev) {
+ isa_init_ioport(dev, start);
+ }
+
+ for (; pio_start->size != 0; pio_start = pio_iter + 1) {
+ unsigned int off_low = UINT_MAX, off_high = 0;
+ MemoryRegionOps *ops;
+ MemoryRegion *region;
+
+ for (pio_iter = pio_start; pio_iter->size; ++pio_iter) {
+ if (pio_iter->offset< off_low) {
+ off_low = pio_iter->offset;
+ }
+ if (pio_iter->offset + pio_iter->len> off_high) {
+ off_high = pio_iter->offset + pio_iter->len;
+ }