This series implements relocation of the SuperI/O functions of the VIA south bridges which resolves some FIXME's. It is part of my via-apollo-pro-133t branch [1] which is an extension of bringing the VIA south bridges to the PC machine [2]. This branch is able to run some real-world X86 BIOSes in the hope that it allows us to form a better understanding of the real vt82c686b devices. Implementing relocation and toggling of the SuperI/O functions is one step to make these BIOSes run without error messages, so here we go.
The series is structured as follows: Patches 1-8 export the device structs of the ISA serial and FDC devices. This is used later in the series to access the I/O regions for relocation and toggling. As part of the exposal the MAINTAINERS file gets a fix for the serial headers. Inspired by the memory API patches 9-11 add two convenience functions to the portio_list API to toggle and relocate portio lists. Patch 9 is a preparation for that which removes some redundancies which otherwise had to be dealt with during relocation. Patch 12 finally implements the main feature which required adaption of the pegasos2 sources, otherwise the machine wouldn't boot when given no bios. Testing done: * make check * make check-avocado * Run MorphOS on pegasos2 with and without pegasos2.rom * Run Linux on amigaone * Run real-world BIOSes on via-apollo-pro-133t branch * Start rescue-yl on fuloong2e [1] https://github.com/shentok/qemu/tree/via-apollo-pro-133t [2] https://github.com/shentok/qemu/tree/pc-via Bernhard Beschow (12): hw: Remove unused includes of hw/block/fdc.h hw/i386/pc: No need to include hw/block/fdc.h in header hw/block/fdc-isa: Rename header to match source file hw/block/fdc: Expose internal header hw/block/fdc: Move constant #define to where it is imposed hw/block/fdc-isa: Expose struct FDCtrlISABus MAINTAINERS: Add include/hw/char/serial*.h to the "PC Chipset" section hw/char/serial-isa: Export struct ISASerialState exec/ioport: Resolve redundant .base attribute in struct MemoryRegionPortio exec/ioport: Add portio_list_set_address() exec/ioport: Add portio_list_set_enabled() hw/isa/vt82c686: Implement relocation of SuperI/O functions MAINTAINERS | 3 +- docs/devel/migration.rst | 2 + hw/block/fdc-internal.h | 158 ---------------------------------- include/exec/ioport.h | 4 +- include/hw/block/fdc-isa.h | 32 +++++++ include/hw/block/fdc.h | 161 ++++++++++++++++++++++++++++++++--- include/hw/char/serial-isa.h | 50 +++++++++++ include/hw/char/serial.h | 7 -- include/hw/i386/pc.h | 1 - hw/block/fdc-isa.c | 19 +---- hw/block/fdc-sysbus.c | 2 +- hw/block/fdc.c | 3 +- hw/char/serial-isa.c | 14 +-- hw/i386/microvm-dt.c | 2 +- hw/i386/microvm.c | 2 +- hw/i386/pc.c | 4 +- hw/isa/isa-superio.c | 3 +- hw/isa/vt82c686.c | 140 +++++++++++++++++++++++------- hw/m68k/next-cube.c | 1 - hw/mips/jazz.c | 1 + hw/ppc/pegasos2.c | 15 ++++ hw/ppc/pnv.c | 2 +- hw/ppc/prep.c | 1 - hw/sparc/sun4m.c | 2 +- hw/sparc64/sun4u.c | 2 + stubs/cmos.c | 2 +- system/ioport.c | 41 +++++++-- 27 files changed, 414 insertions(+), 260 deletions(-) delete mode 100644 hw/block/fdc-internal.h create mode 100644 include/hw/block/fdc-isa.h create mode 100644 include/hw/char/serial-isa.h -- 2.43.0