Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Sep 2008 17:42:08 +0100
From:      Gavin Atkinson <gavin@FreeBSD.org>
To:        Marius Strobl <marius@alchemy.franken.de>
Cc:        gibbs@FreeBSD.org, freebsd-sparc64@FreeBSD.org
Subject:   Re: HEAD panic with ofw_pcibus.c 1.21 on Blade 100
Message-ID:  <1220287328.70590.46.camel@buffy.york.ac.uk>
In-Reply-To: <20080901161850.GE80839@alchemy.franken.de>
References:  <1220278827.70590.35.camel@buffy.york.ac.uk> <20080901161850.GE80839@alchemy.franken.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-I5ae6o9bB7NBGQbcf4cR
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

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.
Thanks!

Gavin

--=-I5ae6o9bB7NBGQbcf4cR
Content-Disposition: attachment; filename=aic-noisa.diff
Content-Transfer-Encoding: base64
Content-Type: text/x-patch; name=aic-noisa.diff; charset=ASCII

SW5kZXg6IHNyYy9zeXMvZGV2L2FpYzd4eHgvYWhjX2lzYS5jDQo9PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmls
ZTogL2hvbWUvbmN2cy9zcmMvc3lzL2Rldi9haWM3eHh4L2FoY19pc2EuYyx2DQpyZXRyaWV2aW5n
IHJldmlzaW9uIDEuNw0KZGlmZiAtdSAtcjEuNyBhaGNfaXNhLmMNCi0tLSBzcmMvc3lzL2Rldi9h
aWM3eHh4L2FoY19pc2EuYwkzIFNlcCAyMDA2IDAwOjI3OjQwIC0wMDAwCTEuNw0KKysrIHNyYy9z
eXMvZGV2L2FpYzd4eHgvYWhjX2lzYS5jCTEgU2VwIDIwMDggMTY6Mjc6MTcgLTAwMDANCkBAIC04
Miw2ICs4MiwxMyBAQA0KIAlpbnQgc2xvdDsNCiAJaW50IG1heF9zbG90Ow0KIA0KKyNpZiAhZGVm
aW5lZChfX2kzODZfXykNCisJLyoNCisJICogRG9uJ3QgYXNzdW1lIHdlIGNhbiBnZXQgYXdheSB3
aXRoIHRoZSBibGluZCBidXMgc3BhY2UNCisJICogcmVhZHMgYW5kIHdyaXRlcyB3aGljaCBhaGNf
aXNhX2ZpbmRfZGV2aWNlKCkgZG9lcy4NCisJICovDQorCXJldHVybjsNCisjZW5kaWYNCiAJbWF4
X3Nsb3QgPSAxNDsNCiAJZm9yIChzbG90ID0gMDsgc2xvdCA8PSBtYXhfc2xvdDsgc2xvdCsrKSB7
DQogCQlzdHJ1Y3QgYWljNzc3MF9pZGVudGl0eSAqZW50cnk7DQo=


--=-I5ae6o9bB7NBGQbcf4cR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1220287328.70590.46.camel>