Subject: Re: cleanup xsrc/xfree/xc/config/cf/NetBSD.c
To: None <tech-x11@NetBSD.org>
From: Izumi Tsutsui <firstname.lastname@example.org>
Date: 01/27/2005 00:29:55
In article <1A4014E4-6FAD-11D9-8201-000A95E95CCE@earthlink.net>
> I agree, the Xserver shouldn't have to meddle with PCI BARs, at least
> not to access the framebuffer. On the other hand the drivers I've seen
> so far map the framebuffer when you mmap() offsets between 0 and
> As far as I can tell XFree's SBus code uses /dev/fb to talk to the
I think current our cgsix.c provides mmap() function via /dev/fb.
(which is SunOS compatible?)
It's also provide to mmap register spaces, and an offset
for fb memory is not zero. I guess that was the reason why
OpenBSD guys introduced WSDISPLAYIO_MODE_DUMBFB for mmap op.
> Agreed again, but it would be a bit more complicated - some PCI
> framebuffers use more than one BAR for registers, then there's this
> nonsense with hard-wired VGA registers and so on, some need access to
> PCI IO space which is different on x86 and almost everything else - for
> kernel code that's not a problem thanks to bus_space_* but userland
> code can't use it.
Maybe we should have some generic APIs to access PCI space,
but it may be another future project :-)