Commit Graph

440 Commits

Author SHA1 Message Date
Alejandro Gomez-Londono 796887d9b1 Removes all trailing whitespaces 2017-07-12 15:13:51 +10:00
Joel Beeren 81064fdb55 idle-thread-pd: run idle thread with the global PD all the time.
This avoids the multicore scenario of the idle thread running in the
address space that has been deleted by a thread running on another core.
2017-07-11 11:29:34 +10:00
Miki Tanaka 9f3924d1ea design spec: adjust skeleton files for unified haskell files 2017-07-03 10:31:34 +10:00
Miki Tanaka d8d1ee014c haskell: unify arm and arm-hyp haskell files
- both ARM and ARM_HYP haskell specs are now generated from the same set of files using cpp
- callbacks and platform files are merged into one directory (ARM)
- remove check-arm-hyp.py now that there are no ARM_HYP.lhs files
2017-07-03 10:30:49 +10:00
Miki Tanaka 41fe1a0845 update proofs for SELFOUR-30/291 "Reschedule on self-modification"
- SELFOUR-30 Reschedule when changing own IPC buffer
Previously if you invoked the TCB of the current thread and
changed the IPC buffer frame this would not immediately take
affect, as the kernels view of the current IPC buffer is
updated in Arch_switchToThread. This change forces Arch_switchToThread
to get called, even if we would switch back to the original
thread.

- SELFOUR-291 Reschedule when changing own registers
Previously if you wrote to TCB of the current thread and
changed the TLS_BASE this would not immediately take
affect, as the kernel only updates this register in
Arch_switchToThread. This change forces Arch_switchToThread
to get called, even if we would switch back to the original
thread.
2017-06-26 15:52:35 +10:00
Joel Beeren 392d055e99 SELFOUR-748: rename tlb invalidation functions 2017-06-20 14:05:45 +10:00
Alejandro Gomez-Londono 758ed38246 arm aspec: definitions + map instead of ad-hoc upto_enum in create_mapping_entries
* Defined largePagePTE_offsets and superSectionPDE_offsets as is the
    case in arm-hyp

  * Used a map over largePagePTE_offsets/superSectionPDE_offsets
    instead of upto_enum
