dynamic reconfiguration

Matthias Lange matthias.lange at kernkonzept.com
Tue Aug 16 10:02:30 CEST 2016


Hi,

On 08/15/2016 12:47 PM, ba_f wrote:
> Am 2016-08-11 09:07, schrieb Matthias Lange:
>>> If I got it right, any Task can create an IPC-Gate at run-time and
>>> thus create child tasks with ipc-server or ipc-client capabilities,
>>> don't they?
>>
>> That depends on the task's factory but the general answer is yes.
>>
>> Matthias.
> 
> 
> Hello,
> 
> 
> do you have a reference design for this?
> So maybe one 'parent' Task creating two 'childs' and establishes an IPC
> between them.

I am afraid that there is no such reference example. I would recommend
looking into ned's implementation (look for __alloc(lua_State *l) in
lua_factory.cc and exec(lua_State *l) in lua_exec.cc as starting points).

Basically, here is what you have to do (I leave the loading and setup of
the child program out):

- create new task
- create new thread
- create new IPC gate (needs to be done only once)
- map thread capability into new task
- map initial caps and IPC gate cap into new task
- setup pager and exception handler of the new task
- start the new thread

For some inspiration you can look at
libloader/include/remote_app_model::start_prog(). For ELF loading and
setup of the l4re kernel you should also consider using libloader's
infrastructure.

Matthias.

> 
> 
> 
> Have a nice day,
> 
> ba_f



More information about the l4-hackers mailing list