Hello,
I'm trying to add the support for an old com90c65 ISA card (a network device using the old ARCnet protocol and handled by the com90xx Linux module). This device is using both IO ports and IO memory.
The I/O ports are working and the code is largely inspired from the ne2k_isa support. However, I have not find the right way to register the I/O memory. I've tried the following code :
static const MemoryRegionOps com90c65_mmio_ops = { .read = com90c65_mmio_read, .write = com90c65_mmio_write, .endianness = DEVICE_NATIVE_ENDIAN, };
[...]
memory_region_init_io(&s->mmio, &com90c65_mmio_ops, s, "com90c65-mmio", size); memory_region_add_subregion(isa_address_space(dev), isa_mem_base + isa->mmiobase, &s->mmio);
Depending on mmiobase, I get : - mmiobase == 0xd0000 : no error message but debuging QEMU shows me that my read/write functions are not called. - mmiobase == 0xd0800 : the following error : qemu-system-i386: [...]/qemu-1.1.0/exec.c:2371: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed
Because the ISA and PCI memory areas seem to overlap and as the ISA bus is accessed via a PCI to ISA bridge, they might be something else to initialize but I can't find what and browsing the QEMU code didn't help me.
However, I have managed to make it work by using a call to memory_region_add_subregion_overlap() with a priority bigger than the PCI one (priority >= 2) but it only works with mmiobase == 0xd0000.
As it might also be a seabios configuration problem, I have added the seabios mailing list in the recipients.
In attachement, you'll find the output of info mtree, info qtree and the logs of seabios.
Any help will be really appreciated, Thanks :)