OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 10:49 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: x86 nic irq 11 handling
PostPosted: Mon Feb 13, 2017 5:37 am 
Offline

Joined: Sun Jan 15, 2017 3:18 pm
Posts: 1
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?


Top
 Profile  
 
 Post subject: Re: x86 nic irq 11 handling
PostPosted: Mon Feb 13, 2017 5:53 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
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.)


Top
 Profile  
 
 Post subject: Re: x86 nic irq 11 handling
PostPosted: Mon Feb 13, 2017 7:41 am 
Offline
Member
Member
User avatar

Joined: Fri Apr 03, 2015 9:41 am
Posts: 492
Welcome to OSDev!

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.


Top
 Profile  
 
 Post subject: Re: x86 nic irq 11 handling
PostPosted: Mon Feb 13, 2017 7:52 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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.

_________________
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group