L4Re Operating System Framework
Interface and Usage Documentation
|
Moe is the default root-task implementation for L4Re-based systems.
Moe is the first task which is usually started in L4Re-based systems. The micro kernel starts Moe as the Root-Task.
Moe provides a default implementation for the basic L4Re abstractions, such as data spaces (L4Re::Dataspace), region maps (L4Re::Rm), memory allocators (L4::Factory, L4Re::Mem_alloc), name spaces (L4Re::Namespace) and so on (see L4Re Interface). These are described in the following subsections.
The factory in Moe is responsible for all kinds of dynamic object allocation.
Moe's factory allows allocation of the following objects:
L4::Factory.create() returns a create stream that allows arguments to be forwarded to the the object creation in Moe.
Objects that support additional parameters on their creation are presented next with a non-empty list of parameters. The parameters are listed in the order they should be provided to a create stream. Optional parameters are identified by their default values. Multiple entries in the next list denote different ways of initializing an object.
()
(l4_mword_t size, l4_umword_t flags = 0, l4_umword_t align = 0)
size
: size in bytes (mandatory)flags
: special dataspace properties, see L4Re::Mem_alloc::Mem_alloc_flagsalign
: Log2 alignment of dataspace if supported by allocator()
()
(char const *label, l4_mword_t color = 7)
label
: label used as prefix for the console outputcolor
: color code 0..15
(char const *label, char const *color = "w")
label
: label used as prefix for the console outputcolor
: color codeN
, n
, R
, r
, G
, g
, Y
, y
, B
, b
, M
, m
, C
, c
, W
, w
(l4_mword_t limit, l4_mword_t offset, l4_umword_t bitmap = ~0UL, ...)
limit
: maximum priorityoffset
: priority offsetbitmap
: bitmap of CPUs - can be repeated to address higher order CPUslimit
must be greater than offset
(l4_mword_t quota)
quota
: limit in bytes (not zero)Moe provides a name space conforming to the L4Re::Namespace interface (see Name-space API). Per default Moe creates a single name space for the Boot FS. That is available as rom
in the initial objects of the init process.
The Boot FS subsystem provides access to the files loaded during the platform boot (or available in ROM). These files are either linked into the boot image or loaded via a flexible boot loader, such as GRUB.
The subsystem provides an L4Re::Namespace object as directory and an L4Re::Dataspace object for each file.
By default all files are read only and visible in the namespace rom
. As an option, files can be supplied with the argument :rw
to mark them as writable modules. Moe will allow read and write access to these dataspaces and make them visible in a different namespace called `rwfs`.
An example entry in 'modules.list' would look like this:
Dataspaces can be allocated with an arbitrary size. The granularity for memory allocation however is the machine page size (L4_PAGESIZE). A dataspace user must be aware that, as a result of this page-size granularity, there may be padding memory at the end of a dataspace which is accessible to each client. Moe currently allows most dataspace operations on this padding area. Nonetheless, the client must not make any assumptions about the size or content of the padding area, as this behaviour might change in the future.
The provided data spaces can have different characteristics:
Dataspaces allocated via the Moe's factory allow mappings with any combination of the read-write-execute (RWX) rights, subject to a possible restriction of the writable right for client capabilities lacking the 'W' right.
The logging facility of Moe provides per application tagged and synchronized log output.
The scheduler subsystem provides a simple scheduler proxy for scheduling policy enforcement.
The priority offset provided on the creation of a scheduler proxy defines the minimum priority assigned to threads which are scheduled by that instance of the scheduler proxy. The offset is implicitly added to priorities provided to L4::Scheduler.run_thread().
Moe's command-line syntax is:
moe [--debug=<flags>] [--init=<binary>] [--l4re-dbg=<flags>] [--ldr-flags=<flags>] [-- <init options>]
--debug=<debug flags>
<debug flags>
values are a combination of info
, warn
, boot
, server
, loader
, exceptions
, and ns
(or all
for full verbosity).--init=<init process>
--l4re-dbg=<debug flags>
--debug=
.--ldr-flags=<loader flags>
pre_alloc
, all_segs_cow
,and pinned_segs
.--brk=<address>
<address>
. The argument is parsed as hexadecimal number without any 0x
prefix. Use it to prevent moe from allocating memory in regions that shall later be used by other applications or virtual machines.-- <init options>
--
option are passed directly to the init process.