lh-l4v/spec/haskell
Gerwin Klein 9f25a4e8f6
aarch64 haskell: use ppn concept for PageTablePTEs
Don't store the bottom 12 bits of the base address for page table PTEs,
because we know they are zero. This gives us implicit alignment to
pageBits in the page table walker.

The C code stores only 36 significant bits, whereas this commit still
uses a full 64-bit machine word for the ppn in Haskell. To be adjusted
in a future change.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-25 19:34:16 +10:00
..
include run astyle on all C files in the repository 2020-04-19 13:50:17 +08:00
src aarch64 haskell: use ppn concept for PageTablePTEs 2023-05-25 19:34:16 +10:00
.gitignore haskell: use ghc-9.0.2 and cabal v2 commands 2022-06-24 13:07:17 +10:00
Makefile haskell: use ghc-9.0.2 and cabal v2 commands 2022-06-24 13:07:17 +10:00
README.md licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
SEL4.cabal haskell: use ghc-9.0.2 and cabal v2 commands 2022-06-24 13:07:17 +10:00
Setup.hs haskell: add build configuration for AARCH64 on TX2 platform 2022-04-20 09:16:19 +10:00
configure licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
mkhsboot.pl licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
stack-path licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
stack.yaml haskell: use ghc-9.0.2 and cabal v2 commands 2022-06-24 13:07:17 +10:00

README.md

The seL4 Haskell Model

The sources in this directory can be used to build a Haskell Cabal package containing an executable model of the seL4 kernel. The model cannot run stand-alone; it must be integrated into a simulator that can run user-level binaries and generate events that the kernel model can process.

To build it:

  • install the Haskell build tool stack.
  • run make

The Makefile will use stack to fetch appropriate versions of ghc and cabal-install.

After that, you can compile Haskell programs using the simulator by adding -package SEL4 to the ghc command line. Note that the qemu target requires some callback functions to be accessible via the FFI, so it is not possible to load a model compiled for those targets in GHCi.

Currently, the simulator interface is out of date, so this model is currently only useful as documentation and as intermediate artefact in the seL4 correctness proof. The model itself is kept up to date with the C code, only the simulator interface is outdated.