Access physical memory via mmap() on ppc440epx.

Josh Boyer jwboyer at gmail.com
Wed Apr 2 12:44:25 EST 2008


On Tue, 2008-04-01 at 14:12 -0700, Leonid wrote:
> Hi:
> 
> I am trying to read from NOR flash, located on address 0xfc000000, on my

It's at 0x1fc000000 IIRC.

> TLB entries look strange though. That what it was on u-boot stage:
> 
> 440EPx>tlb 0 10
> IDX TID      EPN  SIZE VTS          RPN   USER WIMGE USRSVC
>  0 : 00 40000000 256MB V0 -> 0_00000000 U:0000 -I-G- XWRXWR
>  1 : 00 00000000 256MB V0 -> 0_00000000 U:0000 -I-G- XWRXWR
>  2 : 00 c0000000 256MB V0 -> 1_c0000000 U:0000 -I-G- XWRXWR
>  3 : 00 f0000000 256MB V0 -> 1_f0000000 U:0000 WI-G- XWRXWR

See.  Virtual is 0xf0000000, physical is 0x1f0000000.

> On Linux stage it looks rather different:

I don't even see your entry in here.  Likely because the TLB is small
and it's gone by the time you do the dump

> Probably under MMU it should look this way? How to use mmap() then?

Try mmap64 on the real physical address and see if that helps.

josh



More information about the Linuxppc-embedded mailing list