IRQs above IRQ 0x0F?

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
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

IRQs above IRQ 0x0F?

Post by iocoder »

Hello All!
Do any one know how to handle IRQs above 0x0F? like IRQ16 and IRQ17...
I know that we can handle IRQs 0x0 to 0x7 through PIC1 and IRQs 0x8 to 0xF through PIC2 but what about
other IRQs?
In my computer, IDE Driver that is responsible for Serial ATA use IRQ 19 and i wanna handle her with an entry in IDT.
Thanks and Regards.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: IRQs above IRQ 0x0F?

Post by neon »

Look into using the APIC
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

Re: IRQs above IRQ 0x0F?

Post by iocoder »

Thank you a lot neon for your reply, but i had read about APIC before and i think it is used in multi-processor systems, my operating system is not as this complix and even my real computer contains only a single intel processor!
Isn't there any other way to handle PCI IRQs?
Also, I don't wanna share one IRQ between more than device, so i reconfigure PCI to interrupt numbers above 15, and PICs can't handle them.
Thank you a lot and regards.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: IRQs above IRQ 0x0F?

Post by AJ »

Hi,

The APIC's can be present even on single CPU systems and of course you can use the on SMP systems even if you only plan to use one core of one CPU. In fact, on most modern systems I believe that the legacy PIC's are actually emulated by the IO APIC.

If you want non-overlapping IRQ's which utilise the higher vectors, you need to use the APIC. Note that if you purely go down this route, you won't be able to support older chipsets without the IO APIC...

Cheers,
Adam
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: IRQs above IRQ 0x0F?

Post by qw »

If I understand correctly, the simple fact that there is an IRQ 19 implies that there is an APIC.
User avatar
iocoder
Member
Member
Posts: 208
Joined: Sun Oct 18, 2009 5:47 pm
Libera.chat IRC: iocoder
Location: Alexandria, Egypt | Ottawa, Canada
Contact:

Re: IRQs above IRQ 0x0F?

Post by iocoder »

Yes, Yes you are all right, i'm gonna using LAPIC and I/O APIC. thanks all and regards.
Post Reply