Guido Guenther wrote:
>
> On Mon, Dec 11, 2000 at 12:28:19PM +0100, Maciej W. Rozycki wrote:
> > friends) by glibc. At least XFree86 and SVGATextMode make use of these
> > features. I suppose it's the same for MIPS (I haven't checked, though).
> Yes. xf86MapVidMem & friends use /dev/mem to mmap videomemory & iospace
> independent of architecure.
> -- Guido
I am surprised. I thought /dev/mem is for accessing SYSTEM RAM. (do a 'man'
on /dev/mem) It is also confirmed by the code in drivers/char/mem.c. If you
want to access anything beyond 'high_memory", nothing is read.
Note that drivers/char/mem.c is cross-platform code. I am not sure how X
would access video memory through /dev/mem on either MIPS or other platforms.
That reason I want to fix /dev/kmem is that in some cases before a driver is
written people want to play with the hardware directly from the userland
(especially for demo purpose. :-0) Very useful for embedded systems.
Potentially fixing /dev/mem can do the same job. However /dev/mem cannot
differentiate cached or uncached accesses. With /dev/kmem, we just specify
0x8.. or 0xa....
Jun
|