How to alloc_pages from a given physical memory?
kipade at 163.com
Thu Jul 6 06:20:27 EDT 2017
I reserved such memory as cma range, and Im sure it can be allocated via
cma, such as dma_alloc_writecombine*. I want to hard code the physical
address because I have to make sure such address can be access by
another ipu cores of the soc platform. I think this can be reserved via
a generic way: Just customize page allocation for a shm object. (I have
a look at the kerrnel source, every omap_bo_object was bind a shm file,
so, i only need allocate pages by my way will resolve all the further
problem. otherwise, i would encounter many other unkown issues for me).*
On 06.07.2017 18:01, Kamil Konieczny wrote:
> On 06.07.2017 11:43, kipade wrote:
>> In fact, I want to allocate a continous of pages from a given physical
>> address for a shm object in
>> shmem_file_setup, might i should write a customized shmem_file_setup2
>> for this?
>> I use arm 32bit cpu, with kernel 3.14
> why do want this specific address 0x90000000 ?
> can it be 0x40000000 ? or 0x50000000 ? or 0x68880000 ?
> is this 0x90000000 located in hardware registers ?
> some memory regions are not accessible directly for allocation,
> because they are used for communication with hardware SoC,
> and so they are used by kernel drivers or directly by kernel
> kernel driver may or may not expose that memory region for user space,
> but this is driver work
> maybe you should ask on platform forum,
> you did not answer my question on what platform you are working
>>>>> On 06.07.2017 05:08, kipade wrote:
>>>>>> Here I want to allocate a block of shared memory from a given physical
>>>>>> address, such as 0x90000000, 6M. However, alloc_pages can't fit this
>>>>>> point. I had reserved enugh pages via cmem, there also have enough
>>>>>> continous pages for such allocation anywhere else. What should I do?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernelnewbies