-
Notifications
You must be signed in to change notification settings - Fork 108
/
MachineExports.thy
64 lines (54 loc) · 1.23 KB
/
MachineExports.thy
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
(*
* Copyright 2014, General Dynamics C4 Systems
*
* SPDX-License-Identifier: GPL-2.0-only
*)
theory MachineExports
imports MachineOps
begin
(* Check consistency of machine_word and machine_word_len. *)
term "id :: machine_word \<Rightarrow> machine_word_len word"
arch_requalify_types
vmfault_type
hyp_fault_type
irq
user_monad
user_context
arch_requalify_consts
getActiveIRQ
maskInterrupt
freeMemory
loadWord
storeWord
storeWordVM
setNextPC
getRestartPC
setRegister
getRegister
initContext
exceptionMessage
syscallMessage
gpRegisters
frameRegisters
ackInterrupt
resetTimer
minIRQ
clearMemory
non_kernel_IRQs
tlsBaseRegister
debugPrint
configureTimer
initL2Cache
ptrFromPAddr
pageBits
(* HERE IS THE PLACE FOR GENERIC WORD LEMMAS FOR ALL ARCHITECTURES *)
lemma Suc_unat_mask_div_obfuscated:
"Suc (unat (mask sz div (word_size::machine_word))) = 2 ^ (min sz word_bits - word_size_bits)"
by (rule Suc_unat_mask_div)
lemma word_size_size_bits_nat:
"2^word_size_bits = (word_size :: nat)"
by (simp add: word_size_bits_def word_size_def)
lemma word_size_size_bits_word:
"2^word_size_bits = (word_size :: 'a :: len word)"
by (simp add: word_size_bits_def word_size_def)
end