Commit Graph

4682 Commits

Author SHA1 Message Date
Gerwin Klein aada0b9166 aarch64 haskell: first sketch of C asid_map
This commit adds hardware ASID handling from ARM/ARM_HYP, and tweaks it
to use local ASID pool entries for hardware ASIDs instead of a global
ASID map.

Naming here is unfortunate in multiple dimensions:
 - C calls the entries asid_map (from the global function in Haskell)
 - what is actually mapped is a seL4 ASID to a HW ASID + VSpace root,
   but only via multiple functions, the type is not a map
 - the HW ASIDS are not actual ASIDs, but instead VMIDs in AArch64 EL-2

To be cleaned up when nomenclature is clearer in C.

Validation against C is minimal at the moment; only the types are
validated to correspond with C, and which functions are present, but
not their full behaviour/structure yet.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein 6418bda962 aarch64/riscv/x64: remove findVSpaceForASIDAssert
findVSpaceForASIDAssert is needed for modeling the hardware ASID lookup
on ARM. None of AARCH64, RISCV64, X64 use that mechanism and the
function is unused. There are some proof about it, but those are unused
as well. This commit removes all of these.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Rafal Kolanski b7cfc4c323 aarch64 haskell: add simplified FPU
Adds FPU state to UserContext, uses 64 general-purpose registers as seen
on TX2.
Abstracts FPU operations to fpuThreadDelete required for thread
deletion, thereby not including intricacies of lazy FPU switching.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein fcdbbf5bad aarch64 run_tests: add test setup for AARCH64
This adds the AARCH64 L4V_ARCH and adds a long initial test exclusion
list that will be reduced as verification proceeds.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein c3900ced40 github: add AARCH64 to build matrix
This commit will only come into full effect when it is merged into
master, which is also the time AARCH64 tests should run regularly
in the main repository.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein 8aefcddb37 github: separate workflow file for AARCH64
This is a separate workflow instead of being added to `proof.yml` so
that it can be switched on/off separately.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Rafal Kolanski f0e4fbf112 aarch64 haskell: initialise from RISCV64 files
Use RISCV64 version of Haskell spec as a basis for upcoming work on
spec for AARCH64 architecture.

Only minimal RISCV64 to AARCH64 substitution done to yield a compiling
target, with a big FIXME stuck on top to remind people this got no human
oversight.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Rafal Kolanski f48b2041f9 aarch64 haskell: add TX2 hardware config
Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Rafal Kolanski 745a94910b haskell: add build configuration for AARCH64 on TX2 platform
Setup.hs + SEL4.cabal + Makefile

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein 954b42cdd9 refine: speed up CSpace1_R+CSpace_R proofs
Three main thrusts:
  - speed up the `updateMDB_the_lot` chain by using more targeted
    proof methods
  - drastically reduce goal size by removing unused assumptions when
    that becomes possible (this is the largest overall speed win)
  - use `subgoal` to unblock interactive proof progress

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-19 15:27:44 +10:00
Corey Lewis 0aaeb868ce ainvs: remove unused preconditions
Signed-off-by: Corey Lewis <corey.lewis@unsw.edu.au>
2022-04-13 13:44:45 +10:00
Gerwin Klein 2a1fc75e6f regression: tool for comparing session times
This adds a small script that parses two run_tests logs for session
times and compares them.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-13 13:35:24 +10:00
Corey Lewis 93f04fa675 docs: proof style for unfolding definitions
Signed-off-by: Corey Lewis <corey.lewis@unsw.edu.au>
2022-04-12 14:36:09 +10:00
Corey Lewis 86445726a3 docs: consistent indentation
Signed-off-by: Corey Lewis <corey.lewis@unsw.edu.au>
2022-04-12 14:36:09 +10:00
Gerwin Klein 3a0667c1f8 proof: add missing Makefile dependencies
Both AInvs and the refinement chain need the generated files necessary
for ASpec and ExecSpec. We could depend on ASpec directly, but that
would mess with Isabelle being able to schedule sessions as it wants
them.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-08 10:59:21 +10:00
Gerwin Klein 82434f0d62 trivial: fix typo
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-08 10:59:05 +10:00
Matthew Brecknell d62eb31f9d ci binary: wait for artifacts
The previous version of the `binary` workflow assumed that its input
artifacts would be available for download before a `binary` workflow run
is started. However, the `binary` workflow typically wants to download
those artifacts from the same workflow run that triggered the `binary`
run via `repository_dispatch`.

