when the first PCI bus attaches.
- Create /dev/pci during MOD_LOAD as well.
- Destroy /dev/pci during MOD_UNLOAD (not that you can kldunload pci, but
might as well get the code right)
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