can someone explain...[ PCI interrupts]
M. Warner Losh
imp at bsdimp.com
Tue Dec 6 22:16:55 PST 2005
In message: <43961758.4020407 at elischer.org>
Julian Elischer <julian at elischer.org> writes:
: How much is set up by the BIOS and how much is set up by the OS (4.x and
On 4.x, the BIOS (PCI BIOS) is called to route interrupts from the PIR
table when such a table exists. On current, ACPI routines are called
(if acpi is enabled), with a fallback to the PIR. Both use the
MPTABLE when an APIC i in voled.
: How much of my fondly held knowledge of the old hardware PICS (where
: an interrupt corresponded to an interrupt line) is now out of date?
All of it. Except the parts that isn't.
: In this world of multiple PCI to PCI bridges, how much latitude doe the
: OS have in
: deciding where an interrupt turns up?
: (in 4.x and -current)
Somehwere between none and a bunch. It all has to do with what
interrupt controllers are available and how the interrupt lines are
wired. Some systems force you to use the 'barberpole' for interrupts,
while others wire them all to the same interrupts while others allow
smome limited sleections.
: An example is my Dell PE2850 (on 4.x), in which my 4 port ethernet card
: seems to
: be assigned irqs 10,14,14,2 in that order sometimes and 16,17,17,2 at
This looks to be the difference between using the APIC and not using
the APIC. I'd guess this is an SMP vs non-SMP enabled kernel.
: Who is making those decisions? Is it the BIOS and 4.x is just playing along?
Kinda, except when it isn't. The BIOS usually assigns an interrupt,
and we play along. However, usually is a lot less often than it used
to be so we're now more typically routing ourselves.
: Assuming the much maligned "boot interrupt" comes in on irq2, does the OS
: have the oportunity to put my 4th port somewhere else? On 4.x it collides
: with one of my ether ports but in -current it doesn't
That I can't tell you.
: Linux and -current on teh same box a;;ocate way different irqs, and
: they agree about it.. i.e. Linux and -current assign my 4 port card IRQs
Resources are alloacted differently between the OS and the BIOS.
Looks like Linux has a slightly different algorithm for assigning
interrupts to free APIC pins. Notice that in all cases the middle two
are shared. That detail is likely in the MPTables for the device in
: Do they agree becasue something else has decided it (the bios again?) or
: becasue they
: use the same algorythm to work it out..
It depends. On some system they will agree because the BIOS has set
everything up. On other systems they may agree because they use
similar algorithms to assign interrupts.
: Also, if the "boot interrupt" was previously set to 2, is that likely to
: have changed in -current?
: Am I now going to get clobbered on IRQ16? If yes, is this something
: that teh BIOS writers
: decided, or something that the Motherboard designers decided?
I've no clue about boot interrupts.
More information about the freebsd-current