Commit Graph

75 Commits

Author SHA1 Message Date
Miki Tanaka 00f1393c5b arm-hyp execspec: add caseconvs, fixes in haskell + VCPU_H 2017-06-19 14:32:19 +10:00
Miki Tanaka f7e451b18a arm-hyp haskell: updates for the rebase (remove recycle/selfour-553/VER-623)
* correct asid_high_bits and largePTE/superSectionPDE offsets
* correct copy_global_mappings for ARM_HYP
2017-06-17 16:26:11 +10:00
Miki Tanaka 611d63e4ea arm-hyp haskell: add prepareThreadDelete
this is a function called from finiliseCap to prepare a tcb for deletion
2017-06-17 16:26:11 +10:00
Rafal Kolanski 5898d6c7e3 arm-hyp haskell: get SMMU target to build again 2017-06-17 16:26:11 +10:00
Rafal Kolanski 6356fe57a2 arm-hyp haskell: implement VCPU functionality (except faults)
also includes fixes for haskell-translator (SELFOUR-551/555/557), fix the range of vgicLR
2017-06-17 16:26:11 +10:00
Rafal Kolanski 68a8ebd560 arm-hyp haskell: SELFOUR-551: Swap argument order of [di|a]ssociateVcpuTcb
Covers pull request #299. The rest of the changes are either already in
place or concern IO which is not fully specified yet.
2017-06-17 16:26:11 +10:00
Rafal Kolanski b77476a45e arm-hyp haskell: incorporate SELFOUR-555/557
from pull request #285:
SELFOUR-555: Rename ksCurCPU->armHSCurVCPU
SELFOUR-557: s/isIOSpaceFrame/isIOSpaceFrameCap/

Other changes in pull request have no effect on current Haskell spec.
2017-06-17 16:26:11 +10:00
Rafal Kolanski 2c58b564d9 arm-hyp haskell: VIRQ inject invocation 2017-06-17 16:26:11 +10:00
Rafal Kolanski 32951a9a87 arm-hyp haskell: rephrase VIRQ inject decode after kernel changes 2017-06-17 16:26:11 +10:00
Rafal Kolanski 39f054220c arm-hyp haskell: add VGIC interfaces + decode VCPU inject IRQ 2017-06-17 16:26:11 +10:00
Rafal Kolanski 222c2fdf77 arm-hyp haskell: VCPU register read/write (decode+perform) 2017-06-17 16:26:11 +10:00
Rafal Kolanski 0085b67aea arm-hyp haskell: fix compile for build-arm-hyp-nosmmu
Forgot to disable capVPisIOSpace PageCap property when SMMU disabled.
2017-06-17 16:26:11 +10:00
Rafal Kolanski 9dfcec274a haskell: clean up Makefile, separate build dir per target 2017-06-17 16:26:11 +10:00
Rafal Kolanski bd8c6d2a72 haskell: add mapMaybe and modifyArchState
Utility functions.
2017-06-17 16:26:11 +10:00
Rafal Kolanski 9ea53d6c1f haskell: make build-arm-hyp-nosmmu the default build target 2017-06-17 16:26:11 +10:00
Rafal Kolanski 7125d4843c haskell: rename ARM target in Makefile to build-arm
"build" is ambiguous
2017-06-17 16:26:11 +10:00
Rafal Kolanski fa8fc7de7d haskell: arch-specific faults + split VMFault -> ArchFault
Hypervisor extensions add extra fault types which are entirely
arch-specific. While the concept of a VM fault exists on all platforms,
these faults are also arch-specific.

This change adds an ArchFault datatype and constructor to the generic
Faults and Failures, and moves VMFault into ArchFault for the ARM
platform.

NOTE: fault indices have changed (generic goes before arch) as per
  the changes needed for SELFOUR-413, which is the seL4 C equivalent of
  this commit.
