Page 1 of 1
x86 nic irq 11 handling
Posted: Mon Feb 13, 2017 5:37 am
by farb
hi, I've done a simple irq handling and it works for keyboard and timer ( IRQ 1 and 0 ). Unfortunately, as for my simple NIC driver I am capable of sending ARP packets but I don't see any interrupts from it ( IRQ 11 ), even though it's enabled. What would you suggest to do?
Re: x86 nic irq 11 handling
Posted: Mon Feb 13, 2017 5:53 am
by iansjack
Not really a question that anyone can answer without at least seeing your code. You don't even state which NIC you are using.
(That's not an invitation to post vast amounts of code on the forum. Link to your git repository and someone may be patient enough to review your code.)
Re: x86 nic irq 11 handling
Posted: Mon Feb 13, 2017 7:41 am
by osdever
Welcome to OSDev!
What NIC do you use? We need to know that to give you the answer.
Re: x86 nic irq 11 handling
Posted: Mon Feb 13, 2017 7:52 am
by SpyderTL
It's time to start eliminating suspects...
Virtually all devices will send interrupt requests, and since there are a limited number of interrupts, all devices must be able to keep track of whether an interrupt was sent or not.
So, your NIC will have to have a register that contains a bit flag that will tell you whether it sent an IRQ or not. (And the OS is responsible for clearing that flag after the interrupt has been handled. This is true for pretty much all devices.)
So, all you need to do is check the value of that flag after a packet is sent (or received). If it is set, your interrupt controller (PiC) or your interrupt handler routine are not set up properly. If it's not set, the NIC has not been set up properly.
Once you determine where the problem is, fixing it should be a lot easier. Let us know what you find.