Subject: Re: CVS commit: src/sys/dev/wsfb
To: Jason Thorpe <thorpej@shagadelic.org>
From: Michael Lorenz <macallan@netbsd.org>
List: source-changes
Date: 04/07/2007 18:53:17
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Apr 7, 2007, at 16:54, Jason Thorpe wrote:

> On Apr 6, 2007, at 8:41 PM, Michael Lorenz wrote:
>
>> - find a clean way to mmap the framebuffer, just returning the 
>> physical
>>   address works on macppc but not on other architectures. Problem is, 
>> that
>>   we cannot rely on the address being a bus address - on macppc it is,
>>   but for instance on sparc64 it's not.
>
> There is a bus_space_mmap() and a bus_space_vaddr(), so if you can 
> encapsulate everything within a bus_space_tag_t / bus_space_handle_t, 
> you should be good.

Problem is, what I get from OF is already a kernel virtual address. On 
macppc that's not a problem since in that case it's identical to the 
corresponding physical address but some sparc64 boxes likes to map the 
fb into the lower 4GB so the OF property can still be a 32bit value and 
turning that into a bus address is something of a hassle. Maybe we can 
pretend it's a bus address for now and fix the sparc64 case later. That 
would allow us to put all bus_space_(m)map() stuff into the bus 
frontend where we don't have those troubles.

> Yes, it would be nice to have prop types for those sorts of things.  I 
> have been considering how to extend proplib at run-time with custom 
> types (that would allow, for example, putting device_t's into a 
> dictionary).

I used a blob for EDID data in proplib. Problems come with opaque types 
and there we're probably better off with just a pointer type.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRhgg3cpnzkX8Yg2nAQJ11AgAittUK09g6NsGFjfnRXUJw/J3YhLxMEs6
WNtAedCJvZV3iCUTAQzL4oK8CM3NkhKOTJR/CVZOgAjkjoKAgyxe/8EvgAc7/etr
VT09cZMGreSy8VtJTmXGo5iqohGkx9aA+Aviq8oAVFKKo/NSE1xvSwQaFLFgSv2+
U/5Mpc0OASYxcxWur1suLVMKOnzVJVwUtE95fKZKvAgeMsLPOq0phNDGfirvtRbZ
lmwDBzXi5jNbnWSDLVQ35V81ec9ZHOHrv8ag67EGx0yOgZEDqfrtodU159I65BaG
TGSxbVrWOK4spDoOWXiArP1TuD6rucbLNLHm/zlmi/dgr6uNB9SFlA==
=BvcG
-----END PGP SIGNATURE-----