From owner-freebsd-sparc64@FreeBSD.ORG Mon Sep 1 19:46:34 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 59C6D1065672; Mon, 1 Sep 2008 19:46:34 +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 D56BA8FC25; Mon, 1 Sep 2008 19:46:33 +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 m81JkWCJ008988; Mon, 1 Sep 2008 21:46:32 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id m81JkW8Z008987; Mon, 1 Sep 2008 21:46:32 +0200 (CEST) (envelope-from marius) Date: Mon, 1 Sep 2008 21:46:32 +0200 From: Marius Strobl To: Gavin Atkinson Message-ID: <20080901194632.GF80839@alchemy.franken.de> References: <1220278827.70590.35.camel@buffy.york.ac.uk> <1220286044.70590.43.camel@buffy.york.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1220286044.70590.43.camel@buffy.york.ac.uk> User-Agent: Mutt/1.4.2.3i Cc: 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:46:34 -0000 On Mon, Sep 01, 2008 at 05:20:44PM +0100, Gavin Atkinson wrote: > On Mon, 2008-09-01 at 15:20 +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@. > > Specifically, this version now configures bridges differently, and not > > setting "Master Abort Mode" prevents the panic: > > > > Index: src/sys/sparc64/pci/ofw_pcibus.c > > =================================================================== > > RCS file: /home/ncvs/src/sys/sparc64/pci/ofw_pcibus.c,v > > retrieving revision 1.21 > > diff -u -r1.21 ofw_pcibus.c > > --- src/sys/sparc64/pci/ofw_pcibus.c 24 Aug 2008 15:05:46 -0000 1.21 > > +++ src/sys/sparc64/pci/ofw_pcibus.c 1 Sep 2008 14:09:27 -0000 > > @@ -140,7 +140,7 @@ > > PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE) { > > reg = PCIB_READ_CONFIG(bridge, busno, slot, func, > > PCIR_BRIDGECTL_1, 1); > > - reg |= PCIB_BCR_MASTER_ABORT_MODE | PCIB_BCR_SERR_ENABLE | > > + reg |= /* PCIB_BCR_MASTER_ABORT_MODE | */ PCIB_BCR_SERR_ENABLE | > > PCIB_BCR_PERR_ENABLE; > > #ifdef OFW_PCI_DEBUG > > device_printf(bridge, > > [snip] > > > Any suggestions? Are we missing some code necessary to support master > > mode aborts? > > After further research (mainly involving eyeballing > pci_pbm_err_handler() in OpenSolaris), it looks like we are indeed > missing code to handle them. Therefore, until this code is written, I > suspect the patch above is actually correct. > While not setting master abort mode on PCI-PCI-bridges might hide your problem, the right place for ignoring master and (in this case) target aborts, both of which are fatal in general though, would be the host-PCI-bridge. Similarly, support for peeking and poking of I/O and memory space like OpenSolaris apparently has (the associated recovery handlers probably are the code you're refering to) should be implemented PCI-bus wide and not just grounded at PCI-PCI-bridges. I don't think there's a real need to go through the hoops to support these in FreeBSD though. The blind bus access ahc(4) ISA front-end does is also what hangs B100 during boot even with master abort mode in the PCI-PCI-bridges I think. We're looking at several problems here though and IMO the first one is that ahc(4) shouldn't try to identify cards on LPC(-like) busses and the respective code also only should be compiled in on architectures where machine actually can have ISA slots (which currently is only i386 AFAICT). Marius