diff options
author | msmith <msmith@FreeBSD.org> | 2000-12-01 10:18:57 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2000-12-01 10:18:57 +0000 |
commit | bee39eb0e05331c63c793b8796fa8727eacb5eb0 (patch) | |
tree | 337a93e7c9090d677dec5773c715ad8e60983e8a /sys/dev/acpica/acpi_pcib_acpi.c | |
parent | 9e880be27392a21d6f70ac024e9bdcd014525b7c (diff) | |
download | FreeBSD-src-bee39eb0e05331c63c793b8796fa8727eacb5eb0.zip FreeBSD-src-bee39eb0e05331c63c793b8796fa8727eacb5eb0.tar.gz |
Update to work with the new ACPI CA snapshot.
- Use ACPI_PHYSICAL_ADDRESS
- RSDT -> XSDT
- FACP -> FADT
- No APIC table support
- Don't install a global EC handler; this has bad side-effects
(it invokes _REG in *all* EC spaces in the namespace!)
- Check for PCI bus instances already existing before adding them
Diffstat (limited to 'sys/dev/acpica/acpi_pcib_acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi_pcib_acpi.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 43c2f3d..76c1d86 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -151,6 +151,10 @@ acpi_pcib_attach(device_t dev) * meant to use a private configuration space mechanism for this bus, * so we should dig out our resources and check to see if we have * anything like that. How do we do this? + * XXX If we have the requisite information, and if we don't think the + * default PCI configuration space handlers can deal with this bus, + * we should attach our own handler. + * XXX invoke _REG on this for the PCI config space address space? */ if ((status = acpi_EvaluateNumber(sc->ap_handle, "_BBN", &sc->ap_bus)) != AE_OK) { if (status != AE_NOT_FOUND) { @@ -162,27 +166,26 @@ acpi_pcib_attach(device_t dev) } /* - * XXX we should check here to make sure that this bus number hasn't already - * been attached. It shouldn't really be an issue. + * Make sure that this bus hasn't already been found. If it has, return silently + * (should we complain here?). + */ + if (devclass_get_device(devclass_find("pci"), sc->ap_bus) != NULL) + return(0); + + /* + * Attach the PCI bus proper. */ if ((child = device_add_child(dev, "pci", sc->ap_bus)) == NULL) { device_printf(device_get_parent(dev), "couldn't attach pci bus"); return(ENXIO); } - /* - * XXX If we have the requisite information, and if we don't think the - * default PCI configuration space handlers can deal with this bus, - * we should attach our own handler. - */ - /* XXX invoke _REG on this for the PCI config space address space? */ /* - * Now go scan the bus. - * - * XXX is it possible to defer this and count on the nexus getting to it - * reliably after it's finished with ACPI? Should we really care? + * Note that we defer the actual scan of the child PCI bus; ACPI will call + * bus_generic_attach on its children a second time after the first pass + * is complete. This leads to slightly neater output. */ - return(bus_generic_attach(dev)); + return(0); } static int |