Commit Graph

116 Commits

Author SHA1 Message Date
Amit Mahajan
2b1adb059d Pager Mapsize updated in cinfo template only instead of cinfo.c 2009-11-03 01:34:51 +05:30
Amit Mahajan
a41a8e0d93 Some cleanup in uart fixes. 2009-11-02 21:52:33 +05:30
Amit Mahajan
8d9f5f82d0 Patch for comments by bahadir 2009-11-02 21:31:07 +05:30
Amit Mahajan
a81574b899 Cleaning loader libc and uart 2009-11-02 21:29:55 +05:30
Amit Mahajan
b8829118e0 Cleaned the libc uart driver 2009-11-02 21:29:55 +05:30
Amit Mahajan
5b3d11ed55 Removed Unnecessary files from libc 2009-11-02 21:29:55 +05:30
Amit Mahajan
91c617d0b2 Removed hard coded values of toolchain and gcc cpu flags 2009-11-02 21:29:54 +05:30
Bahadir Balban
5fd0f12017 Added handling of task pending events from scheduler.
Previously all pending events were handled on return of exceptions
in process context. This was causing threads that run in userspace
and take no exceptions not handle their pending events indefinitely.
Now scheduler handles them in irq context as well.
2009-11-01 01:03:17 +02:00
Bahadir Balban
0f537ea1f5 Wait on working.
Multi-threaded apps can now wait on children to destroy.
WAIT_ON is useful when a child exists with an exit code and the pager
of the child does not want to take the hassle of destorying it via an
ipc. It provides an alternative method of synchronous thread destruction,
where the child destroys itself directly rather than the parent issuing
a destroy on it explicitly.
2009-10-31 23:28:54 +02:00
Bahadir Balban
c763679aaa Fixed a nasty spinlock issue with wake_up_all that didn't get caught. 2009-10-31 20:47:20 +02:00
Bahadir Balban
638df9e238 Simultaneous exit/thread_destroy working
Reiterating again to simplify:

Working:
 - Pager issues destroy, client also issues exit
   they work in sync.

Missing
 - Pager killing itself
 - Pager killing all children while killing itself
 - Pager waiting on children
2009-10-31 18:45:22 +02:00
Bahadir Balban
09197d1fb1 Removed THREAD_WAIT call completely.
Simply reverse this patch to add THREAD_WAIT
2009-10-31 17:12:03 +02:00
Bahadir Balban
dd5e05380c Typo fix 2009-10-31 16:39:13 +02:00
Bora Sahin
90cfaca7a2 libmem/lib{mm,mc,malloc} are added to the libraries of bare containers
againist which they are linked.
(cherry picked from commit 9d90ee4c57f07dbbe984251023fc3fa684dd492c)
2009-10-31 14:31:32 +02:00
Bora Sahin
38cf7bc175 POSIX now uses libmem/malloc instead of the built-in one.
(cherry picked from commit 48adbffa6514755385af842f1fe8ca5068229eea)
2009-10-31 14:31:13 +02:00
Bora Sahin
2c53feedb1 malloc is carried from POSIX to libmem/malloc.
This malloc is a very simple first-fit sort of allocator. Now, it builds
without any problem but because we havent fixed include paths and added
it to the referenced libraries in the posix container yet, POSIX doesnt
build. So take it with caution.
(cherry picked from commit 65523743e86268eddd3bd2aab58476003f71c2c2)
2009-10-31 14:28:40 +02:00
Bahadir Balban
5c93d9b8ba Added thread_wait
modified:   conts/test/main.c
	modified:   scripts/kernel/generate_kernel_cinfo.py
	modified:   src/api/thread.c
	modified:   src/generic/capability.c
2009-10-31 01:44:32 +02:00
Bahadir Balban
2839f46245 Cleanup on previous commits 2009-10-30 21:59:46 +02:00
Bahadir Balban
ee7621b2df Some more progress with debugging pager exits 2009-10-30 18:28:45 +02:00
Bahadir Balban
18ffa0b4d1 Added a TASK_CAP_LIST macro that abstracts away the primary cap list
We moved initial list of a pager's caps from ktcb to task's space
since the task is expected to trust its space.

