Standard capabilities are provided. They can be optionally disabled.
Also 4 custom capabilities are provided. They can be optionally
enabled and configured to different types/targets. Particularly
inter-container ipc will be done by these capabilities.
IPC capability targets current container, current pager's space,
another container, or another container's pager.
Any other capability (e.g. thread_control) targets current container
or pager's space.
Lots of polishing, organizational changes, bug fixes, error handling etc. are
introduced.
COPY and NEW space thread creation are allowed but not thoroughly tested yet. It
seems they will work best if the lib supports utcb virtual range management
through the mapping.
Now, we support thread trees which are spanning more than one level depth. Any
thread can create any number of threads provided that they are under the limits
which are enforced by the kernel.
Also with this commit, we have almost finished supporting SHARED space thread
creation in which stack and utcb space are allocated statically.
In order to do resource recycling we need a table structure. In the search of
one, we concluded that a task list will make things easier when we start adding
COPY and NEW space handling.
This commit is for utcb recycling. Now, it does not support thread trees more
than one level depth. Thus, to be able to test it, we preferred l4thread_destroy
instead of l4thread_exit.
It is not very straightforward to reach a capabilities list. We
now use a single function to find out a capability by its id and
its list, since the two are used frequently together (i.e. cap
removal and destruction)
Implemented a protocol between a client and its pager to
request and get a capability to ipc to another client of the pager.
Pager first ensures the request is valid from its client.
It then tries to use a greater capability that it possesses, to
produce a new capability that the client requested. Once the kernel
validates the correct one and replicates/reduces it to client's
need, it grants it to the client.