[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] ISA device and shared memory

From: Albin Kauffmann
Subject: [Qemu-devel] ISA device and shared memory
Date: Thu, 26 Jul 2012 17:23:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0


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",
                            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 :)

Albin Kauffmann

Attachment: seabios.log
Description: Text document

Attachment: info-mtree.txt
Description: Text document

Attachment: info-qtree.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]