Most references to task->cap_list had to change. Although a single
cap list only tells part of the story about the task's caps, the
TASK_CAP_LIST macro works for us to get the first private set of
caps that a task has.
2009-10-30 13:46:47 +02:00
Bahadir Balban
118fc795d9 Added wakeup call during exit in case pager was trying to suspend us. 2009-10-30 12:45:31 +02:00
Bahadir Balban
26aa62d2ea Added different paths of exiting for pager and its children.
Created a task_dead list on pager for children to move to when
they exit.
2009-10-30 12:00:05 +02:00
Bahadir Balban
a6c61e05b9 l4_exit() works with a reasonable sched_die_sync()
Next: Killing other tasks more cleanly, and waiting on children
2009-10-29 22:44:58 +02:00
Bahadir Balban
73a27f2269 Modifications for exit/wait on test container 2009-10-27 20:22:42 +02:00
Bahadir Balban
bc91edba76 Few minor userspace polishes on caps for kernel changes 2009-10-27 18:39:09 +02:00
Bahadir Balban
5840d6d696 Capability-enabled kernel running 2_posix test OK. 2009-10-27 15:59:07 +02:00
Bahadir Balban
d1f25763ac Added a conceptual multithreaded app with no capability enforcement.
It is important to be able to create environments with not much
involvement with capability management. This is to increase usability
of the system and provide the option of having simpler api with
less security-oriented applications.
2009-10-26 14:08:41 +02:00
Bahadir Balban
5ecef40312 Added a conceptual prototype of a capability sharing example. 2009-10-26 13:34:34 +02:00
Bahadir Balban
83ce4280b0 Some capability checking progress 2009-10-24 18:44:47 +03:00
Bahadir Balban
4a24e02151 Reorganized test container sources 2009-10-23 16:41:30 +03:00
Bahadir Balban
6093214981 Added sharing of pager capabilities with children or siblings
Pagers can now share their own private capabilities with their
paged children, or their siblings with whom they have a common pager
ancestor.

Added flags CAP_SHARE_CHILD and CAP_SHARE_SIBLINGS for that.
2009-10-23 13:50:32 +03:00
Bahadir Balban
8cabfa3e37 Capability sharing test added.
Pagers by default do not share their capabilities with their children.

By using one of CAP_SHARE_SPACE, CAP_SHARE_GROUP or CAP_SHARE_CONTAINER
a pager may now share its capabilities with a collection of threads.
2009-10-23 12:30:30 +03:00
Bora Sahin
4bdbe42850 Linker script is removed from the bare container template.
This is unnecessary because it is autogenerated.
(cherry picked from commit 36e3982b5c769090df00964651f4127ed7c34bd8)
2009-10-23 03:03:57 +03:00
Bora Sahin
2a47e425c4 Test container type is added.
Test container is planned to test codezero microkernel extensively.
With these changes, everything is there to develop a full-featured test suite.
It also exemplifies how a new container type can be added to the system.
(cherry picked from commit f21fa53df421bfc8eeeaa096c89b98beed436c60)
2009-10-23 03:03:14 +03:00
Bahadir Balban
0f9ea9674c Progress on capabilities
Capabilities will be shared among collection of threads. A pager
will have a right to share its own capabilities with its space,
its thread group and its container.

Currently sharing is possible with only all of the caps. Next,
it will be support for cap splitting, granting, and partial sharing
and granting.
2009-10-22 14:04:25 +03:00
Bahadir Balban
cc2d740900 Neater thread creation flags. 2009-10-21 16:58:10 +03:00
Bahadir Balban
b78859503e Fixed anomaly on memory initialization on mm0.
By this commit, two copies of posix containers can be run!
2009-10-19 22:22:23 +03:00
Bahadir Balban
3660ba9528 Some more minor fixes. 2009-10-19 20:21:23 +03:00
Bahadir Balban
655e135300 Removed zombie test and any verbose printks 2009-10-19 19:45:04 +03:00
Bahadir Balban
9177166817 Managed to self-destruct pager.
Issues:
- A page-faulting thread suspends if receives -1 from pager page fault ipc.
  This is fine if pager is about to delete the thread, but it is not if
  it is a buggy pager.
- Need to find a way to completely get rid of suspended pager.
- A method of deleting suspended tasks could remedy both cases above.
2009-10-19 00:33:10 +03:00
Bahadir Balban
c3b0399485 Debug commit to be removed 2009-10-18 18:53:31 +03:00
Bahadir Balban
a3a90530df Fixed a few minor issues. 2009-10-18 16:16:32 +03:00
Bahadir Balban
2bd3266498 Removed bits from kernel where pager utcb is set.
Pagers now set their own utcb explicitly via exchange_registers.
exregs accepts calls from active pagers for this purpose only.
2009-10-18 15:01:38 +03:00
Bahadir Balban
7ba7a2e796 Added a simplified ascii_to_int() implementation.
Removed dependency on hard-coded pager id. Pager id is now passed
as an environment string `pagerid' to tasks. Alternatively, this
could take space in the utcb of each task.
2009-10-17 18:48:30 +03:00
Bahadir Balban
d19c5c26fd Removed hard-coded area definitions from kernel 2009-10-17 13:42:49 +03:00
Bahadir Balban
fc95d95454 Made necessary changes to make test0 link at an adjustable address 2009-10-17 13:24:26 +03:00
Bahadir Balban
e28e2f486a Changed all pager hardcoded value assumptions, too.
Not tested.
2009-10-15 20:43:19 +03:00
Bahadir Balban
e9afbbaad9 Replaced all hard-coded values for UTCB, SHM, TASK region assumptions.
Not tested.
Not replaced pager run-area values.
2009-10-15 20:35:41 +03:00
Bahadir Balban
6982e96d1f Some cleanups on last commit 2009-10-15 20:24:01 +03:00
Bahadir Balban
381405ee8e Incorporated means to specify shared memory, task address space and utcb regions to posix container 2009-10-15 20:10:08 +03:00