Page 1 of 1
IRQ redirection based on BusNo/DevNo
Posted: Thu May 13, 2010 3:52 pm
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.
Re: IRQ redirection based on BusNo/DevNo
Posted: Fri May 14, 2010 2:42 am
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.
Re: IRQ redirection based on BusNo/DevNo
Posted: Fri May 14, 2010 7:15 am
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.
Re: IRQ redirection based on BusNo/DevNo
Posted: Fri May 14, 2010 9:37 am
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.