-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhandle_vtimer_sysreg_write.v
164 lines (160 loc) · 7.71 KB
/
handle_vtimer_sysreg_write.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
Require Import SpecDeps.
Require Import RData.
Require Import EventReplay.
Require Import MoverTypes.
Require Import Constants.
Require Import CommonLib.
Require Import AbsAccessor.Spec.
Local Open Scope Z_scope.
Section SpecLow.
Definition handle_vtimer_sysreg_write_spec0 (rec: Pointer) (esr: Z64) (adt: RData) : option RData :=
match rec, esr with
| (_rec_base, _rec_ofst), VZ64 _esr =>
rely is_int64 _esr;
when _rt == ESR_EL2_SYSREG_ISS_RT_spec (VZ64 _esr) adt;
rely is_int _rt;
when' _val == get_rec_regs_spec (_rec_base, _rec_ofst) _rt adt;
rely is_int64 _val;
rely is_int64 (Z.land _esr 4193310);
rely is_int (Z.land _esr 4193310);
let _ec := (Z.land _esr 4193310) in
if (_ec =? 3209222) then
when adt == sysreg_write_spec 37 (VZ64 _val) adt;
when' _cntv_ctl == sysreg_read_spec 35 adt;
rely is_int64 _cntv_ctl;
when _t'6 == get_rec_vtimer_masked_spec (_rec_base, _rec_ofst) adt;
rely is_int _t'6;
if (negb (_t'6 =? 0)) then
let _t'7 := 1 in
when adt == set_rec_vtimer_asserted_spec (_rec_base, _rec_ofst) 0 adt;
when' _t'4 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'4;
rely is_int64 (Z.land _t'4 18446744073709543423);
when adt == set_rec_sysregs_spec (_rec_base, _rec_ofst) 69 (VZ64 (Z.land _t'4 18446744073709543423)) adt;
when' _t'5 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'5;
when adt == sysreg_write_spec 69 (VZ64 _t'5) adt;
Some adt
else
when _t'8 == timer_condition_met_spec (VZ64 _cntv_ctl) adt;
rely is_int _t'8;
let _t'7 := (_t'8 =? 0) in
if _t'7 then
when adt == set_rec_vtimer_asserted_spec (_rec_base, _rec_ofst) 0 adt;
when' _t'4 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'4;
rely is_int64 (Z.land _t'4 18446744073709543423);
when adt == set_rec_sysregs_spec (_rec_base, _rec_ofst) 69 (VZ64 (Z.land _t'4 18446744073709543423)) adt;
when' _t'5 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'5;
when adt == sysreg_write_spec 69 (VZ64 _t'5) adt;
Some adt
else
Some adt
else
if (_ec =? 3340294) then
rely is_int64 (Z.land _val 2);
rely is_int (Z.land _val 2);
when adt == set_rec_vtimer_masked_spec (_rec_base, _rec_ofst) (Z.land _val 2) adt;
rely is_int64 (Z.lor _val 2);
when adt == sysreg_write_spec 35 (VZ64 (Z.lor _val 2)) adt;
when' _cntv_ctl == sysreg_read_spec 35 adt;
rely is_int64 _cntv_ctl;
when _t'6 == get_rec_vtimer_masked_spec (_rec_base, _rec_ofst) adt;
rely is_int _t'6;
if (negb (_t'6 =? 0)) then
let _t'7 := 1 in
when adt == set_rec_vtimer_asserted_spec (_rec_base, _rec_ofst) 0 adt;
when' _t'4 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'4;
rely is_int64 (Z.land _t'4 18446744073709543423);
when adt == set_rec_sysregs_spec (_rec_base, _rec_ofst) 69 (VZ64 (Z.land _t'4 18446744073709543423)) adt;
when' _t'5 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'5;
when adt == sysreg_write_spec 69 (VZ64 _t'5) adt;
Some adt
else
when _t'8 == timer_condition_met_spec (VZ64 _cntv_ctl) adt;
rely is_int _t'8;
let _t'7 := (_t'8 =? 0) in
if _t'7 then
when adt == set_rec_vtimer_asserted_spec (_rec_base, _rec_ofst) 0 adt;
when' _t'4 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'4;
rely is_int64 (Z.land _t'4 18446744073709543423);
when adt == set_rec_sysregs_spec (_rec_base, _rec_ofst) 69 (VZ64 (Z.land _t'4 18446744073709543423)) adt;
when' _t'5 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'5;
when adt == sysreg_write_spec 69 (VZ64 _t'5) adt;
Some adt
else
Some adt
else
if (_ec =? 3471366) then
when adt == sysreg_write_spec 36 (VZ64 _val) adt;
when' _cntv_ctl == sysreg_read_spec 35 adt;
rely is_int64 _cntv_ctl;
when _t'6 == get_rec_vtimer_masked_spec (_rec_base, _rec_ofst) adt;
rely is_int _t'6;
if (negb (_t'6 =? 0)) then
let _t'7 := 1 in
when adt == set_rec_vtimer_asserted_spec (_rec_base, _rec_ofst) 0 adt;
when' _t'4 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'4;
rely is_int64 (Z.land _t'4 18446744073709543423);
when adt == set_rec_sysregs_spec (_rec_base, _rec_ofst) 69 (VZ64 (Z.land _t'4 18446744073709543423)) adt;
when' _t'5 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'5;
when adt == sysreg_write_spec 69 (VZ64 _t'5) adt;
Some adt
else
when _t'8 == timer_condition_met_spec (VZ64 _cntv_ctl) adt;
rely is_int _t'8;
let _t'7 := (_t'8 =? 0) in
if _t'7 then
when adt == set_rec_vtimer_asserted_spec (_rec_base, _rec_ofst) 0 adt;
when' _t'4 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'4;
rely is_int64 (Z.land _t'4 18446744073709543423);
when adt == set_rec_sysregs_spec (_rec_base, _rec_ofst) 69 (VZ64 (Z.land _t'4 18446744073709543423)) adt;
when' _t'5 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'5;
when adt == sysreg_write_spec 69 (VZ64 _t'5) adt;
Some adt
else
Some adt
else
when' _cntv_ctl == sysreg_read_spec 35 adt;
rely is_int64 _cntv_ctl;
when _t'6 == get_rec_vtimer_masked_spec (_rec_base, _rec_ofst) adt;
rely is_int _t'6;
if (negb (_t'6 =? 0)) then
let _t'7 := 1 in
when adt == set_rec_vtimer_asserted_spec (_rec_base, _rec_ofst) 0 adt;
when' _t'4 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'4;
rely is_int64 (Z.land _t'4 18446744073709543423);
when adt == set_rec_sysregs_spec (_rec_base, _rec_ofst) 69 (VZ64 (Z.land _t'4 18446744073709543423)) adt;
when' _t'5 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'5;
when adt == sysreg_write_spec 69 (VZ64 _t'5) adt;
Some adt
else
when _t'8 == timer_condition_met_spec (VZ64 _cntv_ctl) adt;
rely is_int _t'8;
let _t'7 := (_t'8 =? 0) in
if _t'7 then
when adt == set_rec_vtimer_asserted_spec (_rec_base, _rec_ofst) 0 adt;
when' _t'4 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'4;
rely is_int64 (Z.land _t'4 18446744073709543423);
when adt == set_rec_sysregs_spec (_rec_base, _rec_ofst) 69 (VZ64 (Z.land _t'4 18446744073709543423)) adt;
when' _t'5 == get_rec_sysregs_spec (_rec_base, _rec_ofst) 69 adt;
rely is_int64 _t'5;
when adt == sysreg_write_spec 69 (VZ64 _t'5) adt;
Some adt
else
Some adt
end
.
End SpecLow.