Commit Graph

627 Commits

Author SHA1 Message Date
Birgit Brecknell
0d799c3706 fix autoref whitespace errors
Signed-off-by: Birgit Brecknell <bbrcknl@gmail.com>
2024-03-22 09:02:23 +00:00
Birgit Brecknell
43690234f1 fix white spaces in <docref> tags
Signed-off-by: Birgit Brecknell <bbrcknl@gmail.com>
2024-03-22 09:02:23 +00:00
Birgit Brecknell
31e82e81da wrap docref references in <docref> tag
Signed-off-by: Birgit Brecknell <bbrcknl@gmail.com>
2024-03-22 09:02:23 +00:00
Birgit Brecknell
f6656e2c78 Add a glossary to the manual
Add a glossary with seL4-specific terms and their
definitions.
Remove chapter number from bibliography
Tweak Makefile for glossary

Signed-off-by: Birgit Brecknell <bbrcknl@gmail.com>
2024-03-20 14:54:06 +11:00
Indan Zupancic
43607edb68 Manual: Xinclude support
This way common error codes can be in their own file.

To use, add the xmlns:xi="http://www.w3.org/2001/XInclude
attribute to the top level node and use:

<xi:include href="file-to-include.xml"/>

The content of the file will be included verbatim.

Include files must be complete XML documents, but without
<?xml version="1.0" ?> at the top. Practically this means
all nodes within the file need to be contained in one root
element.

Caveat: There is no proper dependency for Xincludes files in
the Makefile, so you need to do make clean after changing an
included XML file!

Signed-off-by: Indan Zupancic <indan@nul.nu>
2024-03-18 10:03:07 +00:00
Kent McLeod
5bce5c0c1e ARM: Allow VMPIDR_EL2 reg to be set on unicore
Currently the seL4_VCPUReg enum only defines the seL4_VCPUReg_VMPIDR_EL2
register when the kernel is configured for SMP. This register should be
available for unicore systems too as otherwise a user level VMM is not
able to control the value of MPIDR_EL1 that the guest VM reads.

