Ayman El-Khashab wrote:
What works for me is using the mmap64 as in the following example to
map the physical address, fd is the file descriptor for /dev/mem
off64_t offset = static_cast<off64_t>(your physical address);
void * const p =
mmap64(0,256,PROT_WRITE|PROT_READ,MAP_SHARED,fd,offset);
The only thing to note is that the address you pass should be aligned
to the page boundry even though some devices are not.
Thanks, Ayman. I've tried that, but I'm still getting the same error.
My physical address is 0xe80000000, length is 0x100000.
Felix.
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded