Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The duplicate host-PCI bridge thing



I have a solution for the problem of the nexus probing Host-PCI
bridges already found by ACPI.  It does make the assumption that
ACPI enumerates all Host-PCI bridges though.  If we ever find
that is not the case then we may have to add hacks for that case.
Basically what I did was to create a 'legacy' driver.  In
nexus_attach(), if acpi0 isn't found, then the nexus adds a
"legacy0" child.  The nexus_pcib and apm drivers now hang off of
legacy instead of ACPI.  This also means that the gross hacks to
keep APM and ACPI from stomping on each other aren't needed
anymore either.  The code to do this can be found in the jhb_acpipci
branch from the p4 depot on freefall (//depot/users/jhb/acpipci/...).
I can also post patches if desired.  I have a few other changes in
that branch as well including fixes to make PCI interrupt routing
using the $PIR work for child busses.  I want to go ahead and get
the stuff in this branch committed so I can start working on fixing
the APIC_IO mess for PCI interrupts.  Basically, we do a psuedo-routing
hack in pci_cfgregread() right now.  What I plan to do instead is to
remove that and instead add a PCI-PCI bridge driver that uses the
mptable to route interrupts (similar to my current PCIBIOS PCI-PCI
bridge driver) and have nexus_pcib (which will be renamed to
legacy_pcib after the legacy driver is added) use either method of
routing depending on #ifdef APIC_IO (it could eventually be a
runtime decision, but that is another ball of wax).  ACPI already
routes interrupts right for APIC's, but the pci_cfgregread() hack
breaks it.  What we will do instead is to always route interrupts
on i386 (just like we always do on ia64) and between the ACPI
routing and the mptable routing for legacy systems we should get
it right for APIC's.  We might even be able to look at making APIC's
work on UP systems at some point.

-- 

John Baldwin <jhb@xxxxxxxxxxx>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@xxxxxxxxxxx
with "unsubscribe freebsd-new-bus" in the body of the message