Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - pci network card interrupt re-assignment: (5 Items)
   
pci network card interrupt re-assignment  
Gurus,

How to assign a pci network card interrupt on a x86 BIOS based system during a boot process? Are there any parameters 
which can be passed to pci-bios? Any idea and comments greatly appreciate.

The issue i am having are shared interrupts. There is an interrupt not assigned to any device in the system and i would 
like to be that interrupt used by network card exclusively.

Best
Janusz
Re: pci network card interrupt re-assignment  
There isn't a way to re-assign interrupts on an x86 system as these are
setup by the BIOS. If you use 6.5.0 with startup-apic and pci-bios-v2, you
shouldn't get any shared interrupts if the device supports MSI/X.
 
-- 
Hugh Brown
QNX Software Systems Limited
1001 Farrar Rd.,
Ottawa. ON. K2K 0B3.
Telephone: 613-591-0931







On 12-03-06 8:37 PM, "janusz ruszel" <community-noreply@qnx.com> wrote:

>Gurus,
>
>How to assign a pci network card interrupt on a x86 BIOS based system
>during a boot process? Are there any parameters which can be passed to
>pci-bios? Any idea and comments greatly appreciate.
>
>The issue i am having are shared interrupts. There is an interrupt not
>assigned to any device in the system and i would like to be that
>interrupt used by network card exclusively.
>
>Best
>Janusz
>
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post91928
>
Re: pci network card interrupt re-assignment  
Hi,

We ran in to a similar issue with some of our high precision sensor interfaces which required an extremely low upper 
bound on the interrupt latency.   I don't know of any officially supported mechanism, but we found a solution based on 
using PCI BIOS calls to retrieve the mapping of PCI interrupt lines, then directly interacting with the bus interface in
 the chipset to reassign them to different IRQs.   The bad news is that the interface is different for every chipset - 
the good news is that most of the documentation is freely available, and you can often find examples of interacting with
 the chipset registers in open-source operating systems.

If it's OK with the QNX folks I can post the source of our remapping tool - it's actually based on the pci-bios sources 
from the 6.3.0 x86 BSP (because it needs to issue PCI bios calls to query the mapping and instruct the cards that 
they've been reassigned - it just seemed easier to use the existing infrastructure for making those calls).   If they 
would prefer that I not post the whole source file, I can post a patch instead.   Fair warning, it's a kluge at best - 
it's not exactly well organized.

-Will
Re: pci network card interrupt re-assignment  
Will,
      Is it possible that you can give me more detail direction how to remap the pci device interrupt after pci-bios 
server is started but no any device drivers loaded. 
 Are the PCI BIOS calls do the that? 

-Janusz
jruszel(at)nanosphere(dot)us
Re: pci network card interrupt re-assignment  
Hi Janusz,

It is not possible to alter the mapping after pci-bios is loaded - any remapping must be done before you load pci-bios.

You can retrieve the routing options from an old style PCI bios by either calling the "Get PCI Interrupt Routing Options
" BIOS function (see http://www.o3one.org/hwdocs/bios_doc/pci_bios_21.pdf ), or by searching the BIOS address area for 
it (http://www.microsoft.com/taiwan/whdc/archive/pciirq.mspx , http://people.freebsd.org/~jhb/papers/bsdcan/2007/article
/node5.html ).   Either way, after you analyze the mappings, you must:

-> reprogram the interrupt router; I found that the PCI bios function intended for that ("Set PCI Hardware Interrupt") 
didn't seem to operate reliably for me, so I ended up directly interfacing with the chipsets on the boards we use;
-> inform the PCI device of the new IRQ by writing to the relevant register in the PCI configuration space

It's complicated and not very reliable - this is why the more modern interfaces used by startup-apic and pci-bios-v2 are
 such an improvement!

Hope this helps,

-Will