Subject: Re: vgahw and so on
To: Michael <macallan18@earthlink.net>
From: Michael <macallan18@earthlink.net>
List: port-macppc
Date: 07/16/2004 03:29:22
Hello,
> Getting vgahw to work would allow quite a lot of graphics boards to
> work...
Some progress - the got around the dreaded "can't map video memory
[a0000,10000]", although I don't have the faintest idea what went wrong
or why it works now.
XFree opens /dev/mem at some point and maps things like video ram,
registers and so on, and for some boards also the VGA framebuffer
memory - hardwired at 0xa0000. For this - and only this - address mmap
fails with 'invalid argument'. So after some frustration I just opened
/dev/mem myself and mmap()ed this memory range and - surprise! It
works. So - what the hell happened? It's no limit on how many mappings
of the same file you can have - I modified the code to map the VGA
memory before all others - it fails even then.
And this problem seems to be PowerPC specific. Hmm, maybe it uses some
voodoo on the file descriptor or so, I'll have a look.
have fun
Michael