2017-06-19 14:32:44 +10:00
Rafal Kolanski 3468f2d4d4 arm-hyp design: use translator for pageBase body
Type declaration remains harcoded due to lack of "word-like" type class.
2017-06-19 14:32:44 +10:00
Rafal Kolanski 82e1b08de4 haskell: make ARM_HYP match ARM when preprocessed for non-hyp platforms 2017-06-19 14:32:44 +10:00
Rafal Kolanski 190724496c haskell: add build-arm to default build targets
Invoking a bare "make" will build-arm and build-arm-hyp-nosmmu
2017-06-19 14:32:44 +10:00
Rafal Kolanski f891de2186 sep-abstract: make getActiveIRQ calls match Syscall_A
getActiveIRQ now takes a bool
2017-06-19 14:32:44 +10:00
Alejandro Gomez-Londono 74500bd829 arm-hyp test: Adding exclusion test set for ARM_HYP + cleanup 2017-06-19 14:32:43 +10:00
Pang Luo a4e9ffa403 arm-hyp: refactor tpidrurwRegister and fix corresponding proofs
See VER-717
2017-06-19 14:32:43 +10:00
Joel Beeren 1f4b9e686a arm-hyp: rename archTCBSanitise, arch_tcb_sanitise_condition, Arch_hasVCPU to be more appropriate 2017-06-19 14:32:43 +10:00
Miki Tanaka a429f5e553 arm-hyp abstract: [fix] virqSetEOIIRQEN 2017-06-19 14:32:43 +10:00
Miki Tanaka a02593b86f arm-hyp haskell: [fix] virqSetEOIIRQEN 2017-06-19 14:32:43 +10:00
Gerwin Klein 3757e605d4 arm-hyp abstract: update vgic_maintenance to avoid C overflow 2017-06-19 14:32:43 +10:00
Gerwin Klein e76a15d71d arm-hyp haskell: check idx earlier in vgicMaintenance to avoid C overflow 2017-06-19 14:32:42 +10:00
Miki Tanaka cb35836c7b arm-hyp haskell: small fix 2017-06-19 14:32:42 +10:00
Alejandro Gomez-Londono c78a630ea9 arm-hyp haskell: virqSetEOIIRQEN fix 2017-06-19 14:32:42 +10:00
Alejandro Gomez-Londono aa5ebc4bce arm-hyp aspec: virqSetEOIIRQEN fix 2017-06-19 14:32:42 +10:00
Alejandro Gomez-Londono b9512bce98 arm-hyp haskell: Fixed irq_index initialization in vgicMaintenance 2017-06-19 14:32:42 +10:00
Alejandro Gomez-Londono 2d899a98a9 arm-hyp aspec: Fixing ird_idx initialization in vgic_maintenance 2017-06-19 14:32:42 +10:00
Miki Tanaka c2d598b665 arm-hyp abstract: correct loop range in vcpu_restore 2017-06-19 14:32:42 +10:00
Miki Tanaka 79d7e5e4f8 arm-hyp haskell: correct loop range in vcpuRestore 2017-06-19 14:32:42 +10:00
Miki Tanaka ce4d7ba056 arm-hyp haskell: fix wrong register name in new vcpuSave 2017-06-19 14:32:41 +10:00
Miki Tanaka e54339e9ab arm-hyp abstract: rephrase vcpu_save for easier match with C 2017-06-19 14:32:41 +10:00
Gerwin Klein 9720d48455 arm-hyp haskell: [squash this] fix Haskell vcpuUpdate 2017-06-19 14:32:41 +10:00
Gerwin Klein da1aaa5014 arm-hyp design: update skeleton to include new Haskell functions 2017-06-19 14:32:41 +10:00
Gerwin Klein bb12917ba1 arm-hyp haskell: rephrase vcpuSave for easier match with C 2017-06-19 14:32:41 +10:00
Miki Tanaka c06b58f369 arm-hyp abstract: correct make_virq 2017-06-19 14:32:41 +10:00
Miki Tanaka 100ac2cee1 arm-hyp haskell: correct makeVIRQ 2017-06-19 14:32:41 +10:00
Miki Tanaka 953a42a923 arm-hyp abstract: correct range_check fix for decode_vcpu_inject_irq 2017-06-19 14:32:41 +10:00
Miki Tanaka 8ca5198a7e arm-hyp haskell: correct range_check fix for decodeVCPUInjectIRQ 2017-06-19 14:32:41 +10:00
Joel Beeren 61353891dd arm-hyp haskell: refactor sanitiseRegister 2017-06-19 14:32:40 +10:00
Joel Beeren cd7820e026 arm-hyp abstract: refactor sanitise_register to not take kernel_object 2017-06-19 14:32:40 +10:00
Miki Tanaka 7067365560 arm-hyp abtract: change invoke_vcpu_inject_irq definition for better matchin 2017-06-19 14:32:39 +10:00
Miki Tanaka 4e98e6e2a5 arm-hyp haskell: change invokeVCPUInjectIRQ definition for better matching 2017-06-19 14:32:39 +10:00
Miki Tanaka dbbd74d9cf arm-hyp abstract: fix range_check off-by-one error in decode_vcpu_inject_irq 2017-06-19 14:32:39 +10:00
Miki Tanaka f47a157172 arm-hyp haskell: fix range_check off-by-one error in decodeVCPUInjectIRQ 2017-06-19 14:32:39 +10:00
Miki Tanaka 1c6124b578 arm-hyp abstract: make the loop range in vcpuRestore depend on arm_gicvcpu_numlistregs 2017-06-19 14:32:39 +10:00
Miki Tanaka 8326c5619f arm-hyp haskell: make the loop range in vcpuRestore depend on armKSGICVCPUNumListRegs 2017-06-19 14:32:39 +10:00
Joel Beeren fd660775ee arm-hyp abstract: correct makeArchFaultMessage for VGICMaintenance faults 2017-06-19 14:32:39 +10:00
Joel Beeren 40f4818d40 arm-hyp haskell: correct makeArchFaultMessage for VGICMaintenance faults 2017-06-19 14:32:39 +10:00
Gerwin Klein 7bb68406d6 arm-hyp design/skel: define pageBase manually
pageBase is now generic in Haskell, but since PAddr, VPtr etc all map to word
in Isabelle, the generic type declaration would lead to an error.

Only necessary in ARM_HYP, but could be done in ARM as well if necessary.
2017-06-19 14:32:38 +10:00
Gerwin Klein 424df79856 arm-hyp haskell: resolveVAddr needs to mask
LargePages and SuperSections are not duplicated as in normal ARM, so we need
to mask to get to the base address.
2017-06-19 14:32:38 +10:00
Gerwin Klein cbc528beba arm-hyp haskell: make LargePage and SuperSection contiguous
In HYP mode, large pages and super sections are encoded by a set of small
pages and section entries that have the contiguous bit set. The hardware must
be able to ignore that bit and still make the correct translation, so they
most point to the correct base address in each entry, instead of being
duplicates as in normal (non-HYP) mode.
2017-06-19 14:32:38 +10:00
Miki Tanaka 69adb29a89 arm-hyp abstract: add missing isb machine op in vcpu_disable 2017-06-19 14:32:37 +10:00
Miki Tanaka 16b6f26483 arm-hyp haskell: add missing isb in vcpuDisable 2017-06-19 14:32:37 +10:00
Miki Tanaka ef6e2dc32c arm-hyp machine spec: get_gic_vcpu_ctrl_eisr1 shoud call get_gic_vcpu_ctrl_eisr1_val (fix) 2017-06-19 14:32:37 +10:00