Commit graph

3799 commits

Author SHA1 Message Date
Gerwin Klein
c650c41848 github: run SimplExportAndRefine conditionally
The SimplExportAndRefine session is one of the steps of binary
verification and only available for ARM and RISCV64.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-16 11:11:13 +10:00
Gerwin Klein
0665ae3edd github: add C proof check on labelled PR
This action will run the C proofs when the label `proof-test` is added
to a pull request. Intended to be used when the preprocess test has
failed and the PR is ready to check proofs.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-16 08:12:28 +10:00
Axel Heider
913bf483df boot: add UNREACHABLE statements
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-07-12 17:57:00 +10:00
Axel Heider
d34d48fc85 boot: verbosely log boot errors
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-07-12 17:57:00 +10:00
Axel Heider
caf6eb2a6b Set KernelPaddrUserTop correctly on RISC-V
The top phys addr is exclusive, not inclusive. On 64-bit platforms there
is a trivial way to fix this as long as the whole address space is never
used. For 32-bit platforms the fix will be more complicated, so this is
postponed.

Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-07-09 15:27:07 +10:00
Curtis Millar
76b1de0670 Add ODroid C4 support
This adds support for the ODroidC4. The ODroidC4 is just a beefier
ODroidC2 with some bits moved around. The devices we care about here are
all essentially the same except the cores are A55s instead of A53s.

Signed-off-by: Curtis Millar <curtis@curtism.me>
2021-07-09 14:05:05 +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
Gerwin Klein
1dcff9cc20 Add GitHub action for sel4test simulation runs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-05 12:57:20 +10:00
Axel Heider
d55c5cf637 risc-v: remove obsolete file
Remove the latest traces of the hack that RISC-V platforms are spike
instances.

Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-07-05 09:17:33 +10:00
Axel Heider
5fee77b5d7 trivial: remove superfluous empty line
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-07-03 18:47:14 +02:00
Axel Heider
ad4ea6cd08 CMake: unify config options define generation
Add disabled options from the build system as comments in the generated
header files.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 12:05:37 +10:00
Axel Heider
e65906dfa1 debug: always print TIMER_CLOCK_HZ as a uint64
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 11:40:37 +10:00
Axel Heider
32d81495fa boot: make linker definitions generic
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 11:30:19 +10:00
Axel Heider
938c1c9557 boot: fail boot if region configuration is invalid
Also make the output more verbose in case of errors, which is
helpful when porting the kernel to new platforms.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
adbd374370 boot: make create_untypeds_for_region() static
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
c630e54c06 boot: improve code readability
Make the code flow more verbose and log a error message.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
70a8f8c29b boot: make loop variables unsigned
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
5aeee0784e boot: declare loop variables in loop header
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
4138e7e595 macros: avoid compiler warning for helper type
Avoid a warning if GCC parameter '-Wno-unused-local-typedefs' is used.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
8ecf358ba2 macros: improve SEL4_COMPILE_ASSERT
- Add underscored in name to improve readability.
- Add brackets to ensure parameters are atoms
- add comment clarifying c99 usage

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
a16324a588 trivial: move macro definition
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
138e809e72 use const qualifier
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
5ef7dd32db mention macro parameter explicitly
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
abc2f1b0a6 align includes for platform_gen.h.in templates
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Axel Heider
fdb1f74509 trivial: improve code readability
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 10:48:47 +10:00
Gerwin Klein
15d2db1be5 add discourse and link to contacts
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-01 10:26:01 +10:00
Gerwin Klein
dce90836e7 make markdown lint happy
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-01 10:26:01 +10:00
Gerwin Klein
4da101ae24 add CI status badges
Currently only for GitHub actions (but these will be replacing Bamboo
tests in the coming weeks).

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-01 10:26:01 +10:00
Gerwin Klein
45469d3a92 add CII best practices badge
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-01 10:26:01 +10:00
Axel Heider
89e7d01ade trivial: use proper naming
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-06-30 09:51:30 +02:00
Curtis Millar
3bb899bc5f SchedControl_ConfigureFlags requires 3 + 2 args
The flags argument means that the call requires 2 time args (period,
budget) and 3 words (extra refills, badge, flags).

