Hi,<br><br><br><div class="gmail_quote">On Tue, Dec 4, 2012 at 11:07 PM, Joel A Fernandes <span dir="ltr">&lt;<a href="mailto:agnel.joel@gmail.com" target="_blank">agnel.joel@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am looking at a problem that might be too difficult to solve, or<br>
might not if I&#39;m missing something so I thought I&#39;d bounce it off this<br>
group,<br>
<br>
Basically I have an application in userspace who&#39;s &quot;.data&quot; section<br>
_has_ to be loaded into particular locations in physical memory. That<br>
is, there is a chunk of physical memory that has to contain the .data<br>
section and no other part of physical memory should.<br></blockquote><div>This is something unconventional. I wouldn&#39;t expect user space to mandate that.  I think you are approaching the problem in a wrong way. <br></div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
What is the easiest way to do this? I guess, changes might be required<br>
to the ELF loaders in fs/bin*.c. Any other tricks?<br>
<br></blockquote><div>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?<br>
<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Is it non-trivial to add a new memory zone to the kernel that manages<br>
a particular section of physical memory? I thought if a new zone could<br>
be added, then we could possibly modify the kernel ELF loader to<br>
recognize a specially marked .data section and alloc memory from that<br>
special zone when allocating page frames.<br>
<br>
Let me know if you have any ideas, Thanks,<br>
 <br></blockquote><div>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.<br>
<br>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.<br>
<br>Would be interesting to see your use case!<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Regards,<br>
Joel<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br>