x86 nic irq 11 handling
x86 nic irq 11 handling
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
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.)
(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
Welcome to OSDev!
What NIC do you use? We need to know that to give you the answer.
What NIC do you use? We need to know that to give you the answer.
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing
OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing
OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
Re: x86 nic irq 11 handling
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.
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.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott