On Wed, 2010-02-17 at 19:29 +0200, Nameer Yarkon wrote:
> On Wed, Feb 17, 2010 at 6:04 PM, Daniel Stone <[email protected]> wrote:
> > What's your real question? i.e. what problem are you trying to solve?
> 
> I'm trying to understand how user space can efficiently manipulate
> physical memory, and I'm sure that X11 does that great. So this is
> just a learning exercise for me about X11..
> 
> I know that it can be done via:
> 1. mmap'ing /dev/mem
> 2. creating a char device driver that allocates physical memory and
> expose it via mmap() support

Those are the same thing; /dev/mem is a character device.

> and now i understand it can also be done via sysfs ?

The implementation for mmap on the sysfs resource files is largely the
same as for mmap on /dev/mem.  It has the benefit of only allowing you
to access the memory corresponding to a particular BAR on the PCI
device.

ls /sys/bus/pci/devices/*/resource*

- ajax

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to