From owner-svn-src-head@FreeBSD.ORG Thu Aug 29 10:10:28 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 25FEDA02; Thu, 29 Aug 2013 10:10:28 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD75A264E; Thu, 29 Aug 2013 10:10:27 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VEzBJ-000Bkw-Rt; Thu, 29 Aug 2013 12:10:26 +0200 Message-ID: <521F1E0C.5000404@FreeBSD.org> Date: Thu, 29 Aug 2013 12:10:20 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130813 Thunderbird/17.0.8 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r254882 - head/sys/dev/pci References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308261055.17964.jhb@freebsd.org> In-Reply-To: <201308261055.17964.jhb@freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2UNULDEOFGVDEHMHDJKKV" 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: Thu, 29 Aug 2013 10:10:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2UNULDEOFGVDEHMHDJKKV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 26.08.2013 16:55, John Baldwin wrote: > On Sunday, August 25, 2013 2:09:12 pm Jean-Sebastien Pedron wrote: >> Author: dumbbell >> Date: Sun Aug 25 18:09:11 2013 >> New Revision: 254882 >> URL: http://svnweb.freebsd.org/changeset/base/254882 >> >> Log: >> vga_pci: Add API to map the Video BIOS >=20 > This won't actually work (the PCI bus will panic when you do the duplic= ate=20 > alloc). Why not put this in the softc of the vga_pci device? In fact,= it is=20 > already there. You just need to bump the vr_refs on the vga_bios resou= rce=20 > similar to what vga_pci_alloc_resource() does. Ok, so just calling vga_pci_alloc_resource() instead of bus_alloc_resource_any() in vga_pci_map_bios() would be enough to fix this first problem. > Also, returning a void * for this API seems rather hacky. Have you con= sidered > returning a struct resource * instead (and requiring the caller to use = > bus_space_* on it)? That would be more consistent with new-bus. You're right. > I can help with getting the right bus_alloc_resource() incantation to > alloc a struct resource * for the shadow copy if so. Yes please, I'd appreciate it :) I see that the function allocates resources from the parent device, but I'm not sure what to do with this, because the shadow copy is at a fixed physical address. --=20 Jean-S=C3=A9bastien P=C3=A9dron ------enig2UNULDEOFGVDEHMHDJKKV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIfHhEACgkQa+xGJsFYOlPxSgCfVCBdHWVFo72vEV8abGRS4SYt vSYAnR9Z389sX+pdK1N/Qf/G71msblrs =P0L/ -----END PGP SIGNATURE----- ------enig2UNULDEOFGVDEHMHDJKKV--