Re: How to map to Physical Address by using mmap() in Linux
- From: Jasen Betts <jasen@xxxxxxxxxx>
- Date: 21 Dec 2008 03:06:12 GMT
On 2008-12-19, khadar <md.khadar@xxxxxxxxx> wrote:
Hi,
Thanks for your reply.
What I want is, after linux kernel booted up , I want to write a
file at 0x7000000 (This is physical address).
We can not access Physical Address from User space.
I am using 128MB RAM out of this some is consumed for kernel
lremaining is 123MB of free space.
I want to write 1 or 2 MB of file at specified Physical location (in
Free RAM location)
That location is 0x7000000.
By using mmap(), we can map our file but not to physical address but
mapped address is Virtual..
mmap does not "write files to memory". it associates virual address
space with disk files.
So how to convert that Virtual equivalent of Physical Address(i.e.
0x7000000).
can't.
If it possible to calculate Physical Address in User space by
available virtual address.
probably.
If u know ?please clarify...
mmap the apropriate region of /dev/mem into your applications virtual
address space, then read the files contents and write them into
physical ram.
.
- Follow-Ups:
- Re: How to map to Physical Address by using mmap() in Linux
- From: Rainer Weikusat
- Re: How to map to Physical Address by using mmap() in Linux
- References:
- How to map to Physical Address by using mmap() in Linux
- From: khadar
- Re: How to map to Physical Address by using mmap() in Linux
- From: Josef Moellers
- Re: How to map to Physical Address by using mmap() in Linux
- From: khadar
- How to map to Physical Address by using mmap() in Linux
- Prev by Date: Re: How to map to Physical Address by using mmap() in Linux
- Next by Date: Re: How to map to Physical Address by using mmap() in Linux
- Previous by thread: Re: How to map to Physical Address by using mmap() in Linux
- Next by thread: Re: How to map to Physical Address by using mmap() in Linux
- Index(es):
Relevant Pages
|