Commit Graph

777 Commits

Author SHA1 Message Date
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
e8f9f3f04a Added generic capability operation bits to autogenerated capabilities
cinfo.c generator script now has generic capability operation
bits added to all default capabilities that it generates.
2009-11-07 16:14:14 +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
e28658c10e posix: MM0 task page access issues fixed. 2009-11-05 19:04:19 +02:00
Bahadir Balban
d306d6b451 posix: Fixing mm0 mapping task pages incorrectly
Modifying task_virt_to_page() so that it takes into account page
protections. If mm0 writes to a task page that is meant to be
read-only, (e.g. the zero page) the design is broken.

Every access to a task's page will take the page fault route,
and the page fault handler will return the page instead of 0.
2009-11-05 18:25:26 +02:00
Bahadir Balban
35a5dc4c92 Added userland support for exregs/read, mm0 slightly more graceful for illegal access 2009-11-05 15:56:01 +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
Bahadir Balban
78635bdd11 posix: When mapping a new task, data segment size was miscalculated 2009-11-05 14:10:22 +02:00
Bahadir Balban
74ad567312 Added err value to vma_split 2009-11-05 13:52:39 +02:00
Bora Sahin
55af5c83cb 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 questen has to be already mapped-in. There is some basic
infrastructure for utcb to support mapping but it is far from being complete.
MAPPING_ENABLE symbolic constant controls this behaviour.

There are also some minor fixes for the stack support and the utcb common helper
routines.
2009-11-05 13:51:22 +02:00
Bora Sahin
352cb2daaa 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-05 13:50:48 +02:00
Bora Sahin
8585482bd0 THREAD_RESUME is an alias to THREAD_RUN. 2009-11-05 13:48:58 +02:00
Bahadir Balban
9b71f2bfe2 Fix for mm0 bss mapping of zero pages starting from wrong offset
bss segment may have some of it at the end of data, but the bits
that lie on a new page need to be mmaped as anonymous. When this
occured we were not passing the new page boundary but the last
data page where bss started
2009-11-05 13:43:38 +02:00
Bora Sahin
ede050ad37 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-05 12:39:29 +02:00
Bora Sahin
4bfd339db5 libl4thread skeleton is introduced.
With this library, it is aimed at easing thread manipulation, utcb handling etc.
2009-11-05 12:37:19 +02:00
Bora Sahin
1f7711fa2a Automatic pager size calculation takes container name into account instead of
a fixed one.
2009-11-05 12:23:01 +02:00
Bora Sahin
050f537884 Bare container type is converted to Examples container type.
Examples container type is designed to keep applications using codezero
userspace libraries, which is aiming to help newcomers who would like to
develop programs on top of the l4 microkernel.

Now bare bone application is one of the examples. In the near future, lots of
new programs will be introduced to show the various aspects of codezero
eco-system.
2009-11-05 12:17:37 +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
fd04e9d460 Added helper to extract raw thread id from fully qualified thread id
Currently, the tid returned from kernel contains container id as
well, which makes it sufficient to do inter-container syscalls without
any preparation.

The helpers added are for presentation purposes only. Container id
is deleted so that the raw thread id is available for printing or
similar.
2009-11-05 01:47:04 +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
Bahadir Balban
00a9f2e3c9 Linux example file with no MAPSIZE parameter 2009-11-03 13:38:55 +02:00
Bahadir Balban
606fe7f369 toolchain option is made clearer in cml menu 2009-11-03 11:54:36 +02:00
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