Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Aug 2013 12:10:20 +0200
From:      =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= <dumbbell@FreeBSD.org>
To:        John Baldwin <jhb@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:  <521F1E0C.5000404@FreeBSD.org>
In-Reply-To: <201308261055.17964.jhb@freebsd.org>
References:  <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308261055.17964.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



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