Re: Reading /dev/mem by dd
From: Andi Kleen
Date: Tue Feb 16 2010 - 03:41:19 EST
On Tue, Feb 16, 2010 at 10:35:40AM +0200, Nameer Yarkon wrote:
> On Thu, Nov 12, 2009 at 8:13 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> >> Is that the only valid use of /dev/mem, or even its main use?
> >
> > These days it is the primary use. Things like X11 were historically
> > probably the biggest user of it, and things like LRMI sometimes need that
> > sort of stuff.
>
> how does X11 get now direct access to the physical memory (instead of
> /dev/mem) ?
The classic X server doesn't use main memory, typically just mapped
graphic card resources
(if you don't count BIOS tables and memory accessed by the video bios
running in emulation, but that is typically excluded by the check)
In fact it can't because it doesn't know the physical
addresses of its process memory.
Modern X does it through kernel modules (DRM, GEM etc.)
One reason it's needed to do it this way is IOMMUs.
-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/