Commit Graph

858 Commits

Author SHA1 Message Date
Amit Mahajan
aa0e5cb255 Adding missing config flags for toolchain, libdev, cputype in baremetal
examples.
2009-11-20 12:53:39 +05:30
Amit Mahajan
e2682df71c Bahadir's comments added 2009-11-20 10:35:36 +05:30
Amit Mahajan
e2c2f1f2b1 Building baremetal containers in build directory 2009-11-20 00:19:51 +05:30
Amit Mahajan
8a7b9dbcdf Integrated Test Container inside Baremetal container. 2009-11-20 00:06:03 +05:30
Amit Mahajan
352d75f66c Name of example container changed to Baremetal 2009-11-19 23:26:00 +05:30
Amit Mahajan
1384701a53 Corrected value assignment error in stack_used variable 2009-11-19 21:32:16 +05:30
Amit Mahajan
f5faa71e89 Libdev added in example0 2009-11-19 21:27:49 +05:30
Amit Mahajan
9bd5bd889f Prevent recompilation of libdev 2009-11-19 21:18:33 +05:30
Bahadir Balban
3f1045d66e Merge branch 'master' of git://www.b-labs.co.uk/bora/git/codezero into bora
Conflicts:
	config/cml/container_ruleset.template
	config/configuration.py
	conts/examples/example1/SConstruct
	conts/libl4thread/include/l4thread/thread.h
2009-11-19 14:41:07 +02:00
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
Bora Sahin
496fba81c8 A shared space multi-threaded example application presenting the use of the
thread library. It also exemplifies how a new sample application can be added.
2009-11-17 21:48:46 +02:00
Bora Sahin
9a8e1fa437 A few things needed in the destroy code paths of a thread are added.
The first one is related to resource recycling. The parent which is waiting its
child to exit did not delete its ktcb. Now, it deletes.

The second one is related to self destroy. The added code wakes up all the
waiters before it exits.
2009-11-17 21:20:09 +02:00
Bora Sahin
b2a2340594 Clean dcache CP0 instruction is corrected. Possibly it was caused by a typo. 2009-11-17 20:44:42 +02:00
Bora Sahin
7387d336cc Thread waiting is fixed.
In the former case, when a child was exiting there was a risk of being preempted while it
was also taken away from the runqueue. In this situatuion, it may not have had
the chance of waking up the parent in case if it waits for the child to exit.

This was also true for suspend & resume so they were patched also.
2009-11-17 18:13:32 +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
Bora Sahin
a5eede8fb9 The very same fix we applied to the thread library but for posix this time. 2009-11-17 12:05:56 +02:00
Bora Sahin
682c62f8bb A fix and a helper macro for the thread library.
The fix solves the problem of giving the last slice from a pool.

The helper macro makes utcb space creation easy for the user because we have to
consider a few things like alignment and total allocated space.
2009-11-16 21:49:37 +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
Bora Sahin
7fb923cd35 A workaround for an unmatched locker-unlocker mutex problem.
If sleepers on a mutex were more than one, only one of them was woken up. This
caused the other ones to sleep forever. Now, there is not any facility to check
if there are still sleepers on the kernel space when a thread is about to unlock
a mutex. To workaround this problem, we started waking up all the threads
instead of one. This brings another problem called thundering herd but also
provides random fairness which gives more oppurtunity to a higher priority
thread to get the lock.
2009-11-16 19:06:45 +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
58959d5fb0 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:37:22 +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
Bora Sahin
9763296ddc 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-13 15:22:06 +02:00
Bora Sahin
c8a55f8834 Stack recycling is added to the thread library.
Still, it does not support thread trees which have more than one level depth.
2009-11-13 15:21:53 +02:00
Bora Sahin
344362e9da 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-13 15:21:41 +02:00
Bora Sahin
20f2b2bfdb Lots of cosmetic changes to the thread library. 2009-11-13 15:21:28 +02:00
Bora Sahin
1256f1a13a The second step in creating a thread library.
UTCB support has beed added. It has the same drawback as in the stack support:
the area in question has to be already mapped-in.

There are also some minor fixes for the stack support and the utcb common helper
routines.
2009-11-13 15:21:15 +02:00
Bora Sahin
b31ab82437 The first step in creating a thread library.
The difference between this thread library and the existing ones like pthreads
is the necessity of informing the library about the address range of the stack
and the l4 specific utcb. Utcb has not been supported yet. As for stack, there
is also a drawback: library does not support mapping. In other words, the stack
area in question has to be already mapped-in. Thus, for now we only support
threads sharing their address spaces: TC_SHARE_SPACE. In this respect, it is
very similar to pthreads.
2009-11-13 15:20:50 +02:00
Bora Sahin
18a5c89c97 utcb handling helper routines for the thread library.
This is one of the steps we need in the process of providing a similar interface
for thread creation which can be found in the mainstream operating systems like
Linux.
2009-11-13 12:59:27 +02:00
Bora Sahin
00adcd9afa libl4thread skeleton is introduced.
With this library, it is aimed at easing thread manipulation, utcb handling etc.
2009-11-13 12:58:54 +02:00