No description
Find a file
Viktor Sannum e22089d0cc rpi3: Mark first memory page as reserved
When the kernel is built the build system is responsible for finding
a suitable physical memory location where the kernel can be put on
the given target platform.
This is recorded into the kernel.elf file and read by the elfloader
program when it loads the kernel to that memory address.

In order to find memory blocks to avoid, the build system looks for
the /reserved-memory node in the target platform's device tree dts,
along with other device memory blocks.

The bcm2837 / Raspberry Pi 3 bootloader uses the first memory page
at address 0x0 to load a so called armstub which is used to set up
the ARM processor's initial state. It is also used to "park" the
secondary cores by putting them in a spin loop located within the
armstub from which the boot core can release them when ready.

The rpi3.dts already contains a /memreserve/ node reserving this
page, however as the build system only looks for the standardized
reserved-memory node it promptly disregards it and allow the kernel
to be loaded at physical address 0x0, overwriting the armstub.

A side effect of this is that the spinloop code also is overwritten,
potentially releasing the secondary cores to execute whatever kernel
code is written in the place of their spinloops, causing all kinds
of undefined behavior dependent on both race conditions and kernel
elf layout. It also implies that the kernel SMP boot code would not
be able to release the cores if implemented for the platform.

This patch adds the /reserved-memory node to the overlay-rpi3.dts
file and a child node reserving the memory region for the first
memory page. This in effect causes the kernel to instead be loaded
to 0x1000000 (aligned to a supersection).

Co-authored-by: Axel Heider <axelheider@gmx.de>
Signed-off-by: Viktor Sannum <sannum.viktor@gmail.com>
2021-10-14 10:45:15 +11:00
.github/workflows github/proofs: update to Isabelle2021 2021-10-01 10:01:17 +10:00
.reuse dep5 file for additional license information 2020-03-09 18:00:18 +08:00
configs ARMv6: Remove architecture support 2021-09-30 18:07:19 +10:00
include remove Arch_finaliseInterrupt() 2021-10-01 15:18:51 +10:00
libsel4 armv6: Remove remaining armv6 specific features 2021-09-30 18:07:19 +10:00
LICENSES manual: apply foundation branding 2021-06-17 20:19:51 +10:00
manual manual: bring intro up-to-date 2021-09-30 18:07:19 +10:00
src rpi3: Mark first memory page as reserved 2021-10-14 10:45:15 +11:00
tools hardware.py: Create smaller UT at end of addresses 2021-10-03 10:10:43 +11:00
.cmake-format.yaml SMMU: providing master control caps to root task 2020-10-28 17:30:42 +11:00
.gitignore Fix .gitignore patterns 2020-06-17 17:27:20 +08:00
.licenseignore update license information in README 2020-03-09 18:00:18 +08:00
CAVEATS-generic.md converted CAVEAT file content into .md 2020-03-11 20:20:09 +08:00
CAVEATS-ia32.md converted CAVEAT file content into .md 2020-03-11 20:20:09 +08:00
CHANGES arm,generic_timer: Add config user access on 32bit 2021-10-02 16:55:43 +10:00
CMakeLists.txt Remove unused PYTHON tool definition 2021-09-14 16:09:33 +10:00
CODE_OF_CONDUCT.md add link to code of conduct 2020-04-01 17:23:36 +08:00
config.cmake Ensure execute_process is error checked 2021-09-14 16:03:51 +10:00
CONTRIBUTING.md contributing: link to TSC 2020-04-07 19:35:33 +10:00
CONTRIBUTORS.md update CONTRIBUTORS.md from repo 2020-03-10 15:30:11 +08:00
FindseL4.cmake Convert license tags to SPDX identifiers 2020-03-09 13:21:49 +08:00
gcc.cmake gcc.cmake: Remove unused CMAKE_STAGING_PREFIX var 2021-09-06 08:23:17 +10:00
gdb-macros Convert license tags to SPDX identifiers 2020-03-09 13:21:49 +08:00
LICENSE.md docs: add link explaining license implications 2021-08-31 14:31:11 +10:00
llvm.cmake riscv: Enable clang 2020-08-26 14:21:35 +10:00
README.md docs: add link explaining license implications 2021-08-31 14:31:11 +10:00
SECURITY.md meta: add vulnerability disclosure policy (#424) 2021-06-30 15:28:52 +10:00
VERSION Update VERSION file to 12.1.0-dev 2021-06-10 16:59:48 +10:00

The seL4 microkernel

CII Best Practices CI seL4Test C Parser Compile Proof Sync RefMan XML

This project contains the source code of seL4 microkernel.

For details about the seL4 microkernel, including details about its formal correctness proof, please see the sel4.systems website and associated FAQ.

DOIs for citing recent releases of this repository:

  • DOI

We welcome contributions to seL4. Please see the website for information on how to contribute.

This repository is usually not used in isolation, but as part of the build system in a larger project.

seL4 Basics

Community

See the contact links on the seL4 website for the full list.

Reporting security vulnerabilities

If you believe you have found a security vulnerability in seL4 or related software, we ask you to follow our vulnerability disclosure policy.

Manual

A hosted version of the manual for the most recent release can be found here.

A web version of the API can be found here

Repository Overview

  • include and src: C and ASM source code of seL4
  • tools: build tools
  • libsel4: C bindings for the seL4 ABI
  • manual: LaTeX sources of the seL4 reference manual

Build Instructions

See the seL4 website for build instructions.

Status

A list of releases and current project status can be found under seL4 releases.

License

See the file LICENSE.md.