Commit Graph

4235 Commits

Author SHA1 Message Date
Matthew Brecknell
17b6d0ed07 ci: Add job for cpp-compatible updates to MCS
When seL4 master is updated, the preprocess-deploy workflow tests
whether the change affects the prepocessed sources seen by verified
configurations. If not, then the development verification-manifest is
automatically updated to the new commit.

Previously, this was only done for the non-MCS manifest (devel.xml).
This commit implements the same process for the MCS manifest (mcs.xml).
2022-12-09 12:27:02 +11:00
Axel Heider
2493fc1c57 doc: fix typo
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-12-03 09:04:31 +11:00
Axel Heider
3ff55cdb0f risc-v: limit memory to 2 GiB on RV32
Co-authored-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-12-03 08:21:29 +11:00
Axel Heider
838b9a4331 risc-v/plic: support rv32 targets
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-12-03 08:21:29 +11:00
Axel Heider
2d7ded68c6 use macro ARRAY_SIZE
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-23 16:26:30 +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
Gerwin Klein
bbafa62d30 github: update to Isabelle2022
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-21 15:59:06 +11:00
Gerwin Klein
ab30e1cad6 github: bump action deps to node16 actions
GitHub has deprecated the old node12-based actions.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-21 15:59:06 +11:00
Axel Heider
3bb6bc2a60 zynq7000: fix DTS overlay on MCS
Apply changes from commit 0f619780 for MCS also

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-21 09:59:05 +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
9b4ce51a65 cmake: extend qemu-arm-virt script
- makes setting more generic an allow overriding parameters
- save QEMU parameters in DTS as comment

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
Axel Heider
136e36e553 cmake: use built-in whitespace handling
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-13 11:53:54 +11:00
Gerwin Klein
fa4dfa93e4 github: enable sel4bench hardware test on PR
Like the sel4test hardware runs, a sel4bench run can be requested via
adding a label (`hw-bench`) to any PR.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-11-11 17:08:57 +11:00
Axel Heider
ceae4620aa x86/ia32: use proper variable in debug code
Fix issues from refactoring in commit 27b4411e

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-11 13:52:25 +11:00
Axel Heider
1e38178832 aarch32: fix define check
Fix wrong name used in refactoring of commit 4b491dcf

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-11 13:52:25 +11:00
Axel Heider
72aeea983a boot/arm: remove activate_global_pd usage
activate_global_pd is just an alias for activate_kernel_vspace nowadays

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-11-11 09:03:57 +11:00
Jorge Pereira
344affd3d4 gic_v3: fix EOImode bit number
Signed-off-by: Jorge Pereira <jorgepereira89@gmail.com>
2022-11-07 22:05:14 +01:00
alexkaiser
29c459aadb polarfire: fix scheduler preemption test error
The clock frequency on the mpfs icicle kit is 1 MHz so the
TIMER_FREQUENCY polarfire config was changed to 1 MHz (was 10 MHz). This
fixes the errors seen duration the scheduler preemption test.

Signed-off-by: Alex Pavey <Alex.Pavey@dornerworks.com>
2022-11-06 18:31:54 +11:00
Jesse Millwood
e2ae959ceb polarfire: fix address for timer in dts
Signed-off-by: Alex Pavey <Alex.Pavey@dornerworks.com>
2022-11-06 18:31:54 +11:00
Jesse Millwood
48ee2f07c7 Polarfire: Made timer dts node 4k region
Signed-off-by: Alex Pavey <Alex.Pavey@dornerworks.com>
2022-11-06 18:31: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
b07d653bdb boot: remove unused return values
Remove the return value from configure_sched_context(), because it never
fails. As a consequence, create_idle_thread() also never fails and does
not need a return value.

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-10-30 19:54:02 +11:00
Indan Zupancic
2a8c9683f3 MCS, SMP: Add clock synchronisation test
Because ksCurTime is compared cross-node now, time across
nodes must be the same. Check this once during boot.

Replace __atomic_signal_fence with the more correct
__atomic_thread_fence, as ksNumCPUs will be changed
cross-node.

Signed-off-by: Indan Zupancic <Indan.Zupancic@mep-info.com>
2022-10-28 10:39:30 +11:00
Indan Zupancic
04c096128b Cleanup refill_new
Remove the now unused core argument from refill_new and replace all
REFILL_NEW calls with direct calls.

Signed-off-by: Indan Zupancic <Indan.Zupancic@mep-info.com>
2022-10-28 10:39:30 +11:00
Indan Zupancic
ba262f6d75 Do not use cross-node ksCurTime
The code using ksCurTime assumes that ksCurTime is up-to-date,
but this assumption is wrong for ksCurTime of other CPU cores.
Those can be quite some time in the past.

The implications of using NODE_STATE(ksCurTime) is that clocks
on all cores must be synchronous:

- Riscv is okay: The specification states: "The real-time clocks
  of all hardware threads in a single user application should be
  synchronized to within one tick of the real-time clock."
- x86 okay if not ancient when Invariant TSC is supported.
- aarch64 is okay.
- arm32: arm_global.h is okay. Exynos timer seems okay. am335x and
  omap3430 are single-core.

See also #854.

Signed-off-by: Indan Zupancic <Indan.Zupancic@mep-info.com>
2022-10-28 10:39:30 +11:00
Axel Heider
0c8c386394 fastpatch: use thread passed as parameter
Use the thread passed as parameter instead of making assumption that
this is in sync with the global state.

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-10-28 09:20:47 +11:00
Michael McInerney
3cf859a2f8 mcs: modify GHOST_UPD comment for verification
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2022-10-27 11:37:25 +11:00
Joonas Onatsu
8b22630929 kernel,bcm2711: Remove redundant reserved mem
Remove redundant (and incorrect) reserved memory
definition for VideoCore memory. The reserved
memory area is defined in 'overlay-rpi4.dts'.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Joonas Onatsu
cb8010176a kernel,bcm2711: Update comment about RPi4 mode
RPi4 is definitely running in low peripheral
mode by default.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>

kernel,bcm2711: Fix RPi4 DTS overlay

The build system mishandling of disjunct
memory areas seems to no longer be true.
It may have been a bug in build system/env,
so remove the comment about it and update
memory node accordingly.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>

kernel,bcm2711: Remove leftover comment

Remove leftover comment about adding DMA
dedicated reserved memory areas.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Markku Ahvenjärvi
54ed6f8fa9 kernel,rpi3/4: system timer dts overrides
Translate system timer address, and remove IRQs for
channels 0 and 2. These channels are used by VideoCore,
having them defined causes a spam of spurious interrupts.

Signed-off-by: Markku Ahvenjärvi <markkux@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Hannu Lyytinen
0de322929c kernel,bcm2711: remove UART pinmux
Signed-off-by: Hannu Lyytinen <hannux@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Hannu Lyytinen
1a9b776e4f kernel,bcm2711: Add RPi4 memory map
Signed-off-by: Hannu Lyytinen <hannu.lyytinen@unikie.com>

kernel,bcm2711: Fix RPI4 address mapping

Fix build error and warnings by removing GPIO mapping
from overlay. Also as a note, don't add 'serial1' or 'ethernet'
here, because 'serial1' is already mapped to sel4 kernel by
'chosen' block in 'overlay-rpi4.dts', and the translation for
the 'ethernet' is done with 'ranges' property.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>

kernel,bcm2711: Fix memory area overlay DTS

First fix is to change the memory area reserved for
the VideoCore from 64 -> 76 MB, as this is the default
value on RPi4. Using other values would require configuration
of the first stage bootloader with 'config.txt' file.

