On loading userspace data into particular section of physical memory (ARM)

Subramaniam Appadodharana c.a.subramaniam at gmail.com
Wed Dec 5 00:19:19 EST 2012


Hi,


On Tue, Dec 4, 2012 at 11:07 PM, Joel A Fernandes <agnel.joel at gmail.com>wrote:

> I am looking at a problem that might be too difficult to solve, or
> might not if I'm missing something so I thought I'd bounce it off this
> group,
>
> Basically I have an application in userspace who's ".data" section
> _has_ to be loaded into particular locations in physical memory. That
> is, there is a chunk of physical memory that has to contain the .data
> section and no other part of physical memory should.
>
This is something unconventional. I wouldn't expect user space to mandate
that.  I think you are approaching the problem in a wrong way.

>
> What is the easiest way to do this? I guess, changes might be required
> to the ELF loaders in fs/bin*.c. Any other tricks?
>
> Why would you want to do that? Even if you do that, how are you going to
achieve this for just your application. What even you change here (even if
that the right place to do it), would be applicable for all processes. I
dont think you want that, do you?



> Is it non-trivial to add a new memory zone to the kernel that manages
> a particular section of physical memory? I thought if a new zone could
> be added, then we could possibly modify the kernel ELF loader to
> recognize a specially marked .data section and alloc memory from that
> special zone when allocating page frames.
>
> Let me know if you have any ideas, Thanks,
>
>
I am not sure why you would need data section to be in a certain physical
memory, but if all you want is to copy a certain data from userspace to be
shared with a peripheral or some thing that could be done.

One way to do it would be to have a driver (you own memory manager if you
will) that would reserve this physical memory during bootup, and then can
have a char device interface that you would call from your user app to
request for memory.

Would be interesting to see your use case!

Regards,
> Joel
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121204/d719b968/attachment.html 


More information about the Kernelnewbies mailing list