linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* how to get a physical address?
@ 2001-07-23  4:01 hychon
  0 siblings, 0 replies; only message in thread
From: hychon @ 2001-07-23  4:01 UTC (permalink / raw)
  To: linuxppc-embedded


Hi~~

I want to know "how to get a physical address from mmaped area??"

I find  some information  variable vitrual address is  "from
3G+physical_memory_size + 8M to 4G" here mailing site.

my case , 32M ram

I allocate vitrual address throgh by following

 mem1_chy = open("/dev/kmem", O_RDWR);
 chy_addr1 = mmap(0, 64*1024,(PROT_READ|PROT_WRITE),MAP_SHARED, mem1_chy

,0xFF000000 );
  printf(" address : chy_addr1 = %x   \n", chy_addr );

      --->  result =>   address : chy_addr1 = 30027000

 and

  mem2_chy = open("/dev/kmem", O_RDWR);
  chy_addr2 = mmap(0, 64*1024,(PROT_READ|PROT_WRITE),MAP_SHARED,
mem2_chy , 0x100000 );
  printf(" address : chy_addr2 = %x   \n", chy_addr2 );

      --->  result =>   address : chy_addr2 = 30016000


how a get a phyisical address of chy_addr2 (chy_addr1) ??
 chy_addr 2is not return "100000" .      wondering??

I want  a little  information about "from 3G+physical_memory_size + 8M
to 4G"?
 - why it add 8M ?

anyway, I want to know get a physical address from VMA araa??


                                             --  hye yong --


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-23  4:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-23  4:01 how to get a physical address? hychon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).