I’m posting a summary of all that I have learned about this issue.
Thanks to Igor Kovalenko, David Hinds, and engineers at Phoenix for
providing many answers.
PROBLEM: For hard realtime one may need to specify the IRQ for
a PCI card (such as an a/d converter, etc) such that it is high priority
and unshared. ‘High priority’ because the default IRQ priority under RTP
is 0,1,8,9,10,11,12,13,14,15,3,4,5,6,7. If the IRQ is, e.g., 5 it will be
behind the EIDE drive. ‘Unshared’ because PCI interrupts can be shared and
this may impact realtime response. Note that on most motherboards some
slots are ‘hardwire’ shared with motherboard devices. You may be able to
find a slot with an unshared interrupt line or may not be able to (on many
Dell motherboards all slots are hardwire shared with motherboard
devices. The ‘pci_irq_routing_options()’ call will provide info about
which slots are hardwire shared. This info is also usually in the motherboard doc.)
PRIOR SOLUTION: As part of the bootup process the BIOS assigns resources
to motherboard and slot devices. Most BIOS setup screens have, until recently, included
menus for ‘PCI Configuration’. This would allow one to do some or all of these
things- specify the IRQ of a PCI slot, reserve an IRQ from being assigned by the
BIOS, or specify the IRQs of motherboard devices. Note that when RTP boots,
it accepts whatever resource assignments the BIOS has assigned.
WHY THE PRIOR SOLUTION IS BECOMING PROBLEMATIC: Things change in the
PC world- new standards (ACPI, EFI), new functionality (I/O APIC mode used
by W2K and XP), etc. The ‘PCI Configuration’ screens
in many BIOS implementations are being removed by large vendors such as
Dell, Gateway, HP, IBM. There are many reasons for this,
but the bottom line is that control over IRQ assignments
it is being moved to the OS from the BIOS.
WHAT ARE THE OPTIONS?:
1.) Some BIOS’s have a non-volatile area called ESCD (Extended System Configuration Data,
from a specification written in 1994). This was when machines had PCI and ISA/EISA
busses all together with some cards that weren’t plug and play. This area would specify
how to configure resources and it was persistent across reboots. However, it was
optional and not required to be implemented. A DOS utility called ‘NVRAM.EXE’ can be found
on the net which will read/write this area. IF your BIOS has (or still has) this area AND uses
it you could specify resource assignments here. However, it’s very difficult. ‘NVRAM.EXE’
requires a binary image to write the area. (Note: the latest Dell Canterwood motherboards have
this area, but it is filled with all 1’s, which may mean it’s vestigial).
2.) After RTP boots, you can call the ‘pci_’ calls such as ‘pci_map_irq()’ to set the IRQ
of the realtime card. However even if your card is in a slot with an interrupt that is not
hardwire shared with anything else, the BIOS may have assigned other motherboard devices
to the same IRQ. If you change the IRQ of the other devices after RTP has booted its
drivers wont know. Note it may be possible to change the BIOS IRQ
assignments of motherboard devices to avoid having
a shared interrupt. Both the Linux command ‘setpnp’ and the DOS utility ‘PNPBTST.EXE’
call functions documented in the Plug and Play BIOS Specification (1994) to set the
resources of motherboard (not slot) devices. There is an option to make these changes
persistent (or ‘static’). However, it is not required that this option be implemented.
3.) You could modify the PCI Management layer in RTP as Igor Kovalenko notes to
control the resource assignments before RTP fully boots. The source is provided
SHORT TERM ANSWER: None of the above options seem very approachable. For
myself, I am going to continue to try to find motherboards that provide some control in the
BIOS for IRQ assignments. If the BIOS will let one reserve an IRQ it can later be assigned
to the realtime card via ‘pci_map_irq()’. Note that it must be placed in a slot with an unshared
interrupt line, or else the assignment will change the other motherboard devices that are hardwire
as well. Even the new Intel 865/875 motherboards from Asus and MSI still provide this
feature in the BIOS setup screens. Note that many boxed Intel motherboards will only allow one to
specify the IRQ for a slot, not reserve an IRQ or change the IRQs of motherboard devices.
Therefore there is no way to guarantee an unshared IRQ.
LONG TERM ANSWER: New functionality needs to be added to RTP to address this issue.
Hopefully this would also provide a way to specify which IRQ has the highest priority
(i.e. change the priority chain) as well.