Library mcertikos.ticketlog.MTicketLockIntro
This file defines the abstract data and the primitives for the PAbQueue layer,
which will introduce abstraction of kernel context
Require Import Coqlib.
Require Import Maps.
Require Import ASTExtra.
Require Import Integers.
Require Import Floats.
Require Import Values.
Require Import Memory.
Require Import Events.
Require Import Stacklayout.
Require Import Globalenvs.
Require Import AsmX.
Require Import Smallstep.
Require Import AuxStateDataType.
Require Import Constant.
Require Import GlobIdent.
Require Import FlatMemory.
Require Import CommonTactic.
Require Import AuxLemma.
Require Import RealParams.
Require Import PrimSemantics.
Require Import LAsm.
Require Import LoadStoreSem1.
Require Import XOmega.
Require Import liblayers.logic.PTreeModules.
Require Import liblayers.logic.LayerLogicImpl.
Require Import liblayers.compat.CompatLayers.
Require Import liblayers.compat.CompatGenSem.
Require Import AbstractDataType.
Require Export MCurID.
Require Import Maps.
Require Import ASTExtra.
Require Import Integers.
Require Import Floats.
Require Import Values.
Require Import Memory.
Require Import Events.
Require Import Stacklayout.
Require Import Globalenvs.
Require Import AsmX.
Require Import Smallstep.
Require Import AuxStateDataType.
Require Import Constant.
Require Import GlobIdent.
Require Import FlatMemory.
Require Import CommonTactic.
Require Import AuxLemma.
Require Import RealParams.
Require Import PrimSemantics.
Require Import LAsm.
Require Import LoadStoreSem1.
Require Import XOmega.
Require Import liblayers.logic.PTreeModules.
Require Import liblayers.logic.LayerLogicImpl.
Require Import liblayers.compat.CompatLayers.
Require Import liblayers.compat.CompatGenSem.
Require Import AbstractDataType.
Require Export MCurID.
Section WITHMEM.
Local Open Scope Z_scope.
Context `{real_params: RealParams}.
Context `{oracle_prop: MultiOracleProp}.
Context `{Hstencil: Stencil}.
Context `{Hmem: Mem.MemoryModelX}.
Context `{Hmwd: UseMemWithData mem}.
Local Open Scope Z_scope.
Context `{real_params: RealParams}.
Context `{oracle_prop: MultiOracleProp}.
Context `{Hstencil: Stencil}.
Context `{Hmem: Mem.MemoryModelX}.
Context `{Hmwd: UseMemWithData mem}.
Section INV.
Global Instance init_ticket_inv: PreservesInvariants init_ticket_spec.
Proof.
preserves_invariants_simpl_auto.
Qed.
Global Instance incr_ticket_inv: PreservesInvariants incr_ticket_spec.
Proof.
preserves_invariants_simpl_auto1.
Qed.
Global Instance incr_now_inv: PreservesInvariants incr_now_spec.
Proof.
preserves_invariants_simpl_auto1.
Qed.
Global Instance get_now_inv: PreservesInvariants get_now_spec.
Proof.
preserves_invariants_simpl_auto1.
Qed.
End INV.
Global Instance init_ticket_inv: PreservesInvariants init_ticket_spec.
Proof.
preserves_invariants_simpl_auto.
Qed.
Global Instance incr_ticket_inv: PreservesInvariants incr_ticket_spec.
Proof.
preserves_invariants_simpl_auto1.
Qed.
Global Instance incr_now_inv: PreservesInvariants incr_now_spec.
Proof.
preserves_invariants_simpl_auto1.
Qed.
Global Instance get_now_inv: PreservesInvariants get_now_spec.
Proof.
preserves_invariants_simpl_auto1.
Qed.
End INV.
Definition mticketlockintro_fresh : compatlayer (cdata RData) :=
(incr_now ↦ gensem incr_now_spec ⊕
init_ticket ↦ gensem init_ticket_spec) ⊕
(incr_ticket ↦ gensem incr_ticket_spec ⊕
get_now ↦ gensem get_now_spec).
Definition mticketlockintro_passthrough : compatlayer (cdata RData) :=
fload ↦ gensem fload´_spec
⊕ fstore ↦ gensem fstore´_spec
⊕ page_copy ↦ gensem page_copy´´´_spec
⊕ page_copy_back ↦ gensem page_copy_back´_spec
⊕ vmxinfo_get ↦ gensem vmxinfo_get_spec
⊕ set_pg ↦ gensem setPG_spec
⊕ set_cr3 ↦ setCR3_compatsem setCR3_spec
⊕ get_size ↦ gensem MMSize
⊕ is_usable ↦ gensem is_mm_usable_spec
⊕ get_mms ↦ gensem get_mm_s_spec
⊕ get_mml ↦ gensem get_mm_l_spec
⊕ boot_loader ↦ gensem bootloader0_spec
⊕ get_CPU_ID ↦ gensem get_CPU_ID_spec
⊕ release_shared ↦ primcall_release_lock_compatsem release_shared release_shared0_spec0
⊕ acquire_shared ↦ primcall_acquire_shared_compatsem acquire_shared0_spec0
⊕ log_hold ↦ gensem log_hold_spec
⊕ get_curid ↦ gensem get_curid_spec
⊕ set_curid ↦ gensem set_curid_spec
⊕ set_curid_init ↦ gensem set_curid_init_spec
⊕ trap_in ↦ primcall_general_compatsem trapin_spec
⊕ trap_out ↦ primcall_general_compatsem trapout´_spec
⊕ host_in ↦ primcall_general_compatsem hostin_spec
⊕ host_out ↦ primcall_general_compatsem hostout´_spec
⊕ proc_create_postinit ↦ gensem proc_create_postinit_spec
⊕ trap_get ↦ primcall_trap_info_get_compatsem trap_info_get_spec
⊕ trap_set ↦ primcall_trap_info_ret_compatsem trap_info_ret_spec
⊕ serial_irq_check ↦ gensem serial_irq_check_spec
⊕ iret ↦ gensem iret_spec
⊕ cli ↦ gensem cli_spec
⊕ sti ↦ gensem sti_spec
⊕ serial_irq_current ↦ gensem serial_irq_current_spec
⊕ ic_intr ↦ gensem ic_intr_spec
⊕ save_context ↦ primcall_save_context_compatsem save_context_spec
⊕ restore_context ↦ primcall_restore_context_compatsem restore_context_spec
⊕ local_irq_save ↦ gensem local_irq_save_spec
⊕ local_irq_restore ↦ gensem local_irq_restore_spec
⊕ serial_in ↦ gensem serial_in_spec
(incr_now ↦ gensem incr_now_spec ⊕
init_ticket ↦ gensem init_ticket_spec) ⊕
(incr_ticket ↦ gensem incr_ticket_spec ⊕
get_now ↦ gensem get_now_spec).
Definition mticketlockintro_passthrough : compatlayer (cdata RData) :=
fload ↦ gensem fload´_spec
⊕ fstore ↦ gensem fstore´_spec
⊕ page_copy ↦ gensem page_copy´´´_spec
⊕ page_copy_back ↦ gensem page_copy_back´_spec
⊕ vmxinfo_get ↦ gensem vmxinfo_get_spec
⊕ set_pg ↦ gensem setPG_spec
⊕ set_cr3 ↦ setCR3_compatsem setCR3_spec
⊕ get_size ↦ gensem MMSize
⊕ is_usable ↦ gensem is_mm_usable_spec
⊕ get_mms ↦ gensem get_mm_s_spec
⊕ get_mml ↦ gensem get_mm_l_spec
⊕ boot_loader ↦ gensem bootloader0_spec
⊕ get_CPU_ID ↦ gensem get_CPU_ID_spec
⊕ release_shared ↦ primcall_release_lock_compatsem release_shared release_shared0_spec0
⊕ acquire_shared ↦ primcall_acquire_shared_compatsem acquire_shared0_spec0
⊕ log_hold ↦ gensem log_hold_spec
⊕ get_curid ↦ gensem get_curid_spec
⊕ set_curid ↦ gensem set_curid_spec
⊕ set_curid_init ↦ gensem set_curid_init_spec
⊕ trap_in ↦ primcall_general_compatsem trapin_spec
⊕ trap_out ↦ primcall_general_compatsem trapout´_spec
⊕ host_in ↦ primcall_general_compatsem hostin_spec
⊕ host_out ↦ primcall_general_compatsem hostout´_spec
⊕ proc_create_postinit ↦ gensem proc_create_postinit_spec
⊕ trap_get ↦ primcall_trap_info_get_compatsem trap_info_get_spec
⊕ trap_set ↦ primcall_trap_info_ret_compatsem trap_info_ret_spec
⊕ serial_irq_check ↦ gensem serial_irq_check_spec
⊕ iret ↦ gensem iret_spec
⊕ cli ↦ gensem cli_spec
⊕ sti ↦ gensem sti_spec
⊕ serial_irq_current ↦ gensem serial_irq_current_spec
⊕ ic_intr ↦ gensem ic_intr_spec
⊕ save_context ↦ primcall_save_context_compatsem save_context_spec
⊕ restore_context ↦ primcall_restore_context_compatsem restore_context_spec
⊕ local_irq_save ↦ gensem local_irq_save_spec
⊕ local_irq_restore ↦ gensem local_irq_restore_spec
⊕ serial_in ↦ gensem serial_in_spec
serial device
serial device
serial device
ioapic device
ioapic device
lapic device
lapic device
⊕ accessors ↦ {| exec_load := (@exec_loadex _ _ _ _ _ Hmwd);
exec_store := (@exec_storeex _ _ _ _ _ Hmwd) |}.
Definition mticketlockintro : compatlayer (cdata RData) := mticketlockintro_fresh ⊕ mticketlockintro_passthrough.
End WITHMEM.
exec_store := (@exec_storeex _ _ _ _ _ Hmwd) |}.
Definition mticketlockintro : compatlayer (cdata RData) := mticketlockintro_fresh ⊕ mticketlockintro_passthrough.
End WITHMEM.