]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add an ACPI PCI bus driver that is a subclass of the generic PCI bus
authorjhb <jhb@FreeBSD.org>
Mon, 26 Aug 2002 17:55:42 +0000 (17:55 +0000)
committerjhb <jhb@FreeBSD.org>
Mon, 26 Aug 2002 17:55:42 +0000 (17:55 +0000)
commit4212d70883457863cde3742a6f4c519615f2ca7f
tree5f024fad887c332b7d7d54f544fe126f9beac4c3
parentb863deeb1194119f8289d0b2a7a23d5fcbafe9e1
Add an ACPI PCI bus driver that is a subclass of the generic PCI bus
driver.  This driver overrides the probe, attach, and read_ivar methods.

If the parent bridge is an ACPI PCI bridge, then the probe routine will
match, otherwise it will fail.  It tests this by seeing if it can get
the ACPI_HANDLE ivar from the bridge device.

In the attach routine, it uses pci_add_children() to add all the child
devices (but with a slightly larger ivar so it can store ACPI_HANDLE's
for child devices) and then walks through the ACPI namespace below the
bus device to cache ACPI_HANDLE's for all child devices present in the
namespace.  It does this by comparing the pci slot and function to the
address encoded in _ADR of the devices in the ACPI namespace.

The read_ivar routine passes most requests off to pci_read_ivar()
and adds a new request so that the ACPI_HANDLE for a child device can
be read.

To add proper power support the power methods can be overridden as well,
but that is not currently implemented.  Also, there are cases where a
device may show in the ACPI namespace as a PCI device that the PCI probe
does not find.  Currently such devices are ignored.

Tested on: i386, ia64
sys/dev/acpica/acpi_pci.c [new file with mode: 0644]