Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 2003 16:39:36 -0500
From:      "Cagle, John (ISS-Houston)" <john.cagle@hp.com>
To:        "John Baldwin" <jhb@FreeBSD.org>
Cc:        freebsd-smp@freebsd.org
Subject:   RE: PCI devices behind bridges in APIC Full Table mode
Message-ID:  <C50AB9511EE59B49B2A503CB7AE1ABD10440E4B4@cceexc19.americas.cpqcorp.net>

next in thread | raw e-mail | index | archive | help
> From: John Baldwin [mailto:jhb@FreeBSD.org]=20
> On 18-Apr-2003 Cagle, John (ISS-Houston) wrote:
> > With 4.8-stable, I'm having a problem with IRQ routing when=20
> a device=20
> > is behind a PCI-to-PCI bridge in a PCI slot (like a dual-port NIC),=20
> > when using APIC "full-table" mode.  It appears that the=20
> kernel is not=20
> > looking at the mptable to determine the proper interrupt=20
> pin routing=20
> > for these devices.
> >=20
> > Does anyone know if FreeBSD has support for this?  Can=20
> someone direct=20
> > me to the area of the kernel to examine?
>=20
> Eyuck.  The APIC PCI interrupt routing is a hack in 4.x (and=20
> still is in current as well).  It is spread between=20
> sys/i386/i386/mpapic.c and this evilness in sys/pci/pci.c:

John,

Here's what I would suggest to add support for PCI-to-PCI bridges in
slots:

In mpapic.c, if pci_apic_irq() can't find the bus/device in the mptable,
it needs to look for the device's upstream PCI bridge (if there is one)
and search for that in the mptable.  If that bridge isn't found, then it
needs to keep going upstream (to the next PCI bridge) until it finds a
bus/device listed in the mptable.  If it does ever find an upstream
bridge, then it will need to swizzle the intpin (barber-pole), according
to the rules of PCI, to determine the real intline for the device in
question.

Questions:

1) Is there any code/data structure already in place that enumerates the
PCI busses in the system (including those behind PCI-to-PCI bridges in
slots)?

2) Are there any plans to use ACPI for interrupt routing (like Linux is
moving to)?

Thanks,
John

--------------------------------
John Cagle     john.cagle@hp.com
Principal Member Technical Staff
   Industry Standard Servers
    Hewlett-Packard Company



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C50AB9511EE59B49B2A503CB7AE1ABD10440E4B4>