Hi.
I don't know how to get the IRQ number allocated to rtl8139 during bios POST.
I read it's PCI configuration room, and got irq pin = 32, irq line = 1.
But how to caulcate the real IRQ number ?
I regarded irq-line as IRQ number(namely, 1) and wrote my driver, however, i can not receive any interrupt after booting. (i test on real machine. my net cable is well connected to internet. I set all bits in Interrupt Mask Register, and other necessary operation with Command Register , etc. I also transmit a package in the test code)
And, when i pressed keyboard, an interrupt occur (i know it from message on screen). That's not surprising, keyboard occupies IRQ 1 too.
i don't want to check my driver code in the first, because i doubt my nic doesn't use IRQ 1 at all.
BTW: this RTL8139 chip is not onboard, it's a second network card i bought on market and plug in the PCI slot. The motherboard has a onboard intel network card already.
who can help me?
RTL8139, how to calculate IRQ id from IRQ-PIN & IRQ LINE
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: RTL8139, how to calculate IRQ id from IRQ-PIN & IRQ LINE
It's madness, but considering it's the first hit on my first google query you might've spend a bit more time on searching next time
Re: RTL8139, how to calculate IRQ id from IRQ-PIN & IRQ LINE
I am sorry, it's not that i didn't google ------ i didn't know what key word to search.Combuster wrote:It's madness, but considering it's the first hit on my first google query you might've spend a bit more time on searching next time
i didn't realize there is things new introduced by PCI. i thought it's as simple as devices on ISA bus.
the IRQ routing seems a little complex, i just take a quick glance at it, it seems that, although routing table and processing is complex, we don't need touch it. BIOS put the finall result in PCI-LINE register in configuration room.
BTW, i got interrupt, after two bugs fixed:
1, i read pci-line and pci-pin register using a wrong ADDRESS OFFSET to pci configuration room base. so i got a wrong irq-line.
2, i forgot to clear bit 2 of IMR in 8259A, thus the second 8259 chip disabled.