Commit Graph

830 Commits

Author SHA1 Message Date
Bahadir Balban
b6df4238b7 Merge branch 'libl4thread' of git://www.b-labs.co.uk/bora/git/codezero into bora
Conflicts:
	conts/libl4thread/src/arch-arm/new_thread.S
	conts/libl4thread/src/idpool.c
2009-11-19 11:17:51 +02:00
Bahadir Balban
1d7c2fa451 Removed debug printouts on capability generation 2009-11-18 11:06:22 +02:00
Bahadir Balban
b9b48795ee Fixed missing memory capability target field setup 2009-11-18 11:03:47 +02:00
Bahadir Balban
51a12a507f Error recovery fixes to mm0 and l4_map_helper 2009-11-18 10:55:53 +02:00
Bahadir Balban
452f177ce2 Added umutex as standard capability 2009-11-18 00:25:11 +02:00
Bahadir Balban
89093b8ace Inter-container ipc tests working. 2009-11-17 23:34:37 +02:00
Bahadir Balban
5ebc0bb9ac Removed capinfo target_type field. Same info expressed in rtype field 2009-11-17 13:43:25 +02:00
Bahadir Balban
b933db1e36 Fixed target symbol parsing in pre-typed capabilities
Also renamed CONT to CONTAINER on certain symbols
2009-11-17 12:34:59 +02:00
Bahadir Balban
8856609896 cinfo is compiling with new changes 2009-11-16 21:25:38 +02:00
Bahadir Balban
2eabc22184 Few more minor fixes on cappool and capctrl 2009-11-16 20:38:46 +02:00
Bahadir Balban
93c0d244a4 Removed unnecessary bits 2009-11-16 20:21:12 +02:00
Bahadir Balban
60759689a9 More progress on parsing custom and typed capability symbols 2009-11-16 20:17:55 +02:00
Bahadir Balban
b50c3f6f2b Half-way through prepare_capability() 2009-11-16 18:51:36 +02:00
Bahadir Balban
0c88f96935 Added a CAP_ prefix to all cap symbols for easier processing 2009-11-15 14:07:25 +02:00
Bahadir Balban
8a9d5b8ee5 Added capability control capability to caps configured as standard 2009-11-15 12:39:30 +02:00
Bahadir Balban
7a78483904 Final touches to configure all capabilities
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.
2009-11-15 11:39:13 +02:00
Bahadir Balban
6cd3fe6f0b Fixed few more rules with capabilities 2009-11-14 18:28:31 +02:00
Bahadir Balban
ca4dcae707 Added more rules, increased custom capabilities to 4 2009-11-14 18:18:24 +02:00
Bahadir Balban
235e38865d Fixed target suppression on custom capabilities 2009-11-14 16:40:05 +02:00
Bahadir Balban
24a787019c Added all standard capabilities tctrl, exregs, ipc to configuation
A use field determines whether the default capability is enabled
or disabled.
2009-11-14 16:34:12 +02:00
Bahadir Balban
69ad9d929a Added precise capability targeting
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.
2009-11-14 12:47:26 +02:00
Bahadir Balban
16a652e3d9 Added a not working suppression of capability target choice if cap is not ipc 2009-11-14 11:41:20 +02:00
Bahadir Balban
9c0a2ccc5e Better descriptions for pool capabilities 2009-11-14 11:31:01 +02:00
Bahadir Balban
692aaa33d3 Initial changes in cml template for full capability configuration 2009-11-13 18:17:44 +02:00
Bora Sahin
743034a36b A comprehensive overhaul on the thread library.
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.
2009-11-13 15:35:45 +02:00
Bahadir Balban
317ce0bd29 Minor fixes to container cml template 2009-11-11 23:11:10 +02:00
Bora Sahin
0e6dec0fee Locking is added to the thread library.
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.
2009-11-11 21:33:15 +02:00
Bahadir Balban
0be7b734d3 Amendment to previous commit 2009-11-11 15:56:54 +02:00
Bahadir Balban
bee7fe541f cleaned up posix example cml symbols 2009-11-11 15:54:34 +02:00
Amit Mahajan
d8f480fd1b Compilation errors resolved for 2009Q3 toolchains. 2009-11-11 02:02:27 +05:30
Amit Mahajan
fc43608da9 Error in number of containers corrected 2009-11-11 02:02:26 +05:30
Amit Mahajan
276b6e3fc4 Sanity checking for container memory regions added 2009-11-11 02:02:26 +05:30
Amit Mahajan
1db70a608f Added default values to cml symbols 2009-11-11 02:02:26 +05:30
Amit Mahajan
c44d25b596 Taking UART code out from libc and loader and putting in libdev 2009-11-11 02:02:26 +05:30
Amit Mahajan
272b01d873 Remove CONFIG_ from pager_size symbol 2009-11-11 02:02:26 +05:30
Bahadir Balban
4ab05d1b2a Added forgotten file
new file:   src/capability.c
2009-11-10 22:23:49 +02:00
Bahadir Balban
34a1c581a3 Added forgotten header 2009-11-10 22:21:19 +02:00
Bora Sahin
3149356ffc Stack recycling is added to the thread library.
Still, it does not support thread trees which have more than one level depth.
2009-11-10 21:48:48 +02:00
Bahadir Balban
dc7fd0d24d Merge branch 'libl4thread' of git://www.b-labs.co.uk/bora/git/codezero into bora
Conflicts:
	conts/libl4thread/include/l4thread/addr.h
	conts/libl4thread/include/l4thread/thread.h
	conts/libl4thread/include/l4thread/utcb.h
	conts/libl4thread/src/addr.c
	conts/libl4thread/src/thread.c
	conts/libl4thread/src/utcb.c
2009-11-10 17:38:51 +02:00
Bahadir Balban
d1bd77a135 Removed cap list prints from mm0 2009-11-10 17:22:46 +02:00
Bahadir Balban
2ba4736a8b Cleaned up various bits with capability syscalls.
Made grant interace same as other calls.
Corrected counting and reading of task capabilities by applying it
to all cap lists that a task has right.
2009-11-10 16:15:14 +02:00
Bora Sahin
a23b7fcbc2 Task list is introduced to the thread library.
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.
2009-11-10 14:46:54 +02:00
Bahadir Balban
d43fa1d3ae Simplified cap id finding and destroying it.
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)
2009-11-09 23:50:03 +02:00
Bahadir Balban
ff14ce4735 Added switch statements to some capability checks that are more precise. 2009-11-09 23:10:44 +02:00
Bahadir Balban
f912f28731 Clarified a few confusing definitions in ipc.c 2009-11-09 22:59:24 +02:00
Bahadir Balban
da8b0a90f3 Fixed error with ipc transfer type checking.
Tested test0 mutex ipc successfully rejecting to occur when given
different micro-capabilities than the actual transfer type.
2009-11-09 22:50:21 +02:00
Bahadir Balban
8b12db741f Moved generic ipc flags to api/ipc.h 2009-11-09 22:01:44 +02:00
Bahadir Balban
78917835c7 Substantially fixed cap_split() behaviour.
Need to fix ipc flags capability checking yet.
2009-11-09 19:15:52 +02:00
Bora Sahin
8f55e72f00 Lots of cosmetic changes to the thread library. 2009-11-09 11:44:52 +02:00
Bahadir Balban
b24c8eb89d Capability replicate/split/destroy/grant working for test0 ipc.
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.
2009-11-09 00:40:07 +02:00