svn commit: r230085 - stable/9/sys/dev/acpica

John Baldwin jhb at FreeBSD.org
Fri Jan 13 20:28:12 UTC 2012


Author: jhb
Date: Fri Jan 13 20:28:11 2012
New Revision: 230085
URL: http://svn.freebsd.org/changeset/base/230085

Log:
  MFC 228961:
  Further relax the strictness of enforcing allocations to only come from
  decoded ranges.  Pass any request for a specific range that fails because
  it is not in a decoded range for an ACPI Host-PCI bridge up to the parent
  to see if it can still be allocated.  This is based on the assumption that
  many BIOSes are inconsistent/broken and that settings programmed into BARs
  or resources assigned to other built-in components are more trustworthy than
  the list of decoded resource ranges in _CRS.  This effectively limits the
  decoded ranges to only being used for "wildcard" ranges when allocating
  fresh resources for a BAR, etc.  At some point I would like to only be
  this permissive during an early scan of firmware-assigned resources during
  boot and to be strict about all later allocations, but that isn't viable
  currently.

Modified:
  stable/9/sys/dev/acpica/acpi_pcib_acpi.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- stable/9/sys/dev/acpica/acpi_pcib_acpi.c	Fri Jan 13 20:25:56 2012	(r230084)
+++ stable/9/sys/dev/acpica/acpi_pcib_acpi.c	Fri Jan 13 20:28:11 2012	(r230085)
@@ -511,8 +511,17 @@ acpi_pcib_acpi_alloc_resource(device_t d
     sc = device_get_softc(dev);
     res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end,
 	count, flags);
+
+    /*
+     * XXX: If this is a request for a specific range, assume it is
+     * correct and pass it up to the parent.  What we probably want to
+     * do long-term is explicitly trust any firmware-configured
+     * resources during the initial bus scan on boot and then disable
+     * this after that.
+     */
     if (res == NULL && start + count - 1 == end)
-	res = acpi_alloc_sysres(child, type, rid, start, end, count, flags);
+	res = bus_generic_alloc_resource(dev, child, type, rid, start, end,
+	    count, flags);
     return (res);
 #else
     return (bus_generic_alloc_resource(dev, child, type, rid, start, end,


More information about the svn-src-stable-9 mailing list