233 lines
19 KiB
HTML
233 lines
19 KiB
HTML
<!-- HTML header for doxygen 1.9.1-->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.15.0"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>L4Re Operating System Framework: Moe, the Root-Task</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="l4re-awesome.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="L4Re_rgb_logo_quer_hg_h55.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">L4Re Operating System Framework
|
|
</div>
|
|
<div id="projectbrief">Interface and Usage Documentation</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.15.0 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
</script>
|
|
<script type="text/javascript">
|
|
$(function() { codefold.init(); });
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search',true);
|
|
$(function() { init_search(); });
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function(){initNavTree('l4re_servers_moe.html','',''); });
|
|
</script>
|
|
<div id="container">
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div><div class="header">
|
|
<div class="headertitle"><div class="title">Moe, the Root-Task </div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><p>Moe is the default root-task implementation for L4Re-based systems.</p>
|
|
<p><em>Moe</em> is the first task which is usually started in L4Re-based systems. The micro kernel starts <em>Moe</em> as the Root-Task.</p>
|
|
<h1 class="doxsection"><a class="anchor" id="l4re_moe_objects"></a>
|
|
Moe objects</h1>
|
|
<p>Moe provides a default implementation for the basic <a class="el" href="namespaceL4Re.html" title="L4Re C++ Interfaces.">L4Re</a> abstractions, such as data spaces (<a class="el" href="classL4Re_1_1Dataspace.html" title="Interface for memory-like objects.">L4Re::Dataspace</a>), region maps (<a class="el" href="classL4Re_1_1Rm.html" title="Region map.">L4Re::Rm</a>), memory allocators (<a class="el" href="classL4_1_1Factory.html" title="C++ Factory interface, see Factory for the C interface.">L4::Factory</a>, <a class="el" href="classL4Re_1_1Mem__alloc.html" title="Memory allocation interface.">L4Re::Mem_alloc</a>), name spaces (<a class="el" href="classL4Re_1_1Namespace.html" title="Name-space interface.">L4Re::Namespace</a>) and so on (see <a class="el" href="group__api__l4re.html">L4Re Interface</a>). These are described in the following subsections.</p>
|
|
<h2 class="doxsection"><a class="anchor" id="l4re_moe_factory"></a>
|
|
Factory</h2>
|
|
<p>The factory in Moe is responsible for all kinds of dynamic object allocation.</p>
|
|
<p>Moe's factory allows allocation of the following objects:</p><ul>
|
|
<li><a class="el" href="classL4Re_1_1Namespace.html" title="Name-space interface.">L4Re::Namespace</a></li>
|
|
<li><a class="el" href="classL4Re_1_1Dataspace.html" title="Interface for memory-like objects.">L4Re::Dataspace</a>, RAM allocation</li>
|
|
<li><a class="el" href="classL4Re_1_1Dma__space.html" title="Managed DMA Address Space.">L4Re::Dma_space</a>, memory management for DMA-capable devices</li>
|
|
<li><a class="el" href="classL4Re_1_1Rm.html" title="Region map.">L4Re::Rm</a>, virtual memory management for application tasks</li>
|
|
<li><a class="el" href="classL4_1_1Vcon.html" title="C++ L4 Vcon interface, see Virtual Console for the C interface.">L4::Vcon</a> (output only)</li>
|
|
<li><a class="el" href="classL4_1_1Scheduler.html" title="C++ interface of the Scheduler kernel object, see Scheduler for the C interface.">L4::Scheduler</a>, to provide a restricted priority / CPU range for clients</li>
|
|
<li><a class="el" href="classL4_1_1Factory.html" title="C++ Factory interface, see Factory for the C interface.">L4::Factory</a>, to provide a quota limited allocation for clients</li>
|
|
</ul>
|
|
<dl class="section note"><dt>Note</dt><dd><a class="el" href="classL4_1_1Scheduler.html" title="C++ interface of the Scheduler kernel object, see Scheduler for the C interface.">L4::Scheduler</a> objects can be only created through the user factory provided by Moe to the initial application. Other factory instances cannot create this object.</dd></dl>
|
|
<h3 class="doxsection"><a class="anchor" id="l4re_moe_memory_alloc_factory"></a>
|
|
Passing parameters to the create stream</h3>
|
|
<p><a class="el" href="classL4_1_1Factory.html#ab52604d4abed4d6009ce51a59492edd7" title="Generic create call to the factory.">L4::Factory.create()</a> returns a <a class="el" href="classL4_1_1Factory_1_1S.html">create stream</a> that allows arguments to be forwarded to the object creation in Moe.</p>
|
|
<p>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.</p>
|
|
<ul>
|
|
<li><a class="el" href="classL4Re_1_1Namespace.html" title="Name-space interface.">L4Re::Namespace</a> <span class="tt">()</span><ul>
|
|
<li>For more details see <a class="el" href="#l4re_moe_names">Namespace</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="el" href="classL4Re_1_1Dataspace.html" title="Interface for memory-like objects.">L4Re::Dataspace</a> <span class="tt">(<a class="el" href="group__l4__basic__types.html#ga51d9492e7700d70ed35838154ca9b279" title="Signed machine word.">l4_mword_t</a> size, <a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb" title="Unsigned machine word.">l4_umword_t</a> flags = 0,
|
|
<a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb" title="Unsigned machine word.">l4_umword_t</a> align = 0)</span><ul>
|
|
<li>Argument <span class="tt">size</span>: size in bytes (mandatory)</li>
|
|
<li>Argument <span class="tt">flags</span>: special dataspace properties, see <a class="el" href="classL4Re_1_1Mem__alloc.html#a47f3e054def977c17dbf60bfbb4ee05e" title="Flags for the allocator.">L4Re::Mem_alloc::Mem_alloc_flags</a></li>
|
|
<li>Argument <span class="tt">align</span>: Log2 alignment of dataspace if supported by allocator</li>
|
|
<li>See detailed description of the parameters in <a class="el" href="classL4Re_1_1Mem__alloc.html#a3e61dd10005ccbabb7052050704d6520" title="Allocate anonymous memory.">L4Re::Mem_alloc::alloc()</a></li>
|
|
<li>For details on the types of dataspaces provided by Moe, see <a class="el" href="#l4re_moe_dataspace">Dataspace</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="el" href="classL4Re_1_1Dma__space.html" title="Managed DMA Address Space.">L4Re::Dma_space</a> <span class="tt">()</span><ul>
|
|
<li>For more details see <a class="el" href="#l4re_moe_dma_space">DMA Space</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="el" href="classL4Re_1_1Rm.html" title="Region map.">L4Re::Rm</a> <span class="tt">()</span><ul>
|
|
<li>For more details see <a class="el" href="#l4re_moe_rm">Region Map</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="el" href="classL4_1_1Vcon.html" title="C++ L4 Vcon interface, see Virtual Console for the C interface.">L4::Vcon</a> <span class="tt">(char const *label, <a class="el" href="group__l4__basic__types.html#ga51d9492e7700d70ed35838154ca9b279" title="Signed machine word.">l4_mword_t</a> color = 7)</span><ul>
|
|
<li>Argument <span class="tt">label</span>: label used as prefix for the console output</li>
|
|
<li>Argument <span class="tt">color</span>: color code <span class="tt">0..15</span></li>
|
|
<li>For more details see <a class="el" href="#l4re_moe_log">Log Subsystem</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="el" href="classL4_1_1Vcon.html" title="C++ L4 Vcon interface, see Virtual Console for the C interface.">L4::Vcon</a> <span class="tt">(char const *label, char const *color = "w")</span><ul>
|
|
<li>Argument <span class="tt">label</span>: label used as prefix for the console output</li>
|
|
<li>Argument <span class="tt">color</span>: color code<ul>
|
|
<li>The color is identified by a single character</li>
|
|
<li>Supported colors: <span class="tt">N</span>, <span class="tt">n</span>, <span class="tt">R</span>, <span class="tt">r</span>, <span class="tt">G</span>, <span class="tt">g</span>, <span class="tt">Y</span>, <span class="tt">y</span>, <span class="tt">B</span>, <span class="tt">b</span>, <span class="tt">M</span>, <span class="tt">m</span>, <span class="tt">C</span>, <span class="tt">c</span>, <span class="tt">W</span>, <span class="tt">w</span></li>
|
|
</ul>
|
|
</li>
|
|
<li>For more details see <a class="el" href="#l4re_moe_log">Log Subsystem</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="el" href="classL4_1_1Scheduler.html" title="C++ interface of the Scheduler kernel object, see Scheduler for the C interface.">L4::Scheduler</a> <span class="tt">(<a class="el" href="group__l4__basic__types.html#ga51d9492e7700d70ed35838154ca9b279" title="Signed machine word.">l4_mword_t</a> limit, <a class="el" href="group__l4__basic__types.html#ga51d9492e7700d70ed35838154ca9b279" title="Signed machine word.">l4_mword_t</a> offset,
|
|
<a class="el" href="group__l4__basic__types.html#ga1c2c4b333f75b1d05b59855910f2b9cb" title="Unsigned machine word.">l4_umword_t</a> bitmap = ~0UL, ...)</span><ul>
|
|
<li>Argument <span class="tt">limit</span>: maximum priority</li>
|
|
<li>Argument <span class="tt">offset</span>: priority offset</li>
|
|
<li>Argument <span class="tt">bitmap</span>: bitmap of CPUs - can be repeated to address higher order CPUs</li>
|
|
<li>Argument <span class="tt">limit</span> must be greater than <span class="tt">offset</span></li>
|
|
<li>For more details see <a class="el" href="#l4re_moe_scheduler">Scheduler subsystem</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a class="el" href="classL4_1_1Factory.html" title="C++ Factory interface, see Factory for the C interface.">L4::Factory</a> <span class="tt">(<a class="el" href="group__l4__basic__types.html#ga51d9492e7700d70ed35838154ca9b279" title="Signed machine word.">l4_mword_t</a> quota)</span><ul>
|
|
<li>Argument <span class="tt">quota</span>: limit in bytes (not zero)</li>
|
|
<li>The limit is deducted from the limit of the factory that creates the new factory</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h2 class="doxsection"><a class="anchor" id="l4re_moe_names"></a>
|
|
Namespace</h2>
|
|
<p>Moe provides a name space conforming to the <a class="el" href="classL4Re_1_1Namespace.html" title="Name-space interface.">L4Re::Namespace</a> interface (see <a class="el" href="group__api__l4re__namespace.html">Name-space API</a>). Per default Moe creates a single name space for the <a class="el" href="#l4re_moe_bootfs">Boot FS</a>. That is available as <code>rom</code> in the initial objects of the init process.</p>
|
|
<h3 class="doxsection"><a class="anchor" id="l4re_moe_bootfs"></a>
|
|
Boot FS</h3>
|
|
<p>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.</p>
|
|
<p>The subsystem provides an <a class="el" href="classL4Re_1_1Namespace.html" title="Name-space interface.">L4Re::Namespace</a> object as directory and an <a class="el" href="classL4Re_1_1Dataspace.html" title="Interface for memory-like objects.">L4Re::Dataspace</a> object for each file.</p>
|
|
<p>By default all files are read only and visible in the namespace <em><span class="tt">rom</span></em>. As an option, files can be supplied with the argument <span class="tt">:rw</span> 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 <em>`rwfs`</em>.</p>
|
|
<p>An example entry in 'modules.list' would look like this:</p>
|
|
<div class="fragment"><div class="line"><span class="keyword">module</span> somemodule :rw</div>
|
|
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>In order for a client to receive write permissions to the dataspace, the corresponding cap also needs write permissions.</dd></dl>
|
|
<h2 class="doxsection"><a class="anchor" id="l4re_moe_dataspace"></a>
|
|
Dataspace</h2>
|
|
<p>Dataspaces can be allocated with an arbitrary size. The granularity for memory allocation however is the machine page size (<a class="el" href="group__l4__memory__api.html#gabecf862d8b8f39ad28af45d7fc949dd5" title="Minimal page size (in bytes).">L4_PAGESIZE</a>). 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.</p>
|
|
<p>The provided data spaces can have different characteristics:</p><ul>
|
|
<li>Physically contiguous and pre-allocated</li>
|
|
<li>Non contiguous and on-demand allocated with possible copy on write (COW)</li>
|
|
</ul>
|
|
<p>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.</p>
|
|
<h2 class="doxsection"><a class="anchor" id="l4re_moe_log"></a>
|
|
Log Subsystem</h2>
|
|
<p>The logging facility of Moe provides per application tagged and synchronized log output.</p>
|
|
<h2 class="doxsection"><a class="anchor" id="l4re_moe_dma_space"></a>
|
|
DMA Space</h2>
|
|
<h2 class="doxsection"><a class="anchor" id="l4re_moe_scheduler"></a>
|
|
Scheduler subsystem</h2>
|
|
<p>The scheduler subsystem provides a simple scheduler proxy for scheduling policy enforcement.</p>
|
|
<p>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 <a class="el" href="classL4_1_1Scheduler.html#acc86cb4df9b2aad35730b209e0c98089" title="Run a thread on a Scheduler.">L4::Scheduler.run_thread()</a>.</p>
|
|
<h2 class="doxsection"><a class="anchor" id="l4re_moe_rm"></a>
|
|
Region Map</h2>
|
|
<h1 class="doxsection"><a class="anchor" id="l4re_moe_options"></a>
|
|
Command Line Options</h1>
|
|
<p>Moe's command-line syntax is: </p><pre class="fragment">moe [--debug=<flags>] [--init=<binary>] [--l4re-dbg=<flags>] [--ldr-flags=<flags>] [-- <init options>]
|
|
</pre><dl class="section user"><dt><span class="tt">--debug=<debug flags></span></dt><dd>This option enables debug messages from Moe itself, the <span class="tt"><debug flags></span> values are a combination of <span class="tt">info</span>, <span class="tt">warn</span>, <span class="tt">boot</span>, <span class="tt">server</span>, <span class="tt">loader</span>, <span class="tt">exceptions</span>, and <span class="tt">ns</span> (or <span class="tt">all</span> for full verbosity).</dd></dl>
|
|
<dl class="section user"><dt><span class="tt">--init=<init process></span></dt><dd>This options allows to override the default init process binary, which is 'rom/ned'.</dd></dl>
|
|
<dl class="section user"><dt><span class="tt">--l4re-dbg=<debug flags></span></dt><dd>This option allows to set the debug options for the <a class="el" href="namespaceL4Re.html" title="L4Re C++ Interfaces.">L4Re</a> runtime environment of the init process. The flags are the same as for <span class="tt">--debug=</span>.</dd></dl>
|
|
<dl class="section user"><dt><span class="tt">--ldr-flags=<loader flags></span></dt><dd>This option allows setting some loader options for the <a class="el" href="namespaceL4Re.html" title="L4Re C++ Interfaces.">L4Re</a> runtime environment. The flags are <span class="tt">pre_alloc</span>, <span class="tt">all_segs_cow</span>,and <span class="tt">pinned_segs</span>.</dd></dl>
|
|
<dl class="section user"><dt><span class="tt">--brk=<address></span></dt><dd>This option is only present on systems without MMU. It restricts dynamic allocations to addresses equal or higher than <span class="tt"><address></span>. The argument is parsed as hexadecimal number without any <span class="tt">0x</span> prefix. Use it to prevent moe from allocating memory in regions that shall later be used by other applications or virtual machines.</dd></dl>
|
|
<dl class="section user"><dt><span class="tt">-- <init options></span></dt><dd>All command-line parameters after the special <span class="tt">--</span> option are passed directly to the init process. </dd></dl>
|
|
</div></div><!-- contents -->
|
|
</div><!-- PageDoc -->
|
|
</div><!-- doc-content -->
|
|
<div id="page-nav" class="page-nav-panel">
|
|
<div id="page-nav-resize-handle"></div>
|
|
<div id="page-nav-tree">
|
|
<div id="page-nav-contents">
|
|
</div><!-- page-nav-contents -->
|
|
</div><!-- page-nav-tree -->
|
|
</div><!-- page-nav -->
|
|
</div><!-- container -->
|
|
<!-- HTML footer for doxygen 1.9.1-->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a href="l4re_servers.html">L4Re Servers</a></li>
|
|
<li class="footer">Generated on <span class="timestamp"></span> for L4Re Operating System Framework by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|