From: "Nobin Mathew" <nobin.mathew@gmail.com>
To: "Manu Abraham" <abraham.manu@gmail.com>
Cc: "vraghavan3@mail.gatech.edu" <vraghavan3@mail.gatech.edu>,
linux-kernel@vger.kernel.org
Subject: Re: Reading a physical memory location
Date: Wed, 11 Jul 2007 13:44:49 +0530 [thread overview]
Message-ID: <8d6898730707110114p3c02e24as8ca8359731fdc320@mail.gmail.com> (raw)
In-Reply-To: <1a297b360707110111u25a786c5m4857673e3e1b90a1@mail.gmail.com>
See this in the documentation
The returned virtual address is a current CPU mapping for the memory
address given. It is only valid to use this function on addresses that
have a kernel mapping
This function does not handle bus mappings for DMA transfers. In
almost all conceivable cases a device driver should not be using this
function
Nobin
On 7/11/07, Manu Abraham <abraham.manu@gmail.com> wrote:
> On 7/11/07, Nobin Mathew <nobin.mathew@gmail.com> wrote:
> > Which is your platform ?
> >
> > Which processor?
> >
> > If you want to use physical address directly, then disable MMU. That
> > is not possible in linux.
>
> ioremap does map io memory using phys_to_virt
> I thought phys_to_virt was enough to remap physical memory to virtual
> http://mirror.linux.org.au/linux.conf.au/2005/cdrom-beta-1/linux-mandocs-2.6.12.6/phys_to_virt.html
>
>
>
> >
> > Nobin
> >
> > On 7/11/07, Manu Abraham <abraham.manu@gmail.com> wrote:
> > > On 7/10/07, vraghavan3@mail.gatech.edu <vraghavan3@mail.gatech.edu> wrote:
> > > >
> > > > Thanks for the quick reply. But I was wondering as to why I would have to map
> > > > the physical address to the virtual address when I know that the string is
> > > > permanently in the physical memory because its loaded into flash. Is there a way
> > > > to directly read from the physical memory location? Also, do the functions
> > > > ioremap() and readl(va) work when called from within a kernel module?
> > > >
> > >
> > > Of course, if you look at almost any of the memory mapped device
> > > drivers, you will find that ioremap/readl/writel is the backbone of
> > > your infrastructure.
> > >
> > >
> > > Manu
> > >
> >
>
next prev parent reply other threads:[~2007-07-11 8:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-09 19:47 vraghavan3
2007-07-09 22:39 ` Nobin Mathew
2007-07-10 18:12 ` vraghavan3
2007-07-10 22:02 ` Manu Abraham
2007-07-11 5:43 ` Nobin Mathew
2007-07-11 8:11 ` Manu Abraham
2007-07-11 8:14 ` Nobin Mathew [this message]
2007-07-11 8:50 ` Manu Abraham
2007-07-11 8:57 ` Nobin Mathew
2007-07-11 10:00 ` Clemens Koller
2007-07-24 12:48 ` Helge Hafting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d6898730707110114p3c02e24as8ca8359731fdc320@mail.gmail.com \
--to=nobin.mathew@gmail.com \
--cc=abraham.manu@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vraghavan3@mail.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®