Signed-off-by: Curtis Millar <curtis@curtism.me>
2021-06-30 17:41:10 +10:00
Matthew Brecknell
8afebb55a0
meta: add vulnerability disclosure policy (#424)
This adds a simple vulnerability disclosure policy, loosely based on:
- Disclose.io materials.
- The OWASP Vulnerability Disclosure Cheat Sheet.

Signed-off-by: Matthew Brecknell <matthew@brecknell.net>
2021-06-30 15:28:52 +10:00
Gerwin Klein
c6238208bb github: run C parser on push/PR
This action runs the verification C parser on the main kernel
configurations to check that the code is in the C verification subset.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-06-30 14:04:00 +10:00
Axel Heider
9f90e39550 trivial: fix typo
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-06-25 10:00:20 +02:00
Curtis Millar
613352e832 Always use kpptr_to_paddr for kernel addresses
With this change, even architectures which do not use a distinct region
to map the kernel ELF will use the `kpptr_to_addr` to translate any
address from the kernel region.

This ensures that these accesses are correctly checked for bounds when
used and will make it easier to move the ELF mapping into a distinct
region of virtual address space.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-06-25 16:30:48 +10:00
Curtis Millar
3b6a63bb47 Consolidate and update virt <-> phys translation
Move all of the virtual to physical translation functions into a single
common file and use the updated constants.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-06-25 16:30:48 +10:00
Gerwin Klein
d1643774cd github: CI action to lint libsel4 IDL files
This will lint everything called `sel4*.xml` under `libsel4/`.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-06-22 11:26:17 +10:00
Kent McLeod
08d7cb9049 qemu-arm-virt: Use STATUS messages in cmake
Only emit non-STATUS level messages if there is an error or significant
warning condition during build configuration.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-06-22 10:30:42 +10:00
blackqbit
7a9cf4de10 Update util.h
delete #define FASTCALL     __attribute__((fastcall)) duplication
2021-06-20 12:02:04 +10:00
Axel Heider
d1fb5c01a7 use '#pragma once' include guards
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-06-20 11:53:58 +10:00
Indan Zupancic
106c63e687 Fix gic_dist_map->res9 size
Binary compatible with old code because of padding before iroutern.

Signed-off-by: Indan Zupancic <Indan.Zupancic@mep-info.com>
2021-06-19 11:46:46 +10:00
Axel Heider
7ac7e74400 CMake: clarify log message
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-06-19 11:39:34 +10:00
Axel Heider
c121896068 CMake: don't enforce std channels
According to the CMake documentation, this is intended for file
redirection. Since we don't redirect to files, but basically enforce
std channels, this conflicts with any existing redirection set up when
CMake is invoked. As a result the messages are lost.

Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-06-19 11:39:34 +10:00
Axel Heider
4f9aeadb8b trivial: fix typos
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-06-18 09:33:52 +02:00
Gerwin Klein
95fda2bcc1 github: add a GitHub action to build the manual
This will build a PDF of the reference manual in draft mode
and upload that PDF as a build artifact.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-06-18 08:35:55 +10:00
Gernot Heiser
b1ee44f4b7 Update terminology: s/ARM/Arm/g
Signed-off-by: Gernot Heiser <gernot@unsw.edu.au>
2021-06-17 20:19:51 +10:00
Gerwin Klein
d07f028778 manual: replace old README
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-06-17 20:19:51 +10:00
Gerwin Klein
b545cec00f manual: use more modern draft package
The old draftcopy package doesn't seem to work on newer texlive
installations. We also don't want to pass `draft` to the `report`
style, because that will switch off images.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-06-17 20:19:51 +10:00
Gerwin Klein
34f0666806 manual: apply foundation branding
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-06-17 20:19:51 +10:00
Axel Heider
32728ecd1f trivial: fix typo
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-06-16 13:24:26 +02:00