Commit Graph

746 Commits

Author SHA1 Message Date
Bahadir Balban
a303445cf7 cml examples updated to have no PAGER_SIZE parameter 2009-11-03 11:32:37 +02:00
Bahadir Balban
390358f8a3 configure.py shuts down gracefully if configfile is not saved 2009-11-03 11:04:30 +02:00
Amit Mahajan
966ef7714e Added pager size calculation for test container. 2009-11-03 13:05:05 +05:30
Amit Mahajan
3be4cbc45c Tested compilation of various platforms. 2009-11-03 12:10:16 +05:30
Amit Mahajan
6e898151bc configuration_retrieve pending work done 2009-11-03 11:13:51 +05:30
Amit Mahajan
03b2751377 Asking user for type of toolchain to be used 2009-11-03 03:02:27 +05:30
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
55eb6260c3 Dynamic generation of pager size 2009-11-02 21:31:08 +05:30
Amit Mahajan
8d9f5f82d0 Patch for comments by bahadir 2009-11-02 21:31:07 +05:30
Amit Mahajan
52d346af40 Added function to extract cputype, this function was earlier rewritten
in build_linux
2009-11-02 21:31:07 +05:30
Amit Mahajan
f337257e4e Corrected the problem of wrong values in printascii.S 2009-11-02 21:31:07 +05:30
Amit Mahajan
9463d1f241 Changed the name of PAGER_SIZE symbol to PAGER_MAPSIZE, to keep in
harmony with linux symbol name
2009-11-02 21:29:55 +05:30
Amit Mahajan
d41cac75d1 Added offsets for MPCORE, EB and CORTEX-A8 2009-11-02 21:29:55 +05:30
Amit Mahajan
e120e7c552 Selecting UART0 base address based on platform selected 2009-11-02 21:29:55 +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
532b65fbd9 Added dependency on config.h, for src/ folders 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
Amit Mahajan
2b29170633 Added the default parameters needed by arm linux 2009-11-02 21:15:40 +05:30
Amit Mahajan
e9dba944e6 Pl011 uart driver made generic 2009-11-02 21:15:40 +05:30
Amit Mahajan
8a586860b3 Cleaned the timer driver to make it generic. 2009-11-02 21:15:40 +05:30
Amit Mahajan
24cbc8d441 Removed Driver Menu from main screen and made driver symbols derived 2009-11-02 21:15:40 +05:30
Amit Mahajan
dc57472538 Correcting the symbol pattern for finding start/end of various physical
regions in use by various containers
2009-11-02 21:15:40 +05:30
Bahadir Balban
5992b6435c Added a forgotten unlock on an error condition 2009-11-01 15:22:36 +02:00
Bahadir Balban
83a740f597 A better locking scheme for address spaces.
Same shall be done for the tcb list.
2009-11-01 14:32:55 +02:00
Bahadir Balban
003976e99e Comment formatting 2009-11-01 01:36:03 +02:00
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
850c645d77 Exiting tasks use EXITING signal and change states to TASK_DEAD 2009-10-31 23:13:19 +02:00
Bahadir Balban
5ed93b6563 Thread exiting
Pagers kill all children but suspend themselves.
Currently not straightforward for a pager to delete its own tcb and quit.
It should take all allocator locks without sleeping, remove itself from
scheduler queue and then delete itself and quit. This is not so easy now
as some allocation locks are mutexes. (Address space lock, ktcb/space
allocators etc.)

An easier approach would be to have a kernel thread or a superior thread
that would delete the pager
2009-10-31 22:46:29 +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
Bahadir Balban
53589ada01 Amendments to scheduler timeslice management 2009-10-31 15:25:29 +02:00
Bora Sahin
2571dabc18 Fixes to the scheduler timeslice management.
One is related to the time distribution when a new child is created.
If the parent has one tick left, then both child and parent received
zero tick. When combined with
	current_irq_nest_count = 1
	voluntary_preempt = 0
values, this caused the scheduler from being invoked.

Second is related to the overall time distribution. When a thread
runs out of time, its new time slice is calculated by the below
formula:
	new_timeslice = (thread_prio * SCHED_TICKS) / total_prio
If we consider total_prio is equal to the sum of the priorities of
all the threads in the system, it imposes a problem of getting
zero tick. In the new scenario, total_prio is equal to the priority
types in the system so it is fixed. Every thread gets a timeslice
in proportion of their priorities. Thus, there is no risk of taking
zero tick.
2009-10-31 15:08:53 +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
c3c6c10cf7 Reimplemented kill/suspend
It seems to work fine except an undefined instruction is generated
from posix userspace occasionally
2009-10-30 21:34:10 +02:00
Bahadir Balban
f3c0a38fa9 Some not-very-well working progress on grouply exit.
Going to start from scratch.
2009-10-30 19:52:52 +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