It appears that GitHub Actions does not make artifacts available for
download from a workflow until *after* the relevant job has finished.
Hence, there's a race between the `binary` workflow and the workflow
that triggered it. We resolve this by making the `binary` workflow retry
its artifact download for up to 10 minutes.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-04-01 19:17:37 +11:00
Matthew Brecknell 2a173ba189 ci binary: download artifacts from correct repo
The previous version was erroneously downloading artifacts from the repo
in which the `binary` workflow was triggered, when it should have been
downloading from the repo identified by the payload of the trigger.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-04-01 19:17:37 +11:00
Gerwin Klein bf432bb631 github: changed AutoCorresSEL4 default
ci-actions/aws-proofs no longer excludes the AutoCorresSEL4 session by
default, so we no longer need to provide a fake argument to the session
parameter to not exclude it.

This is significant, because we now want the default to be non-verbose
since we're running multiple sessions in parallel.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-30 10:27:25 +11:00
Gerwin Klein 7535796778 crefine: remove useless comments
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 4bb5899359 word_lib: move in lemma from l4v
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 2d930d69db word_lib: fix non-terminal `auto` violations
Not acceptable in either AFP or l4v.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 896434499e word_lib: fix license headers
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein c953ab0396 word_lib/proofs: bundle word simp set changes
Add a bundle for global word simp set changes -- unfortunately we
can't actually do this globally, because they are mostly simp rule
removals which will be overwritten by theory merges. So this new
l4v_word_lib bundle will have to be activated/unbundled multiple times.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 65fbeb5b01 isabelle2021-1 word_lib: add lemmas from l4v
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein b29a3433ef isabelle2021-1: remove no_take_bit
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 6650ba5ce7 isabelle2021-1 x64: CRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein bbdc1e53db isabelle2021-1 riscv: InfoFlowC
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 74536cdef1 isabelle2021-1 riscv: CRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein bf8431d765 isabelle2021-1 riscv: Infoflow
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 6c938f2a35 isabelle2021-1 riscv: Access
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein f241510aef isabelle2021-1 cspec: Kernel_State_C simp set
globally (for all arches) removes word simp rules that are too eager
for 64 bit bitfield proofs.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein b864ae0159 isabelle2021-1 riscv: Refine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 5c03381bfb isabelle2021-1 riscv: AInvs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein cbf8ded43b isabelle2021-1 x64: Refine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein b6cd2e0786 isabelle2021-1 x64: AInvs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 4e027e9d4b isabelle2021-1 arm-hyp: CRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 6bf89bd840 isabelle2021-1 arm-hyp: Refine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 57d0333204 cleanup ainvs: reduce warnings
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein bf58cb2a19 isabelle2021-1 arm-hyp: AInvs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 8d6dbafbea isabelle2021-1: InfoFlowC
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 52024490d5 asmrefine: remove obsolete simp rules
These are either not necessary any more or are now in the simpset by
default.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 56d6216401 isabelle2021-1: CRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein a6c3ac2901 isabelle2021-1: AsmRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 68bb97ef66 isabelle2021-1: CamkesCdlRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 84713327a5 isabelle2021-1: Refine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 0ee20aec7f isabelle2021-1: Infoflow
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 85874ec8f3 isabelle2021-1: DRefine
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 49f75949b0 isabelle2021-1: CSpec (via lib/BitFieldProofsLib)
Isabelle2021-1 simplifies `a << Suc 0` too eagerly, so we add simp
rules to compensate for new forms of goals. Removing the too-eager simp
rules would be less stable against theory merge.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00
Gerwin Klein 96ec3d4372 isabelle2021-1: DSpecProofs
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-29 08:38:25 +11:00