Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2013 14:10:45 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        "=?iso-8859-15?q?Jean-S=E9bastien?= =?iso-8859-15?q?_P=E9dron?=" <dumbbell@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r254882 - head/sys/dev/pci
Message-ID:  <201309031410.46052.jhb@freebsd.org>
In-Reply-To: <52219DAE.9010707@FreeBSD.org>
References:  <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308301644.36750.jhb@freebsd.org> <52219DAE.9010707@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, August 31, 2013 3:39:26 am Jean-S=E9bastien P=E9dron wrote:
> Le 30/08/2013 22:44, John Baldwin a =E9crit :
> >> However, BUS_ALLOC_RESOURCE() returns NULL in my tests.
> >
> > Hmm, can you get devinfo -u output?  I wonder if orm0 is eating this
> > resource.
>=20
> You'll find it attached.

Yes, orm0 is eating it.  Try this along with using RF_SHAREABLE in your
call to BUS_ALLOC_RESOURCE():

Index: x86/isa/orm.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=2D-- orm.c	(revision 255020)
+++ orm.c	(working copy)
@@ -133,7 +133,8 @@ orm_identify(driver_t* driver, device_t parent)
 		bus_set_resource(child, SYS_RES_MEMORY, sc->rnum, chunk,
 		    rom_size);
 		rid =3D sc->rnum;
=2D		res =3D bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0);
+		res =3D bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid,
+		    RF_SHAREABLE);
 		if (res =3D=3D NULL) {
 			bus_delete_resource(child, SYS_RES_MEMORY, sc->rnum);
 			chunk +=3D IOMEM_STEP;



=2D-=20
John Baldwin



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