Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 11:30:28 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/acpica acpi_pcib.c acpi_pcib_acpi.c acpi_pcib_pci.c acpi_pcibvar.h src/sys/dev/pci pci.c
Message-ID:  <200208261830.g7QIUS20093614@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
jhb         2002/08/26 11:30:28 PDT

  Modified files:
    sys/dev/acpica       acpi_pcib.c acpi_pcib_acpi.c 
    sys/dev/pci          pci.c 
  Added files:
    sys/dev/acpica       acpi_pcib_pci.c acpi_pcibvar.h 
  Log:
  Overhaul the ACPI PCI bridge driver a bit:
  - Add an ACPI PCI-PCI bridge driver (the previous driver just handled
    Host-PCI bridges) that is a PCI driver that is a subclass of the generic
    PCI-PCI bridge driver.  It overrides probe, attach, read_ivar, and
    pci_route_interrupt.
    - The probe routine only succeeds if our parent is an ACPI PCI bus which
      we test for by seeing if we can read our ACPI_HANDLE as an ivar.
    - The attach routine saves a copy of our handle and calls the new
      acpi_pcib_attach_common() function described below.
    - The read_ivar routine handles normal PCI-PCI bridge ivars and adds an
      ivar to return the ACPI_HANDLE of the bus this bridge represents.
    - The route_interrupt routine fetches the _PRT (PCI Interrupt Routing
      Table) from the bridge device's softc and passes it off to
      acpi_pcib_route_interrupt() to route the interrupt.
  - Split the old ACPI Host-PCI bridge driver into two pieces.  Part of
    the attach routine and most of the route_interrupt routine remain in
    acpi_pcib.c and are shared by both ACPI PCI bridge drivers.
    - The attach routine verifies the PCI bridge is present, reads in
      the _PRT for the bridge, and attaches the child PCI bus.
    - The route_interrupt routine uses the passed in _PRT to route a PCI
      interrupt.
    The rest of the driver is the ACPI Host-PCI bridge specific bits that
    live in acpi_pcib_acpi.c.
    - We no longer duplicate pcib_maxslots but use it directly.
    - The driver now uses the pcib devclass instead of its own devclass.
      This means that PCI busses are now only children of pcib devices.
    - Allow the ACPI_HANDLE for the child PCI bus to be read as an ivar
      of the child bus.
    - Fetch the _PRT for routing PCI interrupts directly from our softc
      instead of walking the devclass to find ourself and then fetch our
      own softc.
  
  With this change and the new ACPI PCI bus driver, ACPI can now properly
  route interrupts for devices behind PCI-PCI bridges.  That is, the
  Itanium2 with like 10 PCI busses can now boot ok and route all the PCI
  interrupts.  Hopefully this will also fix problems people are having with
  CardBus bridges behind PCI-PCI bridges not properly routing interrupts
  when ACPI is used.
  
  Tested on:      i386, ia64
  
  Revision  Changes    Path
  1.23      +46 -244   src/sys/dev/acpica/acpi_pcib.c
  1.23      +43 -344   src/sys/dev/acpica/acpi_pcib_acpi.c
  1.1       +154 -0    src/sys/dev/acpica/acpi_pcib_pci.c (new)
  1.1       +37 -0     src/sys/dev/acpica/acpi_pcibvar.h (new)
  1.197     +0 -1      src/sys/dev/pci/pci.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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