IRQ Issues.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

IRQ Issues.

Post by 01000101 »

Recently I decided to switch my network driver from a polling system to an interrupt based method. Just to tell everyone right off, the only IRQ assignment I've done so far is for the keyboard, and even that I didnt fully understand.

I believe I have everything setup correctly for the card, but for some reason it doesnt see the interrupt when packets come in. I got the irq number from the PCI bios when I enumerated the devices. Is that the correct place? should I be getting the number from the card itself? its a rtl8139 chipset Realtek PCI card btw.

I guess I just need general help in setting up IRQ_Handlers.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Well, firstly, you need to tell the card to interrupt when a new packet arrives. I'm not 100% sure how to do that (but this might help: my driver, look at the ne2k stuff, which is the same chipset).

Also, I'd suggest learning how to setup IRQs (we can help, if you want us to) so that you can be better prepared for future drivers.
gmoney
Member
Member
Posts: 106
Joined: Mon Jan 03, 2005 12:00 am
Location: Texas, Usa

irq

Post by gmoney »

goto osdever.net and look at the brians osdev. there's a irq handler you may want to look at.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Post by neon »

goto osdever.net
goto's are evil, dont use them :D

Nontheless, Brians tutorial has what you are looking for.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

lol, yes goto's are indeed evil.

Thank you all for the help and references, I shall look at those links a bit later, once I have more time to code.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

Thanks for the references, I finally got to check the drivers out. also, I did not see a 'brians ' IRQ tutorial on osdever.net.

I guess I just need a abstract explanation of a network cards IRQ phase.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

His name is Brandon, His article was called "Bran's Kernel Development Tutorial".

It's several years old... and it has a few bugs..
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

I really hope noone is getting sick of me posting my own links, but I feel you might benefit from it: http://www.jamesmolloy.co.uk/tutorial_h ... 20PIT.html

Similar to Bran's, but written in a different style.
Post Reply