two virtual address pointing to same physical address

Chan Kim ckim at etri.re.kr
Mon May 19 21:07:34 EDT 2014


sorry for frequent emails,
In my case,  pgdp=c8000320, __nocache_fix(pgdp)=c0540320 __pa(pgdp) = 68000320 when I printed at the beging of srmmu_early_allocate_ptable_skeleton.
Chan


보낸 사람 : "Chan Kim" <ckim at etri.re.kr>
보낸 날짜 : 2014-05-20 09:40:44 ( +09:00 )
받는 사람 : Valdis.Kletnieks at vt.edu <Valdis.Kletnieks at vt.edu>
참조 : kernelnewbies at kernelnewbies.org <kernelnewbies at kernelnewbies.org>
제목 : Re: two virtual address pointing to same physical address

Hi Valdis,
I see. Thanks, I remember reading about the merits of virtual address in the books.
But still it's confusing. Can two virtual addresses from the "same process" (in init process, one for nocache pool, the other not) point to the same physical address? I just want to make sure this is not a problem in my situtation.
As I said earlier, in my case, during the init process, __nocache_fix(0xc8000000) is 0xc0540000. which is physically 0x60540000. Is this ok? could someone elaborate on this to me?
Chan


보낸 사람 : "Valdis.Kletnieks at vt.edu" 
보낸 날짜 : 2014-05-19 22:12:08 ( +09:00 )
받는 사람 : 김찬 
참조 : kernelnewbies at kernelnewbies.org 
제목 : Re: two virtual address pointing to same physical address

On Mon, 19 May 2014 11:47:23 -0000, Chan Kim said:

> Is this situation normal? (in the kernel, two different virtual addresses
> pointing to the same physical address.)

Think for a bit how shared libraries are implemented. Then think about how
mmap() of a shared region of a file at different virtual addresses in different
processes works. Then you'll be able to answer your own question...
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


More information about the Kernelnewbies mailing list