Thread (10 messages) 10 messages, 4 authors, 2012-07-11

Mapping of Device Physical Address to Kernel Virtual address

From: Dave Hylands <hidden>
Date: 2012-07-10 06:20:56

Hi Prabhu,

On Mon, Jul 9, 2012 at 9:56 PM, Prabhu nath [off-list ref] wrote:
Dear All,

                   Is it possible to map a physical address of a device to a
known Kernel virtual address. I know about ioremap_xxx (...).
which will map a physical address of a device to a kernel virtual address
allocated by ioremap_xxx(...).

For E.g. I have a device whose physical address range is 0x80008000 to
0x80008FFF.
             Is it possible to map this device physical address to a known
virtual address range 0xF0008000 to 0xF0008FFF.
About the only way to do this is to use static mappings. I was under
the impression that static mappings are on the way out, and that
dynamic mappings are required when using device tree.

An example of using static mappings can be found here:
http://lxr.linux.no/linux+v3.4.4/arch/arm/mach-integrator/integrator_ap.c#L88
My hardware configuration has 128 MB of system RAM which will have been
MAPPED to the Kernel virtual address from 0xC0000000 to 0xC7FFFFFF

Also is it possible to configure the vmalloc kernel virtual address region
to a fixed range of 128 MB from 0xC8000000 to 0xCFFFFFFF
I believe that you can only control the vmalloc start by controlling
the amount of SDRAM that you have.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help