Hi,
for my porting efforts, I need to map the physical parent Capability into the protection domain of a newly created Child. To do so, I extended the Cpu_session with a method "native_thread", which --given a Genode::Capability-- will tell me the "physical" Capability of a thread. I map the parent capability into a known place of the child address space using the assign_parent method of Platform_pd. Unfortunately at this point I am stuck. Can you give me some advice on where assign_parent is called and how I can provide it with the correct capability (as my tries of implementing that in Process::Process have failed)?
Many thanks in advance, Steffen
Am 09.06.2010 13:17, schrieb Steffen Liebergeld:
Hi,
for my porting efforts, I need to map the physical parent Capability into the protection domain of a newly created Child. To do so, I extended the Cpu_session with a method "native_thread", which --given a Genode::Capability-- will tell me the "physical" Capability of a thread. I map the parent capability into a known place of the child address space using the assign_parent method of Platform_pd. Unfortunately at this point I am stuck. Can you give me some advice on where assign_parent is called and how I can provide it with the correct capability (as my tries of implementing that in Process::Process have failed)?
Yet again I have to answer myself. I had an error in the IPC sending of Caps. However, the parent cap is only valid in Core, so it doesn't make sense to send it via Ipc, which would result in an invalid mapping anyways... Therefore I altered the assign_parent interface to use an unsigned long instead of a Genode::Capability. And: success! Init can now start children (which somehow get stuck during startuo when running the static constructors). However, during the start process, the capability describing Core's activation thread is sent around many many times, which results in literally tens of mappings in the Cap space. I don't know a good solution to this yet, but I wanted to inform you that there might be a problem.
Greetings, Steffen
Hi Steffen,
On Wed, Jun 09, 2010 at 02:13:44PM +0200, Steffen Liebergeld wrote:
However, during the start process, the capability describing Core's activation thread is sent around many many times, which results in literally tens of mappings in the Cap space. I don't know a good solution to this yet, but I wanted to inform you that there might be a problem.
I would expect that, as literally any object in the early bootstrap stages is implemented in core (sessions, dataspaces, ...) and referenced by a capability. So init and its children hold dozens of caps to the server activation in core.
Maybe I did not get what you meant and ask you to elaborate a bit more on the issue then.
Greets