Signed-off-by: Kent McLeod <kent@kry10.com>
2024-03-14 10:02:42 +01:00
Nick Spinale
9bac64c6ce libsel4: Eliminate unnamed enums
Signed-off-by: Nick Spinale <nick@nickspinale.com>
2024-02-08 15:34:14 +11:00
bbrcknl
cbf25791b7 make method names consistent (#1144)
* make method names consistent; delete duplicates

Signed-off-by: Birg <bbrcknl@github.com>
2024-01-19 14:25:02 +11:00
Birg
9a532efc15 change CPTR to CPtr
Signed-off-by: Birg <bbrcknl@github.com>
2023-12-06 10:41:28 +00:00
Birg
391bfb15f8 update some manual todos
Signed-off-by: Birg <bbrcknl@github.com>
2023-11-29 10:21:32 +00:00
Axel Heider
7d93471e9c debug: use c99 standard instead of gcc extensions
Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-11-16 12:09:52 +00:00
Ivan-Velickovic
e959f83962 Add support for Star64 SBC
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
2023-11-08 14:34:18 +00:00
Gerwin Klein
355f9abc15 sel4.xml: mark Set Space as MCS in the manual
Disambiguate (for the reader) between normal and mcs versions of
SetSpace in the manual. This does not yet solve doxygen confusion.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-11-07 16:13:28 +11:00
Alex Pavey
e62bc9bba3 smc_cap: Add SMC Capability with Call method
See PR at https://github.com/seL4/seL4/pull/701

Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com>
2023-08-27 11:44:51 +10:00
Axel Heider
b8c0b1cb02 boot: introduce seL4_BootInfoFrameSize
Provide seL4_BootInfoFrameSize (and seL4_BootInfoFrameBits) for
userland, to there is no longer a need to hard-code the 4 KiByte
assumption.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-08-23 15:10:32 +02:00
Kent McLeod
2317b402a8 libsel4: Add __ASSEMBLER__ guards in .h files
Additional header files may now be included in non-C contexts and so we
need to guard some C definitions with the __ASSEMBLER__ guards
convention.

Signed-off-by: Kent McLeod <kent@kry10.com>
2023-08-12 08:32:20 +02:00
Robbie VanVossen
e25d9c90e1 libsel4: Make bootinfo consistent
Some slot positions in the rootnode would depend on configuration.
However that makes it difficult to add new root caps, especially if
multiple caps only exist based on configuration. Make all caps always
there, but null if not configured.

Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com>
2023-08-12 14:41:52 +10:00
Kent McLeod
cb8ee83f0c aarch64,vspace: Remove pud cap type
Now the vspace_cap is used for all vspace roots and all other page
tables are referred to by page table caps.

Signed-off-by: Kent McLeod <kent@kry10.com>
2023-08-10 08:20:22 +10:00
Kent McLeod
b3cc852425 aarch64,vspace: Remove page_directory captype
The page_table cap is used in it's place.

Signed-off-by: Kent McLeod <kent@kry10.com>
2023-08-10 08:20:22 +10:00
Kent McLeod
7fec9bc9e9 Add CONFIG_X86_64_VTX_64BIT_GUESTS guards
Guard the new implementation of 64-bit x86 guests behind a config
option. This is done so that existing projects that use x86_64 hosts
with ia32-bit guests can continue to be supported until either the old
feature is preferred to be deprecated, or support can be added to
support both simmultaneously.

Signed-off-by: Kent McLeod <kent@kry10.com>
2023-06-06 13:29:34 +10:00
Chris Guikema
2dbd1b818a 64-bit-vms: Add kernel support for 64-bit VMs
This commit combines a number of smaller commits which do the following:

    * Enter IA-32e mode when running a 64-bit host
    * Handle additional general purpose registers in 64-bit mode
    * Handle 64-bit specific MSR events
    * Properly save and restore FS, GS, and Shadow GS registers

CCDC-GVSC DISTRIBUTION A.  Approved for public release; distribution
unlimited. OPSEC#4481.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-06 13:29:34 +10:00
Gerwin Klein
35c41a822f macros: avoid breaking C subset
__builtin_offsetof is not part of the verification C subset -- avoid
accidental use by not declaring a macro for it and filter out the
single use by explicitly marking it as invisible to verification.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-31 14:55:57 +10:00
Axel Heider
4d1da1002b libsel4: use sel4/config.h instead of autoconf.h
Make sel4/config.h the only file to eventually include autoconf.h

Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-04-24 23:02:12 +10:00
Axel Heider
8eec7ad207 python: include sel4/config.h and not autoconf.h
Include sel4/config.h instead of autoconf.h in the generated code.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-04-24 23:02:12 +10:00
Gerwin Klein
57c46bc8d0 bitfield_gen: comment for original source file
Add a `--form_file <file>` option to the bitfield generator for
printing a `/* generated from <file> */` message in a comment.

Use this option in cmake to provide the original source .bf file before
preprocessing so it's easier to find out where the corresponding
definitions are.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-04-10 15:46:00 +10:00
Axel Heider
675604e3b6 add compile assert for seL4_UntypedDesc size
This header file is shared by kernel and userland. We can control the
kernel compiler setting, but userland might use an arbitrary setup.
Put a safeguard in place that things works as expected.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-03-28 13:34:35 +11:00
Gerwin Klein
ecbeacb3ab constants.h: explain seL4_CoreSchedContextBytes
The "excluding extra refills" was confusing. seL4_CoreSchedContextBytes
is the size of sched_context_t + minimum refills, excluding any extra
refills.

We'd write it that way, but sched_context_t is not in scope in this
file.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-03-06 21:54:08 +11:00
Nick Spinale
b291e943e5 libsel4: expose .pbf files
To enable access by external tools.

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2023-03-01 09:42:58 +11:00
Klim Tsoutsman
d90fada8b3 libsel4: update seL4_NBWait attributes
Currently, building `libsel4` as a static library with `KernelIsMCS`
enabled fails with the following error:

```
static declaration of 'seL4_NBWait' follows non-static declaration
```

This [was mentioned][1] in the original PR that modified exported
functions to use `LIBSEL4_INLINE_FUNC`.

[1]: https://github.com/seL4/seL4/pull/101#issuecomment-442010551

Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
2023-01-17 09:08:07 +11:00
Peter S. Housel
8ca4a87c9a Add Quartz64 support
This adds support for the Pine64 Quartz64 and other devices based on
the Rockchip RK3566. The platform support is adapted from the
Rockpro64 code, except that the RK356x has A55 cores, and adjusting
for the fact that the ARM Generic Timer is the only on-chip timer
available.

Signed-off-by: Peter S. Housel <housel@acm.org>
2022-11-21 16:43:20 +11:00
Axel Heider
548a81a057 riscv: support qemu-riscv-virt platform
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-13 11:53:54 +11:00
Axel Heider
1d19d9f576 qemu-arm-virt: add more supported CPUs
Also reject any unknown CPU.

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-13 11:53:54 +11:00
Michael McInerney
bb6a00ffe2 mcs: correct MinSchedContextBits
This also adds a compile assert for checking that MinSchedContextBits
is the correct size in relation to seL4_CoreSchedContextBytes.

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2022-11-04 13:39:02 +11:00
Axel Heider
6e1bb9d2a8 cleanup deprecated.h header files
Add a comment that they are empty on purpose. They are not removed to
keep the infrastructure in case there will be deprecated items in the
future.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-10-04 10:48:50 +11:00
Axel Heider
481ce9d5ed remove deprecated header files
Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-10-04 10:48:50 +11:00
Jimmy Brush
b316072daa x64: fix sysenter syscalls
The MCS-related macros were causing the build to fail when configured to
use the sysenter instruction. Additionally, some message registers
weren't explicitly being passed to the assembly block for
seL4_NBSendRecv in this configuration.

Signed-off-by: Jimmy Brush <code@jimmah.com>
2022-05-23 14:22:04 +10:00
Ivan Velickovic
8fad907adc docs: clarify arch_flags in TCB register syscalls
For writing/reading/copying TCB registers, the
arch_flags parameter is not used on RISC-V (in
addition to x86 and ARM).

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
2022-05-19 19:09:47 +10:00
Stephen Williams
55fde27e10 Add support for the Avnet MaaXBoard
Signed-off-by: Mark Jenkinson <mark.jenkinson@capgemini.com>
Co-Authored-By: Stephen Williams <stephen.williams@capgemini.com>
2022-05-11 17:31:07 +10:00
Kent McLeod
8e227395a0 aarch64: Remove reserved VSpace slots from API
Now that there is no need to reserve page table entries in each VSpace
object, the full architecture specified address space range is usable.

Signed-off-by: Kent McLeod <kent@kry10.com>
2022-03-24 20:26:15 +11:00
Axel Heider
83a02a96fc python: use '#paragma once' include guard
Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-03-23 17:28:07 +11:00
matt rice
97610e1249 xml: remove condition attribute
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
311d4a0a34 libsel4/tools: use condition element
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
accccf3dbb add condition elem, test it against condition attr
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
6bc6b31816 add optional condition element to xsd
The condition element currently exists parallel
to the condition attribute.  The condition attribute
should be removed in a subsequent patch.

Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
b0d70f1ebc add libsel4/tools/sel4_idl.xsd to replace dtd
No intended changes to the schema, just change
the schema from dtd to xsd, and update ci to use it.

Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
a961f9e46c Some more dtd simplifications
Allow 0 or 1 description and 0 or more errors.

Signed-off-by: matt rice <ratmice@gmail.com>
2022-02-07 13:36:04 +11:00
matt rice
5a39ae3f81 remove usage of ANY in dtd
This patch restricts mixed-content elements from ANY
to the various leaf nodes which are used.

This is intended to allow for easier parsing in languages with
no recursive datatypes like rust.
Since they no longer have to handle things like
'<description> text
   <description>more text</description>
<description>'

which the dtd allowed for, but never used.

tested with:

for i in {libsel4/arch_include/*/interfaces/,\
libsel4/include/interfaces/,\
libsel4/sel4_arch_include/*/interfaces}/*.xml;
do
     xmllint --noout --dtdvalid libsel4/tools/sel4_idl.dtd $i;
done

Signed-off-by: matt rice <ratmice@gmail.com>
2022-02-07 13:36:04 +11:00
Wojciech Sipak
19f0fea91d add Rust support in stub generator
This adds an alternative script for syscall_stub_gen.py
syscall_stub_gen_rs.py was initially derived from Robigalia project
which can be found here: https://gitlab.com/robigalia/sel4-sys
However, this is no longer compatible.

The script is intended to be used with a proper sel4-sys crate
in order to allow Rust applications to interface with the seL4 API.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
Signed-off-by: Karol Gugala <kgugala@antmicro.com>
2022-02-04 23:02:35 +11:00
Kent McLeod
abeba041f6 libsel4,ia32: Add missing comma to asm statement
Fixes a syntax error on libsel4 on ia32 with position independent code
compilation options.

Signed-off-by: Kent McLeod <kent@kry10.com>
2022-01-31 09:56:26 +11:00
Axel Heider
0218cf086d simplify macro seL4_CompileTimeAssert()
Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-01-24 22:24:03 +11:00