L4Re - L4 Runtime Environment
Moe, the Root-Task

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 (L4Re::Mem_alloc, L4::Factory), name spaces (L4Re::Namespace) and so on (see L4Re Interface).

Moe consists of the following subsystems:

  • Name-Space Provider — provides instances of name spaces
  • Boot FS — provides access to the files loaded during platform boot (e.g., linked into the boot image or loaded via GRUB boot loader)
  • Log Subsystem — provides tagged log output for applications
  • Scheduler Subsystem — provides simple scheduler objects for scheduling policy enforcement
  • Memory Allocator, Generic Factory — provides allocation of physical RAM as data spaces, as well as allocation of the other L4Re objects provided by Moe

Memory Allocator, Generic Factory

The generic factory in Moe is responsible for all kinds of dynamic object allocation. The interface is a combination of L4::Factory and, for traditional reasons, L4Re::Mem_alloc.

The generic factory interface allows allocation of the following objects:

The memory allocator in Moe is the alternative interface for allocating memory (RAM) in terms of L4Re::Dataspace-s (see also L4Re::Mem_alloc).

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:

  • Physically contiguous and pre-allocated
  • Non contiguous and on-demand allocated with possible copy on write (COW)

Name-Space Provider

Moe provides a name spaces 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.

Boot FS

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:

module somemodule :rw
In order for a client to receive write permissions to the dataspace, the corresponding cap also needs write permissions.

Log Subsystem

The logging facility of Moe provides per application tagged and synchronized log output.

Scheduler Subsystem

The scheduler subsystem provides a simple scheduler proxy.

Command-Line Options

Moe's command-line syntax is:

moe [--debug=<flags>] [--init=<binary>] [--l4re-dbg=<flags>] [--ldr-flags=<flags>] [-- <init options>]
--debug=<debug flags>
This option enables debug messages from Moe itself, the <debug flags> values are a combination of info, warn, boot, server, loader, exceptions, and ns (or all for full verbosity).
--init=<init process>
This options allows to override the default init process binary, which is 'rom/ned'.
--l4re-dbg=<debug flags>
This option allows to set the debug options for the L4Re runtime environment of the init process. The flags are the same as for --debug=.
--ldr-flags=<loader flags>
This option allows setting some loader options for the L4Re runtime environment. The flags are pre_alloc, all_segs_cow,and pinned_segs.
-- <init options>
All command-line parameters after the special -- option are passed directly to the init process.