lh-l4v/spec/haskell
Matthew Brecknell fd01872121 always use `addrFromKPPtr` for kernel addresses
This verifies a C kernel patch (seL4/seL4#409) which consolidates
translation between virtual and physical addresses, and makes it
consistent across architectures. In particular, we always use
`addrFromKPPtr`, even on architectures that don't use a distinct region
to map the kernel ELF. This will facilitate future improvements which
move the ELF mapping into a distinct virtual address region.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2021-06-25 16:31:22 +10:00
..
include run astyle on all C files in the repository 2020-04-19 13:50:17 +08:00
src always use `addrFromKPPtr` for kernel addresses 2021-06-25 16:31:22 +10:00
.gitignore licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Makefile haskell: deal with existing "~/.stack" 2020-09-10 16:18:12 +08:00
README.md licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
SEL4.cabal licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Setup.hs licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08: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 licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08: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.