mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: vraghavan3@mail.gatech.edu
To: Nobin Mathew <nobin.mathew@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Reading a physical memory location
Date: Tue, 10 Jul 2007 14:12:22 -0400	[thread overview]
Message-ID: <1184091142.4693cc06850f7@webmail.mail.gatech.edu> (raw)
In-Reply-To: <8d6898730707091539y14cf5afbsed7ed769526da0a1@mail.gmail.com>


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?

-- Veena



Quoting Nobin Mathew <nobin.mathew@gmail.com>:

> Hi,
>         If you know the physical address, then you get virtual address
> from that physical adress by using ioremap().
>
> Then you can use readl(virtualaddress) to read the string from there
>
> Nobin Mathew
>
> On 7/10/07, vraghavan3@mail.gatech.edu <vraghavan3@mail.gatech.edu> wrote:
> >
> >
> > --
> > Hey all,
> >
> > I know the physical address of a string which is loaded into flash memory.
> I
> > want to read the string at the known physical memory location from within a
> > kernel module. I initially tried reading the "/dev/mem" file using open(),
> > lseek() and read(). But I guess its not possible to call these functions
> from a
> > kernel module.
> >
> > Is there some way of reading the contents of this physical memory location
> from
> > within a kernel module?
> >
> > Thank You
> > Veena
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> >
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


--


  reply	other threads:[~2007-07-10 18:14 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 [this message]
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
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=1184091142.4693cc06850f7@webmail.mail.gatech.edu \
    --to=vraghavan3@mail.gatech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nobin.mathew@gmail.com \
    /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®