Re: Reading a physical memory location

2007-07-24 Thread Helge Hafting
[EMAIL PROTECTED] 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. Because that is how any CPU with a MMU works. All a

Re: Reading a physical memory location

2007-07-11 Thread Clemens Koller
Manu Abraham schrieb: On 7/11/07, Nobin Mathew <[EMAIL PROTECTED]> wrote: 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 handl

Re: Reading a physical memory location

2007-07-11 Thread Nobin Mathew
Thanks On 7/11/07, Manu Abraham <[EMAIL PROTECTED]> wrote: On 7/11/07, Nobin Mathew <[EMAIL PROTECTED]> wrote: > 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

Re: Reading a physical memory location

2007-07-11 Thread Manu Abraham
On 7/11/07, Nobin Mathew <[EMAIL PROTECTED]> wrote: 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

Re: Reading a physical memory location

2007-07-11 Thread Manu Abraham
On 7/11/07, Nobin Mathew <[EMAIL PROTECTED]> 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

Re: Reading a physical memory location

2007-07-11 Thread Nobin Mathew
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 d

Re: Reading a physical memory location

2007-07-10 Thread Nobin Mathew
Which is your platform ? Which processor? If you want to use physical address directly, then disable MMU. That is not possible in linux. Nobin On 7/11/07, Manu Abraham <[EMAIL PROTECTED]> wrote: On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Thanks for the quick reply. But I was

Re: Reading a physical memory location

2007-07-10 Thread Manu Abraham
On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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 di

Re: Reading a physical memory location

2007-07-10 Thread vraghavan3
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

Re: Reading a physical memory location

2007-07-09 Thread Nobin Mathew
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, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: -- Hey all, I know the physical

Reading a physical memory location

2007-07-09 Thread vraghavan3
-- 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