Re: Mapping of Device Physical Address to Kernel Virtual address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

在 2012-7-10,17:16,"Prabhu nath" <gprabhunath@xxxxxxxxx> 写道:

Thanks for your reply. Plz see inline

On Tue, Jul 10, 2012 at 11:17 AM, Philipp Ittershagen <p.ittershagen@xxxxxxxxxxxxxx> wrote:
Hi Prabhu,

On Tue, Jul 10, 2012 at 6:56 AM, Prabhu nath <gprabhunath@xxxxxxxxx> wrote:
> 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.

I don't think this is possible, because these virtual address ranges
are handled by the kernel VMA system and are allocated dynamically, so
that is not just a bitmask or something to change.

> 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

You could change PAGE_OFFSET. From [1]:

        Physical start address of the first bank of RAM.

        Virtual start address of the first bank of RAM.  During the kernel
        boot phase, virtual address PAGE_OFFSET will be mapped to physical
        address PHYS_OFFSET, along with any other mappings you supply.
        This should be the same value as TASK_SIZE.

But I'm curious: Why do you want to change it?

      Just wanted to have a constant mapping from PA to VA of devices and wanted to have a separate region for vmalloc. 

what do you mean constant?
After mapping, it is constant.
Before mapping, it is constant for 
Low memory region, but is not 
Constant for vmalloc region. 

Vmalloc region is separate in default.
Your change doesn't make any sense.

The most difficult thing for you is
To make sure what do you want to
Do really. Please give detail demand.




Kernelnewbies mailing list
Kernelnewbies mailing list

[Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Networking]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

Add to Google Powered by Linux