HEAD panic with ofw_pcibus.c 1.21 on Blade 100

Marius Strobl marius at alchemy.franken.de
Mon Sep 1 19:46:34 UTC 2008


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 at .
> > 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



More information about the freebsd-sparc64 mailing list