From owner-freebsd-stable@FreeBSD.ORG Wed Apr 30 22:45:10 2014 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E074DBA0; Wed, 30 Apr 2014 22:45:10 +0000 (UTC) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A62F51144; Wed, 30 Apr 2014 22:45:10 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s3UMj2UL033567; Wed, 30 Apr 2014 15:45:06 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201404302245.s3UMj2UL033567@gw.catspoiler.org> Date: Wed, 30 Apr 2014 15:45:02 -0700 (PDT) From: Don Lewis Subject: Re: Thinkpad R60 hangs when booting recent 8.4-STABLE To: jhb@FreeBSD.org In-Reply-To: <201404301738.26632.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: stable@FreeBSD.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 22:45:10 -0000 On 30 Apr, John Baldwin wrote: > On Wednesday, April 30, 2014 1:30:01 pm Don Lewis wrote: >> On 30 Apr, John Baldwin wrote: >> > On Tuesday, April 29, 2014 9:17:19 pm Don Lewis wrote: >> >> On 29 Apr, John Baldwin wrote: >> >> > On Monday, April 28, 2014 8:56:03 pm Don Lewis wrote: >> >> >> >> I just took a closer look at the dmesg output from the two kernels. >> >> >> >> >> agp0: on hostb0 >> >> >> hostb0: Reserved 0x10000000 bytes for rid 0x10 type 3 at 0xd0000000 >> >> >> >> The above line is different with the r262226 kernel: >> >> hostb0: Reserved 0x10000000 bytes for rid 0x10 type 3 at 0 >> > >> > Yes, a resource at 0 is going to break things. 9.2 has the NEW_PCIB > option >> > enabled. You can try enabling that for 8.4 to see if it fixes this issue. >> > If it does, it narrows down where to look for the bug. >> >> It behaves the same way with NEW_PCIB. I see hostb at 0 and then the >> hang shortly thereafter. > > Ok. hostb isn't actually behind a bridge so that probably makes sense. The > one other reporter who sent me debug output had a BAR on his vgapci0 device > that ended up being at 0 as well (and an active BAR at 0 is pretty much > guaranteed to hose a box). > > Are you up for doing some printf sleuthing? There are two odd things that I > see so far: Yup, I've already started down that path. > 1) the base address of 0. The question here is if pci_add_map() in > sys/dev/pci/pci.c decides to set start to 0 explicitly, or if it happens > further up the callchain (should be bus_alloc_resource calls in > sys/dev/acpica/acpi_pcib_acpi.c, sys/x86/x86/nexus.c and then in the > rman code itself in sys/kern/subr_rman.c) > > 2) The 'reserved' printfs during boot probe. Those come from a printf in > pci_alloc_resource() in sys/dev/pci/pci.c. However, that should not be called > until a driver attaches to a device and calls bus_alloc_resource(). It should > not be called from pci_add_child() as it seems to be now. What I know so far is that for hostb0, pci_alloc_resource() is being called with start=0x0 and end=0xffffffff, resource_list_find() is succeeding, we don't call pci_alloc_map(), and rman_get_start(rle->res) is returning 0. I don't see a call for pci_add_map() for hostb0 unless it is much earlier and scrolled off the screen. For debugging #2, should I back out r262226 so that the machine boots and I can capture the full dmesg buffer?