Second fix is separating the disjunct memory areas
to separate nodes, as the generator Python scripts
in 'kernel/tools/' etc discarded the first area below
1GB limit if all areas were defined in the same node.
The effect of different variations can be observed
during kernel build in the generated
'kernel/gen_headers/plat/machine/devices_gen.h' header.

Third fix is adding the reserved memory area for the
VideoCore memory to avoid any collisions.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Joonas Onatsu
ae332c0e5d kernel,bcm2711: Mark first memory page as reserved
See commit e22089d0c (rpi3: Mark first memory page
as reserved, 2021-07-12) for more details. Same thing
applies to RPi4 also regarding the spin tables
and secondary cores.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Chris Guikema
7ac893897c zynqmp: remove hypervisor overlay
This was only required since the PCI bus was generating devices that
were too large when running in hypervisor mode. That behavior has been
fixed, so the overlay is not needed.

Signed-off-by: Chris Guikema <chris.guikema@dornerworks.com>
2022-10-23 05:23:31 +11:00
Chris Guikema
da39051cbe gcc: add x86 cross-compiler for arm host
When compiling in the Docker container on an M1 MacBook, or any other
ARM host, the CMAKE_HOST_APPLE variable is not set. Therefore, no
CROSS_COMPILER_PREFIX is set and x86 applications will not compile.

This commit adds another check to see if the host processor is an ARM
chipset, and sets the appropriate CROSS_COMPILER_PREFIX variable.

Signed-off-by: Chris Guikema <chris.guikema@dornerworks.com>
2022-10-23 03:51:01 +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
Axel Heider
9c083b84ef make macro less obscure
- explicitly mention the parameter to make macro less obscure.
- add brackets to make the expression an atom.

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-10-01 10:16:32 +02:00
Axel Heider
b5b5b6ebdd remove redundant definitions
Align with changes from commit b181184 that turned the macros into
functions.

Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-09-30 11:23:57 +02: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
Axel Heider
5c631eeeb8 trivial: fix typo
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
2022-09-29 08:59:39 +02:00
Yanyan Shen
e4c5bf242c aarch64: Use isb after changing FPU ctrl registers
Signed-off-by: Yanyan Shen <yshen@hybridkernel.com>
2022-09-22 10:13:13 -07:00
Axel Heider
6dd3a18065 re-use existing functions to avoid redundancy
Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-09-15 11:25:04 +02:00
Peter Chubb
b7ff28c73f Fix compilation with CLANG > 11 (#909)
* Fix compilation with CLANG > 11

LLVM 12 makes -moutline-atomics on by default;
turn it off.

Signed-off-by: Peter Chubb <peter.chubb@unsw.edu.au>
2022-09-15 06:29:38 +10:00
Michael McInerney
b7f2a1fb6f mcs: remove unused tcbReply field from tcb struct
The pointer to a reply object, if any, can be accessed
via the replyObject in the thread state

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2022-09-13 13:21:20 +02:00
Peter Chubb
1cc31664cc Fix gcc-12 spurious array bounds warning (#904)
* Fix GCC-12 warnings (treated as errors)

This addresses bug #875.

Unfortunately, added a command line parameter to gcc is not backaward
compatible with other versions of GCC.  So use a #pragma in the only
file that's a problem.

Signed-off-by: Peter Chubb <peter.chubb@unsw.edu.au>
2022-08-31 17:00:34 +10:00
Peter Chubb
d84f3fcb4a Add newer Skylake model ID
At least some server-class Skylake processors use 0x55 as
their model ID.
These are Skylake X processors.

Signed-off-by: Peter Chubb <peter.chubb@unsw.edu.au>
2022-07-29 17:01:32 +10:00
Ahmed Charles
c92b3b3163 Add __repr__ for WrappedNode
Signed-off-by: Ahmed Charles <acharles@outlook.com>
2022-07-20 16:37:33 +10:00
Ahmed Charles
a6c2b5f404 Fix incorrect type
Signed-off-by: Ahmed Charles <acharles@outlook.com>
2022-07-19 16:50:42 +10:00