2017-06-17 16:26:11 +10:00
Rafal Kolanski 7dc21c9c71 haskell: fix misguided import for ARM platform 2017-06-17 16:26:11 +10:00
Rafal Kolanski 57d800e9c3 arm-hyp haskell: ARMVCPUSetTCB decode+perform 2017-06-17 16:26:11 +10:00
Rafal Kolanski fb23b8ef21 arm-hyp haskell: make VCPU PSpaceStorable 2017-06-17 16:26:11 +10:00
Rafal Kolanski 8309e0acde arm-hyp haskell: don't regenerate Structures.lhs-boot
Structures.lhs-boot is custom, but there was a general rule that would
clobber it in the Makefile. Override this rule.
2017-06-17 16:26:11 +10:00
Rafal Kolanski c5e59e1028 arm-hyp haskell: basic stubs to support recent haskell changes 2017-06-17 16:26:11 +10:00
Rafal Kolanski d79c167820 arm-hyp haskell: ArchFault stub for ARM_HYP platform. 2017-06-17 16:26:11 +10:00
Rafal Kolanski 75514f6a05 arm-hyp haskell: resolve circular dependency for VCPUs
Done by scattering parts of VCPU all over the place, but in a canonical
fashion.
2017-06-17 16:26:11 +10:00
Rafal Kolanski 25616760bd arm-hyp haskell: more non-progress in trying to resolve circular imports 2017-06-17 16:26:11 +10:00
Rafal Kolanski de74d26bbe arm-hyp haskell: call VCPU functions properly
Completely breaks build due to circular dependency problems we can't yet
solve.
2017-06-17 16:26:11 +10:00
Rafal Kolanski 663790c1ad arm-hyp haskell: add start of VCPU/ARM_HYP
Currently not working.
2017-06-17 16:26:11 +10:00
Rafal Kolanski 884586da3f arm-hyp haskell: addres several FIXMES:
- dropped InvokePageIO in favour of capVPisIOSpace flag on PageCap
- converted some objBits (undefined :: ...) to pteBits and pdeBits
- added invalid IOPDEs and IOPTEs encoded to 0
- added IOPTEs and IOPDEs to PSpaceStorable
- adjusted asidHighBits to drop one on enabling MMU
2017-06-17 16:26:11 +10:00
Rafal Kolanski 298d4ea6fe arm-hyp haskell: changes from meeting 2017-06-17 16:26:11 +10:00
Rafal Kolanski a35ec59857 arm-hyp haskell: add arm-hyp-nossmu target, make sure it compiles 2017-06-17 16:26:11 +10:00
Rafal Kolanski 77af6dc71e arm-hyp haskell: compiles, still missing VCPU and IO/IOSpace
All missing spots are hopefully tagged now, and there is quite a bit to
discuss tagged with "FIXME ARMHYP".
2017-06-17 16:26:11 +10:00
Rafal Kolanski b2a1ff6a6a arm-hyp haskell: VSpace compiles with enabled SMMU (stubbed IO for the moment) 2017-06-17 16:26:11 +10:00
Rafal Kolanski c103dfc31b haskell: allow underscores in module names in mkhsboot
Wasted so much time figuring out this was a problem.
2017-06-17 16:26:11 +10:00
Rafal Kolanski bdc3c846dd haskell: base arm-hyp off of arm-kzm 2017-06-17 16:26:11 +10:00
Rafal Kolanski e080f5c26d haskell: allow adding extra CPP options for a target 2017-06-17 16:26:11 +10:00
Rafal Kolanski f5831941ff haskell: hlint and clean up Setup.hs 2017-06-17 16:26:11 +10:00
Rafal Kolanski 49bf6be16a Haskell: build setup for arm-hyp (arm-tk1 = ARM_HYP + TK1) 2017-06-17 16:26:11 +10:00
Pang Luo da28d94974 VER-717: refactor tpidrurwRegister and fix corresponding proof 2017-05-05 15:17:41 +10:00
Joel Beeren 71e2db88a4 arm: refactor sanitise_register to take a bool instead of a kernel_object
This simplified the sanitise_register logic in CRefine for arm-hyp.
2017-05-03 21:51:57 +10:00
Rafal Kolanski ce1b60e16e haskell: add Hypervisor module, add concept of Hypervisor exceptions
The kernel gains an entry point for hypervisor exception events, as well
as a way to add arch-specific handlers for these events.

We do this since the hypervisor has its own entry point into the kernel,
and that must be reflected in the top-level kernel entry interface.

For ARM target, which does not have hypervisor support, we add an no-op stub.
2017-02-22 15:26:41 +11:00
Miki Tanaka 185876b89f haskell: add a stub for prepareThreadDelete
this is a function called from finailiseCap to prepare a tcb for deletion
(it does nothing for ARM)
2017-02-20 09:23:55 +11:00
Gerwin Klein 520921351a provide TCB argument for sanitiseRegister
Other platforms such as arm-hyp will need to look into additional TCB state
such as VCPU in sanitiseRegister. This commit provides the scaffolding for
that.
2017-02-12 12:54:42 +11:00
Gerwin Klein 3607dfabbf haskell/design: remove unused functions 2017-02-12 12:33:05 +11:00
Matthew Brecknell d08ee04e2f haskell: update documentation for building the Haskell kernel 2017-02-03 16:23:56 +11:00
Matthew Brecknell aee13996a6 haskell: use stack to obtain suitable GHC and cabal 2017-02-01 17:31:21 +11:00
Matthew Brecknell 7a8f2b8980 trivial: use absolute paths in haskell .gitignore 2017-02-01 17:13:04 +11:00
Joel Beeren 3dafec7d46 backport changes to ARM proofs from X64 work in progress
- replace ARM-specific constants and types with aliases which can be
  instantiated separately for each architecture.
- expand lib with lemmas used in X64 proofs.
- simplify some proofs.

Also-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2017-01-27 08:31:07 +11:00
Matthew Brecknell 511c6b2d3a Isabelle2016-1: rename free variables to avoid capture 2017-01-05 14:24:36 +11:00
Alejandro Gomez-Londono f9c7c855d0 Haskell: Changes to the haskell to better reflect ASpec
* atcbContextGet and atcbContextSet where added (just as in ASpec)

* asUser is now defined in terms of atcbContext{Get,Set}

  tags: [VER-623][SELFOUR-413]
2016-11-25 13:05:55 +11:00
Miki Tanaka 6dad6a1c75 ExecSpec: arch-specific faults + VMFault -> ArchFault + ReservedIRQ
* skeletons, adding new constructs (arch_tcb, arch_fault)

* adjusting skeletons for ReserveIRQ + small change in haskell (ARM)

  Changes in: spec/haskell/src/SEL4/Object/Interrupt/ARM.lhs:37:21
  Due to "Defined but not used: ‘irq’"

* arch-splitting faults in skeletons (ARM)

* fix arch_tcb and asUser namespace issues in skeletons (ARM)

* checking in current generated files

  tags: [VER-623][SELFOUR-413]
2016-11-25 13:05:42 +11:00