From owner-freebsd-sparc64@FreeBSD.ORG Mon Sep 1 19:47:28 2008 Return-Path: Delivered-To: freebsd-sparc64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D06D106564A; Mon, 1 Sep 2008 19:47:28 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id B4F5D8FC1E; Mon, 1 Sep 2008 19:47:27 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id m81JlQZP009012; Mon, 1 Sep 2008 21:47:26 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id m81JlQ4l009011; Mon, 1 Sep 2008 21:47:26 +0200 (CEST) (envelope-from marius) Date: Mon, 1 Sep 2008 21:47:26 +0200 From: Marius Strobl To: Gavin Atkinson Message-ID: <20080901194726.GG80839@alchemy.franken.de> References: <1220278827.70590.35.camel@buffy.york.ac.uk> <20080901161850.GE80839@alchemy.franken.de> <1220287328.70590.46.camel@buffy.york.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1220287328.70590.46.camel@buffy.york.ac.uk> User-Agent: Mutt/1.4.2.3i Cc: gibbs@FreeBSD.org, freebsd-sparc64@FreeBSD.org Subject: Re: HEAD panic with ofw_pcibus.c 1.21 on Blade 100 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2008 19:47:28 -0000 On Mon, Sep 01, 2008 at 05:42:08PM +0100, Gavin Atkinson wrote: > On Mon, 2008-09-01 at 18:18 +0200, Marius Strobl wrote: > > On Mon, Sep 01, 2008 at 03:20:27PM +0100, Gavin Atkinson wrote: > > > Hi all, > > > > > > My Blade 100 now panics on boot with HEAD, and I've tracked it down to > > > sys/sparc64/pci/ofw_pcibus.c 1.21 (SVN r182108) by marius@. > > > The most likely reason for this is a buggy driver. In this > > case the culprit appears to be the ISA front-end of ahc(4), > > which assumes that it can do bus space reads and writes at > > addresses that may in fact be assigned to a non-ahc(4)- > > compatible device or none at all. While writing something > > at an address that may no belong to the expected device > > probably is a bad idea in generally, reading to and writing > > from unassigned addresses may also trigger exceptions on > > sparc64. I'm unsure how to really fix ahc(4) regarding this, > > I think it should be okay though to only do it on i386 where > > the address range in question probably is reserved for such > > purposes (and which also is the only architecture FreeBSD > > currently runs on where a machine might have an ISA-slot > > and thus can use that front-end at all). > > Justin, do you approve the below patch? > > > > Marius > > > > Index: ahc_isa.c > > =================================================================== > > --- ahc_isa.c (revision 182474) > > +++ ahc_isa.c (working copy) > > @@ -82,6 +82,12 @@ ahc_isa_identify(driver_t *driver, device_t parent > > int slot; > > int max_slot; > > > > +#if !defined(__i386__) > > + /* > > + * Don't assume we can get away with the blind bus space > > + * reads and writes which ahc_isa_find_device() does. > > + */ > > +#endif > > max_slot = 14; > > for (slot = 0; slot <= max_slot; slot++) { > > struct aic7770_identity *entry; > > This patch (with the addition of a "return;" inside the #ifdef which I'm > assuming was forgotten!) gets me booting again with stock ofw_pcibus.c. Oops, the "return;" was missing of course. Marius