Commit Graph

177 Commits

Author SHA1 Message Date
Bahadir Balban
5b783f4e2e Update to manual pages.
Introduced an ENOMAP error code for l4_unmap.
2009-12-04 00:30:25 +02:00
Bahadir Balban
2c93de65bf Removed 2 arguments from l4_capability_control
l4_capability_control works well for almost all system calls
using a buffer pointer to the capability that it operates on.

Only for sharing/granting of capability lists, it is yet to be
decided how to provide a grant target id.
2009-12-02 16:47:05 +02:00
Bahadir Balban
ae16df6307 Removed CAP_SHARE_ALL and CAP_GRANT_ALL flags. Currently not used.
The API for sharing and granting of all capabilities has not
settled yet, therefore removed.
2009-12-02 16:27:42 +02:00
Bahadir Balban
d210678085 Removed irq notification slots. - To be revised with a better implementation 2009-12-02 16:03:09 +02:00
Bahadir Balban
c9fc6d9341 Reorganized a few header file comments 2009-12-02 15:31:02 +02:00
Bahadir Balban
52775d0d2f Added means to add correct irq values to capabilities 2009-12-02 00:05:10 +02:00
Bahadir Balban
346d79c0cd Changes to platform device handling, irqs, userspace device configuration
Revised irq handling and device address naming on internal devices.
2009-11-29 18:11:08 +02:00
Bahadir Balban
2d4e64f795 Merge branch 'rebase' of git://www.b-labs.co.uk/~amit/codezero into amit-devel 2009-11-29 12:37:08 +02:00
Bahadir Balban
307b52f6d2 Added api/irq.h 2009-11-29 12:36:43 +02:00
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
b48f817bd8 Timer Code 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
b5e6c66426 UTCB update
Added 8 notify slots of 1 byte each. These will be notification
slots for irqs and other threads.

Also now userspace refers to kernel's utcb definition, so they're
in sync.
2009-11-24 14:45:43 +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
1f32e0ce0e Removed comments for fixed issues 2009-11-23 13:32:07 +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
19b4c6c4c1 Moved capability struct to api/capability.h for userspace coherence
Userspace often breaks as we change the capability structure. Now
structure is under api/ so userspace can also update with changes.
2009-11-22 15:08:29 +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
5bff5b5fbf Reduced maximum number of pagers to 1, and boot-time capabilities to 16
Each container was taking up more than 3KB of space at boot-time structures
This was due to having 4 pagers and 32 boot-time capabilities for each. This
caused the boot-time kernel size to vary a lot with capabilities. The new
numbers are optimum.

Particularly we always have a single pager per container, even though the
array structures allow more. Single pager makes container-wide privileges
and management simpler.
2009-11-21 12:31:03 +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
b50c3f6f2b Half-way through prepare_capability() 2009-11-16 18:51:36 +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
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
f912f28731 Clarified a few confusing definitions in ipc.c 2009-11-09 22:59:24 +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
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
dc03c7b130 Implemented a protocol between client and pager for requesting caps.
In posix, test0 makes inter-space ipc for testing extended ipc. This
correctly fails when only the cap to ipc to pager is given to all tasks
in the container.

In order to overcome this problem, the tasks who fork for doing ipc to
each other make a request to the pager to get capabilities to do so.

Pager finds its own widened ipc capability over the container, replicates
it, validates and reduces it to desired boundaries (i.e. just ipc betw.
two spaces) and grants it as IMMUTABLE to requesting tasks.

This protocol may be useful in implementing a client/server capability
request relationship. Code builds but untested.
2009-11-08 14:15:33 +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
f7565118f1 Revert "Merge branch 'libl4thread' of git://www.b-labs.co.uk/bora/git/codezero into bora"
This reverts commit 3f870b540f.
2009-11-05 19:17:36 +02:00
Bahadir Balban
3f870b540f Merge branch 'libl4thread' of git://www.b-labs.co.uk/bora/git/codezero into bora 2009-11-05 14:59:59 +02:00
Bora Sahin
8585482bd0 THREAD_RESUME is an alias to THREAD_RUN. 2009-11-05 13:48:58 +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
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
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
3be4cbc45c Tested compilation of various platforms. 2009-11-03 12:10:16 +05:30