Commit Graph

4490 Commits

Author SHA1 Message Date
Axel Heider
daf0afad71 trivial/cmake: fix typo in description
Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-04-08 15:50:34 +01:00
Axel Heider
62d9ef8228 cmake: fix style issues
Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-04-08 15:50:34 +01:00
Axel Heider
600ea414e0 trivial/cmake: add missing bracket in comment
Signed-off-by: Axel Heider <axel.heider@codasip.com>
2024-04-08 15:50:34 +01:00
Craig McLaughlin
ed5e7c8e56 boot: Fix root cnode size compile-time assert
The check was not enforcing the minimum radix intended by 5fac9e8 and
still allowed a radix of 4 to be specified.

Signed-off-by: Craig McLaughlin <thecraigmclaughlin@gmail.com>
2024-04-06 10:46:40 +01:00
Krishnan Winter
21d699828d Fix macro to access overflow node
Previously accessing the ccnt_num_overflows
value using the NODE_STATE macro. In SMP
configurations, this looks for this value
in the system node state, however, it
resides in the cpu arch node state. This should
therefore be accessed using the ARCH_NODE_STATE.

Signed-off-by: Krishnan Winter <krishnanwinter1@gmail.com>
2024-03-27 10:57:45 +00:00
Axel Heider
4d7cde075b CI: cancel older concurrent PR runs
Act on PRs only, not on upstreaming.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-03-26 20:56:54 +01:00
Gerwin Klein
4079d4c8b4 github: add AARCH64 C proof session
CRefine is now available for AARCH64 in l4v.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-03-25 17:40:37 +00:00
Axel Heider
271f6cc903 risc-v: make trap_entry a function
Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-03-23 08:48:42 +11:00
Axel Heider
ff422899fc trivial: remove superfluous empty line
Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-03-23 08:48:42 +11:00
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
Gerwin Klein
9b50822b5a remove obsolete .licenseignore
This file was used by the previouse license checking tool, but is
ignored by the `reuse` tool. This means it is now obsolete.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-03-15 19:55:52 +00:00
Indan Zupancic
b527b46dec Arm32: Fix vcpu_hw_write_reg
Forgotten in commit 5bce5c0c1e.

Signed-off-by: Indan Zupancic <indan@nul.nu>
2024-03-15 19:27:37 +01:00
Gerwin Klein
4172bd6170 vcpu: add padding to keep vcpu struct packed
Add padding to keep vcpu struct packed on 32-bit platforms. This doesn't
change the size on 32-bit platforms, because the compiler would insert
padding itself. It does increase the size of the struct by one word
on 64-bit platforms, but it remains below 2^vcpuBits.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-03-14 10:02:43 +01: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
Indan Zupancic
3ccbfc083a RISC-V SMP: Fix Compile Error
Partially revert commit 70d1a5f792.

Can't include arch/machine.h because that will cause
a circular include dependency.

Signed-off-by: Indan Zupancic <indan@nul.nu>
2024-03-13 19:19:39 +01:00
Axel Heider
70d1a5f792 riscv: add read_sscratch()
Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-03-13 11:38:24 +00:00
Axel Heider
72f50774ec style: fix cmake formatting spec
Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-03-11 19:26:48 +00:00
Ivan Velickovic
70c7caf2f8 Fix USER_TOP config option being unconditional
Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
2024-02-29 17:16:56 +11:00
Ivan Velickovic
3740c2902c Fix DDR region for Odroid-C4
The Odroid-C4 is supposed to have 4GB of DDR memory.

According to the SoC manual (S905X3 Revision 02) the
DDR region goes from 0x0 to 0xF57FFFFF in Table 7-1.

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
2024-02-28 19:37:24 +01:00
Ivan Velickovic
903cf7c2a5 Fix Odroid-C4 MAX_IRQ setting
The S905X3 manual (Revision 02) specifies the highest IRQ
to be 255 in section 7.10.2 of the manual.

This issue was encountered when trying to use the PCIe
device on the platform which uses IRQs higher than 250.

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
2024-02-24 11:40:31 +00:00
Gerwin Klein
9a2bbe30b8 changes: describe VCPU fix
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-02-21 12:03:38 +11:00
Gerwin Klein
d26f1ff4d2 vcpu: guard against NULL ptr dereference
The vcpu is not guaranteed to be associated with a TCB at this point,
so access to vcpuTCB must be guarded.

Fixes #1199

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-02-21 12:03:38 +11:00
Kent McLeod
31ca173e17 elfloader: Replace calls to reset_cntvoff
These calls can now be implemented via binding the /timer driver in the
elfloader's device tree configuration.

Signed-off-by: Kent McLeod <kent@kry10.com>
2024-02-19 10:26:36 +00:00
Axel Heider
a8eebabf58 CI: remove obsolete concurrency setup in job
The concurrency is set for the whole workflow already

Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-02-09 12:59:04 +00:00
Gerwin Klein
1a52833c6f github: disambiguate proof artifact upload
Proof artifact upload had name clashes for different artifacts from the
same job that previously would overwrite each other and with v4 actions
now error. This commit disambiguates the names.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-02-09 11:02:49 +11:00
Nick Spinale
9bac64c6ce libsel4: Eliminate unnamed enums
Signed-off-by: Nick Spinale <nick@nickspinale.com>
2024-02-08 15:34:14 +11:00
Nick Spinale
7d3353332a cmake: install object API files under better names
These files cannot be installed under the same names as those in the
source tree because the two named sel4arch.xml conflict. These cannot be
renamed in the source tree because of other projects which expect them
under their current names.

