From owner-p4-projects@FreeBSD.ORG Wed Apr 27 17:49:12 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 21CF1106567A; Wed, 27 Apr 2011 17:49:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7F3A1065676 for ; Wed, 27 Apr 2011 17:49:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id C4CAF8FC17 for ; Wed, 27 Apr 2011 17:49:11 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p3RHnBrt029599 for ; Wed, 27 Apr 2011 17:49:11 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p3RHnBtB029596 for perforce@freebsd.org; Wed, 27 Apr 2011 17:49:11 GMT (envelope-from jhb@freebsd.org) Date: Wed, 27 Apr 2011 17:49:11 GMT Message-Id: <201104271749.p3RHnBtB029596@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 192200 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 17:49:12 -0000 http://p4web.freebsd.org/@@192200?ac=10 Change 192200 by jhb@jhb_jhbbsd on 2011/04/27 17:48:46 Honor acpi_host_mem_start when allocating I/O windows for PCI-PCI bridges. I think we might want to honor host_mem_start for any allocation that isn't fixed (i.e. where start + count - 1 == end). Affected files ... .. //depot/projects/pci/sys/dev/acpica/acpi_pcib_acpi.c#8 edit Differences ... ==== //depot/projects/pci/sys/dev/acpica/acpi_pcib_acpi.c#8 (text+ko) ==== @@ -551,10 +551,16 @@ * found to do it. This is typically only used on older laptops * that don't have pci busses behind pci bridge, so assuming > 32MB * is likely OK. + * + * PCI-PCI bridges may not allocate smaller ranges for their windows, + * but the heuristics here should apply to those, so we allow several + * different end addresses. */ - if (type == SYS_RES_MEMORY && start == 0UL && end == ~0UL) + if (type == SYS_RES_MEMORY && start == 0UL && (end == ~0UL || + end == 0xffffffff)) start = acpi_host_mem_start; - if (type == SYS_RES_IOPORT && start == 0UL && end == ~0UL) + if (type == SYS_RES_IOPORT && start == 0UL && (end == ~0UL || + end == 0xffff || end == 0xffffffff)) start = 0x1000; return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags));