Commit graph

85 commits

Author SHA1 Message Date
Ivan Velickovic
973cbf4e08 Add support for ARM Cortex-A76
This micro-arch is used by the RPi5.

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
2026-07-07 13:30:25 +10:00
Gerwin Klein
b161c3fe98 configs: add all current RISC-V platforms
All current non-simulation RISC-V platforms are now supported by the
proofs.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2026-07-02 13:49:01 +01:00
Gerwin Klein
807df568b9 configs: add stm32mp2 verified config
The proofs pass for this config unchanged.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2026-07-02 13:49:01 +01:00
Michael McInerney
d82b2049a7 mcs: add cmake file for verified AARCH64 MCS
To build the verified configuration of AARCH64 MCS.

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2026-06-12 08:46:13 +10:00
Indan Zupancic
f32f2a53d2 Export timer frequency to user space
Useful for configuring domains.

Signed-off-by: Indan Zupancic <indan@nul.nu>
2026-03-24 15:03:39 +11:00
Kent McLeod
4cdc428082 CMake style all changed files
Signed-off-by: Kent McLeod <kent@kry10.com>
2026-03-12 11:28:26 +11:00
Kent McLeod
bfb45ec550 gh-548: Update use of cmake_minimum_required cmd
Only call the command on CMake files that may be the first file
evaluated from the project. Remove from all other files.

Signed-off-by: Kent McLeod <kent@kry10.com>
2026-03-12 11:28:26 +11:00
Gerwin Klein
3cb4dc0665 trivial: update cmake style
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2026-02-16 14:50:05 +11:00
Gerwin Klein
d2341c88d9 arm,smc: set SMC to on for verified AArch64
The AArch64 kernel now has verification support for SMC caps. Remove
dependency of KernelAllowSMCCalls on "NOT KernelVerificationBuild" and
set KernelAllowSMCCalls to ON by default for AArch64 verification
builds.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2026-02-16 14:50:05 +11:00
Gerwin Klein
0811613ed7 configs: add remaining verified Arm configs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-10-10 14:36:43 +11:00
julia
f13f37a6a7 cmake: clearly complain for invalid platforms
Previously, this would error with a (confusing) warning since #546 about

    Variable 'KernelArch' is not set

sel4test/settings.cmake had some code which complained about an invalid
platform, but it only ran if the kernel was found correctly:

    set(valid_platforms ${KernelPlatform_all_strings})
    set_property(CACHE PLATFORM PROPERTY STRINGS ${valid_platforms})
    if(NOT "${PLATFORM}" IN_LIST valid_platforms)
        message(FATAL_ERROR "Invalid PLATFORM selected: \"${PLATFORM}\"
    Valid platforms are: \"${valid_platforms}\"")
    endif()

Because of the CMake cache, if a correct platform was set, *then* an
incorrect platform, you could see this error, as the KernelArch would be
retained between builds in the cache. (Note: because of the cache, the
error message within the kernel is not triggered if we go from a valid
to an invalid platform. However the sel4test/settings.cmake one is).

Previously:

- If no platform is specified:

    sel4test/build$ ../init-build.sh
    loading initial cache file sel4test/projects/sel4test/settings.cmake
    -- Set platform details from PLATFORM=
    --   KernelPlatform:
    -- Found seL4: sel4test/kernel
    CMake Error at sel4test/kernel/configs/seL4Config.cmake:185
    Variable 'KernelArch' is not set.
    Call Stack (most recent call first):
    sel4test/kernel/FindseL4.cmake:21 (include)
    settings.cmake:32 (sel4_configure_platform_settings)

- If an invalid platform is specified:

    sel4test/build$ ../init-build.sh -DPLATFORM=Cheshire
    loading initial cache file sel4test/projects/sel4test/settings.cmake
    -- Set platform details from PLATFORM=Cheshire
    --   KernelPlatform: Cheshire
    -- Found seL4: sel4test/kernel
    CMake Error at sel4test/kernel/configs/seL4Config.cmake:185
    Variable 'KernelArch' is not set.
    Call Stack (most recent call first):
    sel4test/kernel/FindseL4.cmake:21 (include)
    settings.cmake:32 (sel4_configure_platform_settings)

Now, it looks like:

- If no platform is specified:

    sel4test/build$ ../init-build.sh
    loading initial cache file sel4test/projects/sel4test/settings.cmake
    -- Set platform details from PLATFORM=
    --   KernelPlatform:
    -- Found seL4: sel4test/kernel
    CMake Error at sel4test/kernel/configs/seL4Config.cmake:180
    Variable 'KernelPlatform' is not set - is PLATFORM '' correct? Valid
    platforms are
    'allwinnerA20;am335x;apq8064;ariane;bcm2711;bcm2837;cheshire;...'
    Call Stack (most recent call first):
    sel4test/kernel/FindseL4.cmake:21 (include)
    settings.cmake:32 (sel4_configure_platform_settings)

- If an invalid platform is specified:

    sel4test/build$ ../init-build.sh -DPLATFORM=Cheshire
    loading initial cache file sel4test/projects/sel4test/settings.cmake
    -- Set platform details from PLATFORM=Cheshire
    --   KernelPlatform: Cheshire
    -- Found seL4: sel4test/kernel
    CMake Error at sel4test/kernel/configs/seL4Config.cmake:180
    Variable 'KernelPlatform' is not set - is PLATFORM 'Cheshire'
    correct? Valid platforms are 'allwinnerA20;am335x;apq8064;...'
    Call Stack (most recent call first):
    sel4test/kernel/FindseL4.cmake:21 (include)
    settings.cmake:32 (sel4_configure_platform_settings)

- If a valid platform is specified:

    sel4test/build$ ./init-build.sh -DPLATFORM=cheshire
    loading initial cache file sel4test/projects/sel4test/settings.cmake
    -- Set platform details from PLATFORM=cheshire
    --   KernelPlatform: cheshire
    -- Found seL4: sel4test/kernel
    -- platform cheshire supports multiple architectures, none was given
    --   defaulting to: riscv64
    -- Found GCC with prefix riscv64-none-elf-

Signed-off-by: julia <git.ts@trainwit.ch>
2025-07-28 12:02:16 +10:00
julia
3c19196bda Apply style changes to configs/seL4Config.cmake
Signed-off-by: julia <git.ts@trainwit.ch>
2025-07-28 12:02:16 +10:00
Gerwin Klein
29803c51ca configs: mark Ultra96v2 as supported by the proofs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-04-01 09:57:28 +11:00
Gerwin Klein
8d85057b06 configs: remaining verified aarch64 configs
This adds verified configs for all remaining supported AArch64 boards.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-02-28 14:39:57 +11:00
Kent McLeod
bf3fbef460 riscv: Change default FPU extensions to ON
This changes the default configuration values of the build options:
KernelRiscvExtF and KernelRiscvExtD from OFF to ON.

The options control whether the kernel will support user applications
that use either of the floating point extensions. When these options are
off, FPU instructions will cause an exception.

Arm and x86 default FPU architecture support to ON and so this change is
making the default option consistent across architectures.

Signed-off-by: Kent McLeod <kent@kry10.com>
2025-02-21 18:39:00 +11:00
Gerwin Klein
c5b23791ea configs: additional verified platforms
With recent proof improvements the proofs now apply to further platforms
in the ARM and AARCH64 configurations.

Refactor the verified configs to build on one include file per major
architecture which is then used for each platform with potentially
modified settings. Add path argument to `cmake_script_build_kernel`
macro to accommodate inclusion from different locations in the file
system.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-10-25 16:23:44 +11:00
Gerwin Klein
4b7c2a315f
configs: add zynqmp and rpi4 to verified platforms
The AARCH64 config now also works for functional correctness on
zcu102/zcu106 and rpi4.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-07-08 14:17:49 +10:00
Axel Heider
b59fa0ed20 riscv: use MAX_IRQ instead of PLIC_MAX_NUM_INT
Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-11-24 09:57:46 +00:00
Axel Heider
d2027a1fb9 cmake: rework macro declare_seL4_arch()
Support multiple architectures as parameter.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-11-23 11:53:46 +00:00
Gerwin Klein
18fef090ac
configs: pick exynos5 config from exynos5-ver
Use `ARM_HYP_verified.cmake` from branch exynos5-ver as
`ARM_HYP_exynos5_verified.cmake` on master, so both can be used by
verification CI without switching branches.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-05 10:57:20 +10:00
Gerwin Klein
eb279b5d24
configs: pick imx8mm config from imx8-fpu-ver
Use `ARM_verified.cmake` from branch imx8-fpu-ver as
`ARM_imx8mm_verified.cmake` on master, so both can be used by
verification CI without switching branches.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-05 10:57:20 +10:00
Gerwin Klein
cd8e5c068c
configs: turn FPU off for base verification builds
Turn FPU off by default for the verification builds we have so far.
Only the imx8mm branch currently supports FPU for AArch32.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-06-05 10:57:19 +10:00
Axel Heider
2826d3b0f4 cmake: define KERNEL_ROOT_DIR
Avoid redundancy.

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2023-05-12 12:04:58 +10:00
Gerwin Klein
f11b2a58ef config typo: KernelMaxNumBootinfoUntypedCap
The verified configs have a typo in the name of the
KernelMaxNumBootinfoUntypedCaps setting, which is then ignored by the
build system and the default is used if not otherwise set.

Remove the instances that have been ignored so far and replace with
the default value if they are not otherwise set. This means there is
no actual config change.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-05 16:46:06 +10:00
Matthew Brecknell
843b944a31 configs: Use only BV-compatible optimisations
For verified configurations on which we perform binary verification,
ensure that we disable certain whole-program optimisations that are
incompatible with binary verification.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2023-03-03 20:41:39 +11:00
Kent McLeod
a90f0101c0 AARCH64_verified: Disable SMMU
Verification target isn't including SMMU at the moment.

Signed-off-by: Kent McLeod <kent@kry10.com>
2023-03-02 14:35:13 +11:00
Kent McLeod
6702f3322e ARM_SMMU: Fix configuration handling for SMMU opt
The TX2 is currently the only platform that supports CONFIG_ARM_SMMU and
wants it on by default, however the CMake scripts wouldn't allow it to
be disabled. Now it should work normally:
- When TX2 is set the config is enabled unless it's preconfigured to
  OFF.
- When the platform is changed to not TX2, the SMMU option is turned
  off.

Signed-off-by: Kent McLeod <kent@kry10.com>
2023-03-02 14:35:13 +11:00
Axel Heider
e22412b2be cmake: add a sanity check
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-09-30 11:21:03 +02:00
Indan Zupancic
4a7d08def0 MCS, ARM: Introduce TIMER_OVERHEAD_TICKS
For ARM currently TIMER_PRECISION exists, but that is in microseconds
and not fine-grained enough.

This is needed to make periodic tasks synchronous with the system clock.
If this value is zero every period will be extended with the overhead of
taking an interrupt and reading the system clock. To avoid this drift,
the configured value should be set to at least the average overhead.

See also issue #844.

Signed-off-by: Indan Zupancic <Indan.Zupancic@mep-info.com>
2022-05-23 16:31:45 +10:00
Gerwin Klein
99a4272608 config: AARCH64 config for verification
For ongoing verification of seL4 on AArch64. This config has SMMU and
hypervisor support enabled. AArch64 also implies FPU support is on.
The target board for now is the TX2, which has an SMMU.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-01-19 09:32:50 +11:00
Kent McLeod
35fed131b0 ARMv6: Remove architecture support
Remove all support for ARMv6 architectures now that all platforms and
CPUs that use this architecture have been removed.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-09-30 18:07:19 +10:00
Kent McLeod
449855855d ARM11: Remove CPU support
Remove support for ARM1136JF_S ARMv6 CPU as ARMv6 support is being
removed.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-09-30 18:07:19 +10:00
Ben Leslie
7f6f0008a9 Add additional cmake checks
Verify that KernelArch and KernelWordSize have been correctly
set after including the platform cmake files.

Signed-off-by: Ben Leslie <benno@brkawy.com>
2021-09-06 13:14:20 +10:00
Ben Leslie
5fb0a945bd Add 'x' bit to *verified.cmake
The verified.cmake files are designed to be executable scripts.
Ensure all have the 'x' bit.

Signed-off-by: Ben Leslie <benno@brkawy.com>
2021-09-03 14:39:28 +10:00
Kent McLeod
b05d681621 cmake: Add seL4Config.cmake include CMakeLists.txt
seL4Config.cmake is responsible for generating a valid
CMAKE_TOOLCHAIN_FILE and setting up platform config options at the start
of the build. The CMAKE_TOOLCHAIN_FILE variable has to be set before the
first cmake `project()` function is processed to take effect.
Previously this file was required to be imported in a CMake script
before the kernel's CMakeLists.txt could be processed. This prevented
the main CMakeLists.txt file from being used without an additional
configuration file:
cmake -G Ninja -C ../configs/ARM_verified.cmake ../

Now it is possible to do:
cmake -G Ninja -DKernelPlatform=imx6 -DKernelARMPlatform=sabre ../

This should make it easier to invoke CMake for building kernel
configurations from other build environments.

Because this file is now imported in the Kernel's CMakeLists.txt
context, there is no longer a requirement to save all the intermediate
settings into the cache and then read them out again.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-08-19 09:24:31 +10:00
Curtis Millar
84e8509997 Add ARM Cortex A55
This adds basic support for the ARM Cortex A55 cpu core as is used in
the Amlogic S905x3 that is found in the ODroid C4.

Signed-off-by: Curtis Millar <curtis@curtism.me>
2021-07-09 14:05:05 +10:00
Kent McLeod
7b0602c5f7 cmake: Apply KernelAArch64SErrorIgnore setting
KernelAArch64SErrorIgnore needs to be saved into the cache in
seL4Config.cmake if it is set by any platform's config.cmake.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-06-10 11:08:13 +10:00
Axel Heider
e1e26c7ef8 CMake: cleanup KernelSel4ArchArmHyp
Don't create CONFIG_ARCH_AARCH32 on every platform and architecture.
Remove KernelSel4ArmHypAarch32.

Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-06-09 09:51:07 +10:00
Curtis Millar
f0e8f4cf0f trivial: Remove executable permission on MCS
Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-04-29 11:51:54 +10:00
Curtis Millar
295a5b2818 Rename MAX_BUDGET to MAX_PERIOD
As this variable bounds both the period and the budget and the period
itself bounds the budget, the name for this variable would be more
appropriately named 'MAX_PERIOD'

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-04-29 11:51:54 +10:00
Curtis Millar
7749b33589 Don't assume timer precision is passed
the function is not always passed the TIMER_PRECISION argument. If it is
not, we should not set the global varaible.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-04-06 11:39:03 +10:00
Matthew Brecknell
9ec5df5fa8 riscv: more efficient clz and ctz
For RISC-V platforms that do not provide machine instructions to count
leading and trailing zeros, this commit includes more efficient library
functions. For verification, we expose the bodies of the functions to
the proofs.

Kernel config options `CLZ_BUILTIN` and `CTZ_BUILTIN` allow selection of
whether compiler builtin functions should be used. These are only
supported on platforms where the builtin compiles to inline assembly. By
default, the options are on for all platforms except RISC-V.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2021-03-23 14:43:34 +11:00
Lukas Graber
2a0e5a2a1f Bring Raspberry Pi 4 (RPi4) support
Signed-off-by: Lukas Graber <lukas.graber@hensoldt-cyber.de>
2021-03-22 11:41:03 +11:00
Axel Heider
d36ec062a0 CMake: fix comment with usage example
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-03-03 11:47:23 +01:00
Axel Heider
800b2444a1 trivial: style and formatting
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-03-03 11:47:23 +01:00
Axel Heider
e62bd5b31d CMake: remove deprecated variables
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-02-02 02:34:47 +01:00
Axel Heider
651fb65017 CMake: inline set_kernel_32() and set_kernel_64()
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-02-01 18:23:42 +01:00
Ben Leslie
5b611a0d03 Add basic build support for A35 core
The A35 core is available on some recent ARMv8 SOCs (such as the
NXP i.MX8X family).

This change enables building for the A35, however no platforms
currently target the A35. It is an enabler for future platform
support additions.

Signed-off-by: Ben Leslie <benno@brkawy.com>
2020-12-08 09:34:54 +11:00
Oliver Scott
6ad15c0f45 trivial: clean up code for C parser
Remove unused cases and add break in switch statements.
Add conditions to sel4arch.xml.
Change guard in capdl printing to correct TK1_SMMU.
Set KernelArmSMMU default to off.
Add types to aarch32 syscall_stub_gen.py.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Oliver Scott
c66d9cee7a trivial: style and comment
Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00