IRQ redirection based on BusNo/DevNo

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
sawdust
Member
Member
Posts: 51
Joined: Thu Dec 20, 2007 4:04 pm

IRQ redirection based on BusNo/DevNo

Post by sawdust »

I asked a related question earlier, but I wasn't very clear. In a system with two CPUs or a Dual-core CPU, how to redirect the interrupts from a particular device based on PCI bus/dev number to specific CPUs or cores?
Thanks a lot.
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: IRQ redirection based on BusNo/DevNo

Post by xenos »

The magic keyword here is IOAPIC. It is present in any SMP system and does exactly what you want - it routes IRQs from different sources to the CPU(s). You can configure this routing by setting the IRQ routing tables - have a look at the wiki for some more information and links that might help you.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
sawdust
Member
Member
Posts: 51
Joined: Thu Dec 20, 2007 4:04 pm

Re: IRQ redirection based on BusNo/DevNo

Post by sawdust »

Yes I was trying to program ioapic after getting their base addresses from the MP-table. But not sure how to do the redirection based on bus/dev numbers.
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: IRQ redirection based on BusNo/DevNo

Post by Selenic »

sawdust wrote:Yes I was trying to program ioapic after getting their base addresses from the MP-table. But not sure how to do the redirection based on bus/dev numbers.
You get an IOAPIC input map from the MP or ACPI tables. Look up the device you want and you get the input number which you need to use when programming the APIC; you can't use the bus/dev/function values directly, IIRC.
Post Reply