Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ Various tutorials for using seL4, its libraries, and CAmkES.

## Prerequisites

Follow the instructions for setting up your host environment on the [seL4 docsite](https://docs.sel4.systems/HostDependencies).
Follow the instructions for setting up your host environment on the [seL4
docsite](https://docs.sel4.systems/Tutorials/setting-up.html).

## Starting a tutorial

This tutorial repository is part of a larger collection of repositories, which
are required to run the tutorial and are coordinated in a manifest file. See
[this guide](https://docs.sel4.systems/Tutorials/#the-tutorials) on how to check
out a consistent set.
[this guide](https://docs.sel4.systems/Tutorials/get-the-tutorials.html) on how
to check out a consistent set.

Once you have that, a tutorial is started through the use of the `init` script
that is provided in the root directory. Using this script you can specify a
Expand Down Expand Up @@ -80,24 +81,21 @@ not appropriate for learning how to create and structure new applications/system
tutorials for this will be forthcoming. For now it is suggested to look at other existing
applications for ideas.

# Documentation
## Documentation

## Developer wiki
### seL4 docsite

A walkthrough of each tutorial is available on the [`docs site`](https://docs.sel4.systems/Tutorials)
A walkthrough of each tutorial is available on the [seL4 docsite](https://docs.sel4.systems/Tutorials/)

## Tutorial Slides
### Tutorial Slides

The slides used for the tutorial are available in [`docs`](docs).
The slides used for the tutorial are available in [`docs`](docs/).

## seL4 Manual
### seL4 Manual

The seL4 manual lives in the kernel source in the [`manual`](https://github.com/seL4/seL4/tree/master/manual) directory.
To generate a PDF go into that directory and type `make`.
You will need to have LaTeX installed to build it.
A pre-generated PDF version of the seL4 manual can be found
[`here`](http://sel4.systems/Info/Docs/seL4-manual-latest.pdf).

A pre-generated PDF version can be found [`here`](http://sel4.systems/Info/Docs/seL4-manual-latest.pdf).
### CAmkES Documentation

## CAmkES Documentation

CAmkES documentation lives in the camkes-tool repository in [docs/index.md](https://github.com/seL4/camkes-tool/blob/master/docs/index.md).
CAmkES documentation can be found on the [CAmkES page](https://docs.sel4.systems/projects/camkes/) of the docsite.
12 changes: 0 additions & 12 deletions template.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ def render_file(args, env, state, file):
input = in_stream.read()
template = env.from_string(input)

if (args.__getattribute__("docsite")):
s = StringIO(input)
lines = input.split('\n')

i = 0
for line in s:
lines[i] = line.replace("https://docs.sel4.systems/Tutorials/", "/Tutorials/")
i = i + 1

new_text = ''.join(lines)
template = env.from_string(str(new_text))

out_stream.write(template.render(context.get_context(args, state)))


Expand Down
6 changes: 3 additions & 3 deletions tutorials/camkes-vm-crossvm/camkes-vm-crossvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
# CAmkES Cross VM Connectors

This tutorial provides an introduction to using the cross virtual machine (VM) connector mechanisms
provided by seL4 and Camkes in order to connect processes in a guest Linux instance to Camkes components.
provided by seL4 and CAmkES in order to connect processes in a guest Linux instance to CAmkES components.

In this tutorial you will learn how to:

* Configure processes in a Linux guest VM to communicate with CAmkES components

## Prerequisites
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up)
2. [CAmkES VM Linux tutorial](https://docs.sel4.systems/Tutorials/camkes-vm-linux)
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up.html)
2. [CAmkES VM Linux tutorial](https://docs.sel4.systems/Tutorials/camkes-vm-linux.html)

*Note that the instructions for this tutorial are only for Linux.*

Expand Down
12 changes: 6 additions & 6 deletions tutorials/camkes-vm-linux/camkes-vm-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ You will become familiar with:
*Note that the instructions for this tutorial are only for Linux.*

## Prerequisites
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up)
2. [CAmkES timer tutorial](https://docs.sel4.systems/Tutorials/hello-camkes-timer)
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up.html)
2. [CAmkES timer tutorial](https://docs.sel4.systems/Tutorials/hello-camkes-timer.html)

## CapDL Loader

Expand All @@ -30,13 +30,13 @@ This tutorial uses the *capDL loader*, a root task which allocates statically
<summary>Get CapDL</summary>
The capDL loader parses
a static description of the system and the relevant ELF binaries.
It is primarily used in [Camkes](https://docs.sel4.systems/CAmkES/) projects
It is primarily used in [CAmkES](https://docs.sel4.systems/projects/camkes/) projects
but we also use it in the tutorials to reduce redundant code.
The program that you construct will end up with its own CSpace and VSpace, which are separate
from the root task, meaning CSlots like `seL4_CapInitThreadVSpace` have no meaning
in applications loaded by the capDL loader.
<br>
More information about CapDL projects can be found [here](https://docs.sel4.systems/CapDL.html).
More information about CapDL projects can be found [here](https://docs.sel4.systems/projects/capdl/).
<br>
For this tutorial clone the [CapDL repo](https://github.com/sel4/capdl). This can be added in a directory that is adjacent to the main `tutorials` directory.
</details>
Expand Down Expand Up @@ -151,7 +151,7 @@ The values of `vm0.kernel_cmdline`, `vm0.kernel_image` and `vm0.initrd_image` ar
strings specifying:
- boot arguments to the guest Linux,
- the name of the guest Linux kernel image file,
- and the name of the guest Linux initrd file (the root filesystem to use during system initialization).
- and the name of the guest Linux initrd file (the root filesystem to use during system initialisation).

The kernel command-line is defined in the `VM_GUEST_CMDLINE` macro. The kernel image
and rootfs names are defined in the applications `CMakeLists.txt` file.
Expand All @@ -160,7 +160,7 @@ linked into the VMM. In the simple configuration for thie tutorial, the VMM uses
the `bzimage` and `rootfs.cpio` names to find the appropriate files
in this archive.

To see how the `Init` component and CPIO archive are definied within the build system,
To see how the `Init` component and CPIO archive are defined within the build system,
look at the app's `CMakeList.txt`:

```cmake
Expand Down
4 changes: 2 additions & 2 deletions tutorials/capabilities/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ You will learn:

## Prerequisites

1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up)
2. [Hello world](https://docs.sel4.systems/Tutorials/hello-world)
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up.html)
2. [Hello world](https://docs.sel4.systems/Tutorials/hello-world.html)

## Initialising

Expand Down
18 changes: 9 additions & 9 deletions tutorials/fault-handlers/fault-handlers.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ You will learn:

## Prerequisites

1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up)
2. [Capabilities tutorial](https://docs.sel4.systems/Tutorials/capabilities)
3. [IPC tutorial](https://docs.sel4.systems/Tutorials/ipc)
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up.html)
2. [Capabilities tutorial](https://docs.sel4.systems/Tutorials/capabilities.html)
3. [IPC tutorial](https://docs.sel4.systems/Tutorials/ipc.html)

## Initialising

Expand All @@ -48,13 +48,13 @@ This tutorial uses the *capDL loader*, a root task which allocates statically
<summary>Get CapDL</summary>
The capDL loader parses
a static description of the system and the relevant ELF binaries.
It is primarily used in [Camkes](https://docs.sel4.systems/CAmkES/) projects
It is primarily used in [CAmkES](https://docs.sel4.systems/projects/camkes/) projects
but we also use it in the tutorials to reduce redundant code.
The program that you construct will end up with its own CSpace and VSpace, which are separate
from the root task, meaning CSlots like `seL4_CapInitThreadVSpace` have no meaning
in applications loaded by the capDL loader.
<br>
More information about CapDL projects can be found [here](https://docs.sel4.systems/CapDL.html).
More information about CapDL projects can be found [here](https://docs.sel4.systems/projects/capdl/).
<br>
For this tutorial clone the [CapDL repo](https://github.com/sel4/capdl). This can be added in a directory that is adjacent to the main `tutorials` directory.
</details>
Expand All @@ -65,7 +65,7 @@ A fault handler is a separate instruction stream which the CPU can jump to in
order to rectify an anomalous condition in the current thread and then return to
the previous instruction stream.

In seL4, faults are modeled as separately programmer-designated "fault handler"
In seL4, faults are modelled as separately programmer-designated "fault handler"
threads. In monolithic kernels, faults are not usually delivered to a userspace
handler, but they are handled by the monolithic kernel itself.

Expand Down Expand Up @@ -131,7 +131,7 @@ In addition, the following fault types are added by the MCS kernel:

When a fault is generated, the kernel will deliver an IPC message across the
fault endpoint. This IPC message contains information that tells the fault
handler why the fault occured as well as surrounding contextual information
handler why the fault occurred as well as surrounding contextual information
about the fault which might help the fault handler to rectify the anomaly.

Each anomaly has its own message format because the information needed to
Expand Down Expand Up @@ -161,11 +161,11 @@ When the kernel sends a fault IPC message using a badged endpoint cap, the badge
is delivered to the receiver just the same way it is delivered for any other
IPC where there is a badge on the sender's cap.

A keen reader would probably have realized that this means that a badge on the
A keen reader would probably have realised that this means that a badge on the
kernel's cap to a fault endpoint can be used to distinguish fault messages
from different faulting threads, such that a single handler can handle
faults from multiple threads. Please see the
[IPC Tutorial](https://docs.sel4.systems/Tutorials/ipc) for a refresher on how
[IPC Tutorial](https://docs.sel4.systems/Tutorials/ipc.html) for a refresher on how
badged fault endpoints work.

### Differences between MCS and Master kernel
Expand Down
11 changes: 6 additions & 5 deletions tutorials/hello-camkes-0/hello-camkes-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ This tutorial is an introduction to CAmkES. This will involve introducing the CA
static CAmkES application and describing its components.

Outcomes:

1. Understand the structure of a CAmkES application, as a described, well-defined, static system.
2. Understand the file-layout of a CAmkES ADL project.
3. Become acquainted with the basics of creating a practical CAmkES application.

Use this [slide presentation](https://github.com/seL4/sel4-tutorials/blob/master/docs/CAmkESTutorial.pdf) to guide you through the tutorials [0](https://docs.sel4.systems/Tutorials/hello-camkes-0), [1](https://docs.sel4.systems/Tutorials/hello-camkes-1) and [2](https://docs.sel4.systems/Tutorials/hello-camkes-2).
Use this [slide presentation](https://github.com/seL4/sel4-tutorials/blob/master/docs/CAmkESTutorial.pdf) to guide you through the tutorials [0](https://docs.sel4.systems/Tutorials/hello-camkes-0.html), [1](https://docs.sel4.systems/Tutorials/hello-camkes-1.html) and [2](https://docs.sel4.systems/Tutorials/hello-camkes-2.html).

## Prerequisites
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up).
2. [Hello world tutorial](https://docs.sel4.systems/Tutorials/hello-world)
3. Familiarise yourself with the [CAmkES manual](https://github.com/seL4/camkes-tool/blob/master/docs/index.md).
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up.html).
2. [Hello world tutorial](https://docs.sel4.systems/Tutorials/hello-world.html)
3. Familiarise yourself with the [CAmkES manual](https://docs.sel4.systems/projects/camkes/manual.html).
Note that it's possible to successfully complete the CAmkES tutorial without having read the manual, however highly
recommended.

Expand All @@ -34,7 +35,7 @@ interfaces which must be statically defined, over communication channels.
### Component

As briefly described above, we identify a component as a functional grouping of code and resources. We
use the term component in CAmkES to refer to the *type* of our functional grouping (see the Component section in the [manual](https://github.com/seL4/camkes-tool/blob/master/docs/index.md#component)).
use the term component in CAmkES to refer to the *type* of our functional grouping (see the Component section in the [manual](https://docs.sel4.systems/projects/camkes/manual.html#component)).
An example of this in concrete CAmkES syntax can be seen below:

```c
Expand Down
20 changes: 10 additions & 10 deletions tutorials/hello-camkes-1/hello-camkes-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ well-defined, static system.
2. Understand the file-layout of a CAmkES ADL project.
3. Become acquainted with the basics of creating a practical CAmkES application.

Use this [slide presentation](https://github.com/seL4/sel4-tutorials/blob/master/docs/CAmkESTutorial.pdf) to guide you through the tutorials [0](https://docs.sel4.systems/Tutorials/hello-camkes-0), [1](https://docs.sel4.systems/Tutorials/hello-camkes-1) and [2](https://docs.sel4.systems/Tutorials/hello-camkes-2).
Use this [slide presentation](https://github.com/seL4/sel4-tutorials/blob/master/docs/CAmkESTutorial.pdf) to guide you through the tutorials [0](https://docs.sel4.systems/Tutorials/hello-camkes-0.html), [1](https://docs.sel4.systems/Tutorials/hello-camkes-1.html) and [2](https://docs.sel4.systems/Tutorials/hello-camkes-2.html).

## Prerequisites
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up)
2. [CAmkES hello world tutorial](https://docs.sel4.systems/Tutorials/hello-camkes-0)
1. [Set up your machine](https://docs.sel4.systems/Tutorials/setting-up.html)
2. [CAmkES hello world tutorial](https://docs.sel4.systems/Tutorials/hello-camkes-0.html)

## Initialising

Expand Down Expand Up @@ -54,7 +54,7 @@ the following camkes file:
- `hello-camkes-1/hello-1.camkes`

Find the Component manual section here:
<https://github.com/seL4/camkes-tool/blob/master/docs/index.md#component>
<https://docs.sel4.systems/projects/camkes/manual.html#component>

### Connections

Expand All @@ -67,7 +67,7 @@ we are using synchronous IPC. In implementation terms, this boils down
to the `seL4_Call` syscall on seL4.

Find the "Connection" keyword manual section here:
<https://github.com/seL4/camkes-tool/blob/master/docs/index.md#connection>
<https://docs.sel4.systems/projects/camkes/manual.html#connection>

### Interfaces

Expand All @@ -94,7 +94,7 @@ Procedure interface may be found here:
`hello-camkes-1/interfaces/HelloSimple.idl4`

Find the "Procedure" keyword definition here:
<https://github.com/seL4/camkes-tool/blob/master/docs/index.md#procedure>
<https://docs.sel4.systems/projects/camkes/manual.html#procedure>

### Component source

Expand Down Expand Up @@ -174,7 +174,7 @@ assembly {
/*-- filter TaskContent("hello", TaskContentType.BEFORE, subtask="connect") -*/
/* hint 1: use seL4RPCCall as the connector (or you could use seL4RPC if you prefer)
* hint 2: look at
* https://github.com/seL4/camkes-tool/blob/master/docs/index.md#creating-an-application
* https://docs.sel4.systems/projects/camkes/manual.html#creating-an-application
*/
/*-- endfilter -*/
```
Expand All @@ -199,7 +199,7 @@ procedure HelloSimple {
/*-- filter TaskContent("hello", TaskContentType.BEFORE, subtask="interface") -*/
/* TODO define RPC functions */
/* hint 1: define at least one function that takes a string as input parameter. call it say_hello. no return value
* hint 2: look at https://github.com/seL4/camkes-tool/blob/master/docs/index.md#creating-an-application
* hint 2: look at https://docs.sel4.systems/projects/camkes/manual.html#creating-an-application
*/
/*-- endfilter -*/
```
Expand Down Expand Up @@ -227,7 +227,7 @@ procedure HelloSimple {
* hint 4: so the function would be: hello_say_hello()
* hint 5: the CAmkES 'string' type maps to 'const char *' in C
* hint 6: make the function print out a mesage using printf
* hint 7: look at https://github.com/seL4/camkes-tool/blob/master/docs/index.md#creating-an-application
* hint 7: look at https://docs.sel4.systems/projects/camkes/manual.html#creating-an-application
*/
/*-- endfilter -*/
```
Expand Down Expand Up @@ -258,7 +258,7 @@ void hello_say_hello(const char *str) {
* hint 2: the interfaces available are defined by the component, e.g. in hello-1.camkes
* hint 3: the function name is defined by the interface definition, e.g. in interfaces/HelloSimple.idl4
* hint 4: so the function would be: hello_say_hello()
* hint 5: look at https://github.com/seL4/camkes-tool/blob/master/docs/index.md#creating-an-application
* hint 5: look at https://docs.sel4.systems/projects/camkes/manual.html#creating-an-application
*/
/*-- endfilter -*/
```
Expand Down
Loading