From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 19:08:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 38F00540; Tue, 3 Sep 2013 19:08:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 034902FBB; Tue, 3 Sep 2013 19:08:31 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A6A83B981; Tue, 3 Sep 2013 15:08:29 -0400 (EDT) From: John Baldwin To: "=?iso-8859-15?q?Jean-S=E9bastien?= =?iso-8859-15?q?_P=E9dron?=" Subject: Re: svn commit: r254882 - head/sys/dev/pci Date: Tue, 3 Sep 2013 14:10:45 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308301644.36750.jhb@freebsd.org> <52219DAE.9010707@FreeBSD.org> In-Reply-To: <52219DAE.9010707@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201309031410.46052.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 03 Sep 2013 15:08:29 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 19:08:31 -0000 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