README.md 2.15 KB
Newer Older
ember arlynx's avatar
ember arlynx committed
1
2
3
4
5
6
7
8
9
10
11
12
# seL4 kernel build and configuration

This repository helps with building compatible configurations of the seL4
kernel for Robigalia. Its structure is similar to sel4test, but doesn't
contain any of the userspace C libraries.

The submodules here should be kept in careful sync with sel4-sys, especially
the kernel submodule.

# Building the kernel

Look at the `configs` directory, and run `make $PLAT_defconfig`. For example,
13
`make x64_qemu_defconfig`.
ember arlynx's avatar
ember arlynx committed
14

15
You can then run `make` and the kernel will be built into `stage/`.
ember arlynx's avatar
ember arlynx committed
16
17
18
19
20
21

# Configuring the kernel

By default, debug printing is enabled for the kernel.

You can tweak the kernel config with `make menuconfig`. Be warned that some
22
23
24
25
26
settings may break the Rust userspace support! In particular, for x64:

- `XSAVE_SIZE` of less than 576 will break creating TCBs
- `SYSCALL=n` and `SYSENTER=y` will break all syscalls.

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
To support AVX (and later) instructions on x64 these configurations must be set:

- One of the XSAVE instructions must be used. The selected XSAVE instruction
  must be supported on the target processor.
- `XSAVE_SIZE` must match or exceed the target processor and meet its alignment
  requirements. If using the cpuid package installed on a linux machine, you can
  find this with `cpuid | grep 'bytes required by XSAVE'`
- `XSAVE_FEATURE_SET` must be set to the feature flags you want to enable in
  XCR0. See the intel architecture software development manual 3A for possible
  values. These flags must be supported by your target processor. If using the
  cpuid package installed on a linux machine, you can find the flags supported
  by your processor with `cpuid | grep 'XCR0 [lower|upper]'`

The rust target file for x64 robigalia on sel4 does not generate AVX or later
instructions (see the sel4-targets project). You will need to modify that file
or override those settings with command line arguments to rustc to generate
those instructions.

Note that enabling and using AVX instructions is currently untested.

47
For ARM: we don't support ARM yet.
ember arlynx's avatar
ember arlynx committed
48
49
50

# Platforms

51
Currently supported platforms are x64 "PC99".
ember arlynx's avatar
ember arlynx committed
52

53
54
There is a config for x86 PC99, but it is completely untested, since we don't
support 32-bit at all anymore.