Subject: Re: uncached user space mapping with mmap() ???

From: Dan Malek <[email-masked]>
Date: Thu, 04 Mar 2004 18:17:27 -0500

Richard Williams wrote:

> I just tried this using pread....

No, no.

Open /dev/mem and use mmap() to map your physical address:

   mmap(NULL, <page_size_bytes>, (PROT_READ|PROT_WRITE), MAP_SHARED, mem_fd, phys_addr);

Then, use the pointer returned from mmap() as the base of your
registers.

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/