lkml.org 
[lkml]   [2007]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Reading a physical memory location

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/
>


--

-
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/

\
 
 \ /
  Last update: 2007-07-10 20:17    [W:0.062 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site