Accessing PCI-E resources on 460EX

Felix Radensky felix at embedded-sol.com
Tue Nov 4 09:53:21 EST 2008


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.


More information about the Linuxppc-embedded mailing list