Commit cf80db7ef0 enabled them to be installed them under
non-conflicting names, but those names (sel4.xml, sel4-arch.xml,
sel4-sel4arch.xml) are confusing and too close to the original names.

This commit changes the names they are installed under to be more clear
and descriptive (object-api.xml, object-api-arch.xml,
object-api-sel4-arch.xml).

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2024-02-08 09:17:54 +11:00
Kent McLeod
76eee24323 cmake: Support multiple overlay files
Allow multiple overlay files to be specified. This supports custom
tooling support to add additional memory reserve regions to a platform.

Signed-off-by: Kent McLeod <kent@kry10.com>
2024-02-06 21:52:31 +11:00
Axel Heider
245c07fa2e QEMU/arm: select CPU from architecture
Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-02-06 08:48:19 +11:00
Axel Heider
b770e2d71e CMake, QEMU/arm: fix parser usage
- ${ARGN} was missing
- fail for unknown flags

Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-02-06 08:48:19 +11:00
Rafal Kolanski
c9989664e3 AArch64: mark isFpuEnable as DONT_TRANSLATE
Current verification model does not include lazy FPU switching, i.e. it
acts as if this function always returns true, so no FPU faults could be
produced. In order to guard against deriving a contradiction, we don't
allow the C parser to translate it.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2024-02-02 09:14:07 +11:00
Axel Heider
91ec17c5bf CI: cancel older concurrent PR runs
Remove the space in the workflow name to ensure there are no side
effects when using it as an identifier.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-01-31 10:25:00 +11:00
Axel Heider
eda441ebe7 CI: the seL4/machine_queue repo is public now
Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-01-30 12:26:50 +00:00
Gerwin Klein
64b1282acc aarch64/vspace: type of counter in ASIDPoolAssign
As in the other architectures, avoid unnecessary casts for the loop
counter by making it a word_t.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-30 09:22:41 +11:00
Gerwin Klein
fa28409d55 github: bump GitHub actions to node20
GitHub has updated the LTS node.js version from 16 to 20 and is
starting to show warnings for node16 actions.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-29 10:11:25 +11:00
Gerwin Klein
241d8d12c7 aarch64/vspace: fix error reporting in decode
seL4_InvalidCapability expects invalidCapNumber to be set.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-26 08:52:01 +11:00
Nick Spinale
9ec543ce5a cmake: propagate CROSS_COMPILER_PREFIX
Mark CROSS_COMPILER_PREFIX as meaningful to gcc.cmake, so that it is
propagated for all cases where gcc.cmake used.

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2024-01-25 13:28:23 +11:00
Gerwin Klein
5df6964782 aarch64/vspace: test for page type directly
Test the PTE directly for being of page type and avoid ptr access to
ease verification in unmapPage.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-25 07:32:42 +11:00
Alwin Joshy
6baeeaef21 hw debug api: fix single stepping on ARMv7
The implementation of single-stepping on ARMv7 relies on instruction
mismatch breakpoints. The implementation sets one of the breakpoint
value registers (BVR) to NULL and configures the corresponding
breakpoint control register (BCR) to generate a debug exception for
instructions that are at any other virtual address. This is incorrect
as it means that when single-stepping is enabled, no progress will
ever be made by the thread, as every instruction will mismatch with
NULL and result in the generation of a debug exception.

This commit resolves this issue by setting the BVR to the LR of the
thread at the moment single stepping is configured. Then, when the
thread is permitted to execute again, the instruction pointed to by
the LR will be executed, but any other instruction will result in a
debug exception. It also changes the debug exception hander to
update the BVR to the new LR when a single-stepping execption occurs
so that we can step over multiple instructions before sending a debug
fault to the appropriate fault handler thread.

Signed-off-by: Alwin Joshy <joshyalwin@gmail.com>
2024-01-23 10:34:39 +00:00
Gerwin Klein
cc3205ea48 aarch64/vspace: simplify check for page PTE
- directly test for page PTE types instead of testing for invalid etc.

- remove unnecessary condition `resolve_ret.ptBitsLeft > PAGE_BITS`
  (always true).

- reduce bitfield accesses via pointers to make verification easier.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 14:58:49 +11:00
Gerwin Klein
7f4662a791 Revert "aarch64/vspace: allow flushing larger .."
This reverts commit 494dd2dd96.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 14:58:49 +11:00
Gerwin Klein
494dd2dd96 aarch64/vspace: allow flushing larger pages
- The failure condition `resolve_ret.ptBitsLeft > PAGE_BITS` prevented
  larger page sizes from being flushed in VSpaceRoot invocations.

  Instead of testing for number of bits left to resolve, simply check
  the PTE whether it is a page or not.

- reduce bitfield accesses via pointers to make verification a bit
  easier.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-22 11:29:04 +11:00
Birg
0a0739074d manual: add bibliography to toc
Signed-off-by: Birg <bbrcknl@github.com>
2024-01-22 10:09:11 +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
Gerwin Klein
95cfd473e6 aarch64/vspace: adjust type for verification
Bring the type of `i` into line with what the other architectures do
in this function. This makes it easier to re-use those proofs.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-19 08:50:27 +11:00
Gerwin Klein
0398d34ad0 aarch64/vspace: avoid unnecessary casts
Type invLabel consistently as word_t, not sometimes as unsigned int.
This makes verification easier because it avoids unnecessary casts.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-01-16 12:39:13 +11:00