Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2011 16:23:14 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228961 - head/sys/dev/acpica
Message-ID:  <201112291623.pBTGNEvh063388@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Dec 29 16:23:14 2011
New Revision: 228961
URL: http://svn.freebsd.org/changeset/base/228961

Log:
  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.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/acpica/acpi_pcib_acpi.c

Modified: head/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi_pcib_acpi.c	Thu Dec 29 16:17:16 2011	(r228960)
+++ head/sys/dev/acpica/acpi_pcib_acpi.c	Thu Dec 29 16:23:14 2011	(r228961)
@@ -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,



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