Bahadir Balban 617d24b4f0 Modified task initialisation so that stack now comes beneath the environment
Environment is backed by a special per-task file maintained by mm0 for each task.
This file is filled in by the env pager, by simple copying of env data into the
faulty page upon a fault. UTCB and all anon regions (stack) could use the same
scheme.

Fixed IS_ERR(x) to accept negative values that are above -1000 for errors. This
protects against false positives for pointers such as 0xE0000000.

	modified:   include/l4/generic/scheduler.h
	modified:   include/l4/macros.h
	modified:   src/arch/arm/exception.c
	modified:   tasks/fs0/include/linker.lds
	modified:   tasks/libl4/src/init.c
	modified:   tasks/libposix/shm.c
	new file:   tasks/mm0/include/env.h
	modified:   tasks/mm0/include/file.h
	new file:   tasks/mm0/include/lib/addr.h
	deleted:    tasks/mm0/include/lib/vaddr.h
	modified:   tasks/mm0/include/task.h
	new file:   tasks/mm0/include/utcb.h
	new file:   tasks/mm0/src/env.c
	modified:   tasks/mm0/src/fault.c
	modified:   tasks/mm0/src/file.c
	modified:   tasks/mm0/src/init.c
	new file:   tasks/mm0/src/lib/addr.c
	modified:   tasks/mm0/src/lib/idpool.c
	deleted:    tasks/mm0/src/lib/vaddr.c
	modified:   tasks/mm0/src/mmap.c
	modified:   tasks/mm0/src/shm.c
	modified:   tasks/mm0/src/task.c
	new file:   tasks/mm0/src/utcb.c
	modified:   tasks/test0/include/linker.lds
2008-02-29 01:43:56 +00:00
2008-01-13 13:53:52 +00:00
2008-01-13 13:53:52 +00:00
2008-01-13 13:53:52 +00:00
2008-01-13 13:53:52 +00:00
2008-02-27 01:24:02 +00:00
2008-01-13 13:53:52 +00:00
2008-01-13 13:53:52 +00:00

		Codezero Microkernel 'Toy' release

		Copyright (C) 2007 Bahadir Balban


What is Codezero?

Codezero is a small microkernel based on the L4 microkernel principles and has
its own interpretation of the L4 microkernel API. In addition, it has server
tasks that implement memory management, a virtual filesystem layer, and these
servers currently support a small but essential subset of the POSIX API.

Codezero project is an effort to implement a modern, open source operating
system based on the latest technology in microkernel and OS design. It targets
realtime, high-end embedded systems and has an emphasis on the ARM architecture.

It is quite common to see open source projects developed in a closed-doors
fashion. Codezero project goes beyond just publishing source code as open source
but also uses the latest open source development practices such as those used by
the Linux Kernel.


Why the name Codezero?

The project focuses on simplicity, elegance, cleanliness, which are important
assets in software engineering. The philosophy is to implement a structurally
complete system with most modern OS features while retaining simplicity in the
implementation as much as possible. This objective also fits well with embedded
platforms, which usually have rigorous memory and performance requirements. Also
the project is written from scratch, so the name emphasises that.


Design & Features:

Based on L4 microkernel principles, there are only a few system calls in
Codezero. These system calls provide purely mechanism; threads and address
spaces, and the methods of inter-process communication between them. Anything
beyond these are policy and they are implemented in the userspace. Due to this
rigorously simple design the same microkernel can be used to design completely
different operating systems.

In terms of other features, the microkernel is preemptive, and smp-ready.
Currently only synchronous communication is implemented, but this will change in
the near future.

MM0 is the system task that implements memory management. It contains memory and
page allocators. It implements demand paging by managing page faults, physical
pages and their file/task associations. It provides the default paging mechanism
on Codezero.

FS0 is the system task that implements a simple, modern virtual filesystem layer.
It is designed to serve file requests from MM0. Since it abstracts the low-level
filesystem details, it is a relatively easy job to port a new filesystem to be
used under FS0.

MM0 and FS0 both reside in the userspace, and they are not mandatory services.
For example the virtual and physical memory resources can be partitioned by
Codezero among pagers, and a third-party pager can override Codezero's MM0
pager on the same run-time, and implement an independent paging behaviour
for its own memory partition. This feature provides the option of having an
adjustable mixture of generalisation and specialisation of system services at
the same run-time, by using a combination of Codezero's abstract posix-like
page/file management services and an application-specific pager that depends on
its own paging abilities. For example a critical task could both use posix-like
files benefiting from the abstraction and simplification that it brings, but at
the same time rely on its own page-fault handling for its critical data so that
even though it handles its memory in a specialised way, it does not depend on
another pager's grace for correct, stable operation.


License:

The current 'Toy' release is distributed under GNU General Public License
Version 3 and this version only. Any next version will be released in the same
license, but there are intentions to keep the project in a dual-licensed manner.
In any case, the project source code will always be released as open source with
copyleft clauses.

The third party source code under the directories loader/ tools/ libs/c libs/elf
have their own copyright and licenses, separate from this project. All third
party source code is open source in the OSI definition. Please check these
directories for their respective licenses.


Why yet another POSIX microkernel?

There are many open source POSIX operating systems with advanced features such
as *BSD and Linux. However these were originally not designed for embedded
systems. Unix itself and all the tools built upon weren't meant for using on
small devices. Accordingly, these operating systems contain a lot of historical
code. Linux is well established, and targets a broad range of platforms and
uses, but consequently embedded platforms don't always get enough emphasis. Also
such well established, mature systems tend to oppose major design overhauls,
which limits innovation to a certain extent. In addition, their code base is so
big, that it gets more and more difficult to understand how their internals
work. Usually much of the code is irrelevant to the problem, in case of embedded
systems. Codezero is written from scratch to solely target embedded systems and
as such the source code is %100 relevant. It is small and free from legacy code.
Finally monolithic kernels may have issues with dependability due to much of the
code sharing the same address space. Being a microkernel design, Codezero aims
to defeat this problem and increase dependability.

Other than these modern kernels, there is systems software targeting embedded
devices. Most of them are proprietary, with their own users. Some of the open
source ones are structurally too simplistic, and lack modern features such as
paging. There are existing well-designed embedded OS'es, but Codezero provides
an alternative that will follow the open source development principles more
closely. This will prove useful because many embedded systems still use older
development methods and the right open source methodology would prove favorable
in the fast-paced nature of development.

Finally, there are new ideas in OS literature that would improve Unix but aren't
implemented either because they have no existing users or may break compatibility
somewhat (e.g. some are presented in Plan 9). As well as practising realistic
development methodologies, Codezero project aims to keep up with the latest OS
literature and provide the opportunity to incorporate the latest ideas in OS
technology.





Description
Codezero L4 hypervisor
Readme GPL-3.0 3.6 MiB
Languages
C 80%
Python 16.1%
Assembly 2.3%
C++ 1.6%