Page 1 of 1

QEMU RTL8139 Interrupt's

Posted: Sat Dec 15, 2012 10:39 am
by jammmie999
A simulated RTL8139 under QEMU isn't reporting its interrupt information (PIN or Line) in the PCI configuration space, see the attached image, I have run through a loop printing out all information in the PCI configuration space. 0x3E and 0x3F report 0x0 back, not what I was expecting, though the IO address is reported fine at 0x10 being 0xc101 or 49409. Any ideas why this is?

Thanks
QEMU.png

Re: QEMU RTL8139 Interrupt's

Posted: Sat Dec 15, 2012 10:59 am
by bluemoon
To get the IRQ you need another IO, this is what I do:

Code: Select all

    outl(PCI_CONFIG_ADDRESS, base +0x3C);
    if ( (data = inl(PCI_CONFIG_DATA)) == 0xFFFFFFFF ) return -1;
    *irq = data & 0xFF;
In my setting, the 8139 has IRQ 11.