Library mcertikos.devdrivers.ConsoleGenLink

Require Import LinkTemplate.
Require Import DConsole.
Require Import ConsoleGen.
Require Import ConsoleGenLinkSource.
Require Import DLApic.
Require Import DLApicCSource.
Require Import DLApicCode.

Section WITHCOMPCERTIKOS.
  Context `{compcertikos_prf: CompCertiKOS} `{real_params_prf: RealParams}.
  Context `{oracle_prop: MultiOracleProp}.

  Lemma init_correct:
    init_correct_type DConsole_module dlapic dconsole.
  Proof.
    init_correct.
  Qed.

  Lemma link_correct_aux:
    link_correct_aux_type DConsole_module dlapic dconsole.
  Proof.
    link_correct_aux.
    - link_cfunction
        console_init_spec_ref
        DLApicCode_cons_init.DLAPICCODE.cons_init_code_correct.
    - link_cfunction
        console_intr_spec_ref
        DLApicCode_cons_intr.DLAPICCODE.cons_intr_code_correct.
    - apply passthrough_correct.
  Qed.

  Theorem cl_backward_simulation:
    cl_backward_simulation_type DConsole_module dlapic dconsole.
  Proof.
    cl_backward_simulation init_correct link_correct_aux.
  Qed.

  Theorem make_program_exists:
    make_program_exist_type DConsole_module dlapic dconsole.
  Proof.
    make_program_exists link_correct_aux.
  Qed.
End WITHCOMPCERTIKOS.