Commit Graph
269 Commits
Author SHA1 Message Date
Amit Mahajan 16b984510f PBA8 platform removed 2009-11-29 11:50:02 +05:30
Amit Mahajan bc4a233adb Removed AB926 platform 2009-11-29 11:50:02 +05:30
Amit Mahajan 0707376a54 Added start/end/size attributes for devices in caps.py instead of
resource.c
2009-11-29 11:50:02 +05:30
Amit Mahajan 88da7c2f36 Timer devices removed, based on PAGE granularity mappings. 2009-11-29 11:45:48 +05:30
Amit Mahajan 1080c9e122 Issues due to capability uattr updation resolved 2009-11-29 11:45:48 +05:30
Amit Mahajan b48f817bd8 Timer Code tested 2009-11-29 11:45:48 +05:30
Amit Mahajan d18751fbe8 UART service tested. 2009-11-29 11:45:48 +05:30
Amit Mahajan b53cc73747 Testing Inter container IPC for UART service 2009-11-29 11:45:47 +05:30
Bahadir Balban 6e40a2b601 Preliminary irq registration call + irq capability checking
Need to add irqctrl capabilities and irq bits to device memory
caps.

Also need to initialize irq field of devmem caps.
2009-11-28 19:13:23 +02:00
Bahadir Balban e0c40ece5d Added a new irq_control system call
This is currently an empty call. It will be used for registering,
receiving and releasing irqs.
2009-11-23 16:46:51 +02:00
Bahadir Balban b994083e27 Added a new uattr word to capabilities.
The new word is for irq numbers.
2009-11-23 14:37:37 +02:00
Bahadir Balban e28e54fa7b Removed issue comments that are now fixed. 2009-11-23 12:56:19 +02:00
Bahadir Balban 1e8c0f1d3a Added ipc tags for uart service. Set size field for kernel-managed devices 2009-11-22 23:41:19 +02:00
Bahadir Balban 877b2cedc7 Integrated libl4thread with libl4. Added device number to device caps.
A 16-bit device number or id further distinguishes a device on the
system in addition to the device type. This is meant to be used for
the very first identification of the device for further probing. Any
further info is available by userspace mapping and probing.
2009-11-22 21:34:18 +02:00
Bahadir Balban f3f581f2e7 Empty containers working as normal with device changes/cleanups 2009-11-22 14:42:49 +02:00
Bahadir Balban f1efee2475 Compiles with new changes but not still in progress 2009-11-22 00:17:58 +02:00
Bahadir Balban a3cfa2ac9b Added a device attribute to capabilities - In progress
Followed the kernel physical memory reservation convention
with devices. Devices that are possessable by userspace
are created as boot-time capabilities and placed under the kernel
resources devmem_free capability list. Any userspace container
that is defined with the possession of the device would delete the
device capability making it unavailable to further requests.
2009-11-21 23:45:58 +02:00
Bahadir Balban d826de2eea Initial work to introduce device types and device capabilities 2009-11-21 15:00:42 +02:00
Bahadir Balban caa7ac0764 Put cinfo array into initdata section. Added more precision in bootmem
cinfo array is now freed along with other init memory.
bootmem allocator memory is reduced to be completely used up.
free boot memory now prints the used free memory as well.
2009-11-21 13:35:53 +02:00
Bahadir Balban a13120c073 Added proper checking of capability overlap for memcap_unmap 2009-11-21 12:01:41 +02:00
Bahadir Balban bf8d95985f Style cleanup 2009-11-21 11:08:07 +02:00
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 b9b48795ee Fixed missing memory capability target field setup 2009-11-18 11:03:47 +02:00
Bahadir Balban 89093b8ace Inter-container ipc tests working. 2009-11-17 23:34:37 +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
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
Amit Mahajan d8f480fd1b Compilation errors resolved for 2009Q3 toolchains. 2009-11-11 02:02:27 +05:30
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
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 78917835c7 Substantially fixed cap_split() behaviour.
Need to fix ipc flags capability checking yet.
2009-11-09 19:15: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
Bahadir Balban 1bb2c05c9b Added routines for pager to search a suitable capability to grant to clients
Pager handles client capability requests by using one of its own
capabilities to create a new one that suits the client's needs.

The current issue is that the kernel can have multiple caps and it
may not know which one is suitable for using to create one for the client.

The kernel knows this very well, so the solution would be to attempt to
use capabilities that roughly match (i.e. by type) and leave it to
the kernel to decide whether it is any powerful to suit client's needs.
2009-11-08 17:54:57 +02:00
Bahadir Balban b136b79a2d Capability replicate/deduce/share tested with mm0. 2009-11-07 23:45:57 +02:00
Bahadir Balban e8f002f879 Fixed most of userspace (mm0) for capability manipulation 2009-11-07 19:43:05 +02:00
Bahadir Balban 3728e7ef1e Capability manipulation syscalls
Support for capability replicate, share, grant, deduce, and split.
The code builds, but hasn't been tested.
2009-11-07 15:29:52 +02:00
Bahadir Balban 425193efa9 Added a flag to read registers back for sys_exregs call 2009-11-05 11:27:29 +02:00
Bahadir Balban d9520adb55 Added means to search for threads in other containers
Thread ids now contain their container ids in the top 2 nibbles.
Threads on other containers can be addressed by changing those
two nibbles. The addressing of inter-container threads are
subject to capabilities.
2009-11-04 20:56:57 +02:00
Bahadir Balban 516efccd99 Merge branch 'master' into devel 2009-11-04 17:19:18 +02:00
Bahadir Balban aeef546544 Changed l4id_t type to unsigned integer. Expanded task_ids to have cid
Task ids are now unsigned as the container ids will need to be encoded
in the id fields as well.

For requests who require even more comprehensive id input, (such as
thread creation) also added is the container id so that threads
_could_ potentially be created in other containers as well.
2009-11-04 16:39:04 +02:00
Bahadir Balban db57c598b0 Merged MAP and VIRTMEM/PHYSMEM capabilities into one.
VIRTMEM and PHYSMEM are theoretically separate resources to be
protected than a MAP resource, which is meant to protect the syscall
privileges.

In practice MAP is always used together with a VIRTMEM and a PHYSMEM
resource, therefore reach VIRTMEM/PHYSMEM resource is now merged with
the MAP capability, combining the micro-permission bits.
2009-11-04 15:26:47 +02:00
Bahadir Balban 69ac6d67f0 Updated test example cml. Also update to various comments 2009-11-03 16:04:43 +02:00
Bahadir Balban b7e575817d Merged setup of internal memory caps and container creation
The two had common data in their initialization so it only made
sense to merge the two.
2009-11-03 15:26:59 +02:00
Bahadir Balban 9248328dd3 Pager struct allocated from boot memory and never referenced after boot.
We still have to have the pager structs because they possess intermediate
data during boot up such as for transferring of capability lists to
boot stack one-by-one, and then to newly generated ktcbs.
2009-11-03 15:09:28 +02:00
Bahadir Balban 6c69f181db First step in detaching pager struct from tasks 2009-11-03 14:50:22 +02:00
Amit Mahajan 55eb6260c3 Dynamic generation of pager size 2009-11-02 21:31:08 +05:30