Hi everybody,
I have just discovered l4 because I have started to translate a simple OS in Ada (SOS from http://sos.enix.org), and now I would like to develop an Ada interface to L4. Actually I have compiled pistachio and I run a very simple Ada executable on top of it.
There something strange with my executable : it sends page fault error to sigma0 (label 0xffe5 and 0xffe2) even before I start to execute code... Does somebody have an idea ?
Thanks in advance, xavier
[Xavier Grave]
Hi everybody, I have just discovered l4 because I have started to translate a simple OS in Ada (SOS from http://sos.enix.org), and now I would like to develop an Ada interface to L4. Actually I have compiled pistachio and I run a very simple Ada executable on top of it.
There something strange with my executable : it sends page fault error to sigma0 (label 0xffe5 and 0xffe2) even before I start to execute code... Does somebody have an idea ?
I assume you're running your executable as the root task.
When the root task (or any task for that matter) starts, it doesn't have anything mapped into its address space. Upon trying to execute the first instruction it will therefore raise a page faults. This is probably the page fault you're observing in sigma0.
eSk
Thanks for your answer,
I assume you're running your executable as the root task.
indeed.
When the root task (or any task for that matter) starts, it doesn't have anything mapped into its address space. Upon trying to execute the first instruction it will therefore raise a page faults. This is probably the page fault you're observing in sigma0.
Can I avoid this ? I have to ask to map it to sigma0 ? Thanks one more time, xavier
[Xavier Grave]
Thanks for your answer,
I assume you're running your executable as the root task.
indeed.
When the root task (or any task for that matter) starts, it doesn't have anything mapped into its address space. Upon trying to execute the first instruction it will therefore raise a page faults. This is probably the page fault you're observing in sigma0.
Can I avoid this ? I have to ask to map it to sigma0 ?
You can't map anything *to* sigma0. Sigma0 automagically owns all memory. But yes, you have to map memory from sigma0 to the root task.
Why would you want to avoid that?
eSk
Can I avoid this ? I have to ask to map it to sigma0 ?
You can't map anything *to* sigma0. Sigma0 automagically owns all memory. But yes, you have to map memory from sigma0 to the root task.
Ok, how can I do this so ?
Why would you want to avoid that?
What I want to avoid is the page fault. Sorry for my bad english. My ideas are not very clear on l4 and if you add the filter of my poor english....
Thanks one more time for your answer. xavier
[Xavier Grave]
Can I avoid this ? I have to ask to map it to sigma0 ?
You can't map anything *to* sigma0. Sigma0 automagically owns all memory. But yes, you have to map memory from sigma0 to the root task.
Ok, how can I do this so ?
Sigma0 will by default be the pager of the root task. Sigma0 will resolve any pagegaults and map the pages to the root task using the smallest possible page size.
You might want to request the pages explicitly from sigma0 (see include/l4/sigma0.h) so that you can have larger page sizes mapped to you. Also, certain special memory regions (e.g., device memory) can not be pagefaulted into the root task. They have to be requested explicitly.
Also remember that sigma0 will refuse to give out pages to the root task if they have been allocated to something else.
Why would you want to avoid that?
What I want to avoid is the page fault. Sorry for my bad english. My ideas are not very clear on l4 and if you add the filter of my poor english....
The initial pagefault(s) are difficult to avoid. You can however request sigma0 to remap pages. This also works if you request sigma0 to remap the memory using larger page sizes.
eSk
l4-hackers@os.inf.tu-dresden.de