2016-07-07 04:37:02 +00:00
|
|
|
(*
|
|
|
|
* Copyright 2014, General Dynamics C4 Systems
|
|
|
|
*
|
2020-03-09 06:18:30 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only
|
2016-07-07 04:37:02 +00:00
|
|
|
*)
|
|
|
|
|
|
|
|
(*
|
|
|
|
Arch specific object invocations
|
|
|
|
*)
|
|
|
|
|
|
|
|
chapter "ARM Object Invocations"
|
|
|
|
|
|
|
|
theory ArchInvocation_A
|
2020-10-31 06:30:58 +00:00
|
|
|
imports Structures_A
|
2016-07-07 04:37:02 +00:00
|
|
|
begin
|
|
|
|
|
|
|
|
context Arch begin global_naming ARM_A
|
|
|
|
|
2019-06-05 10:18:48 +00:00
|
|
|
text \<open>These datatypes encode the arguments to the various possible
|
2016-07-07 04:37:02 +00:00
|
|
|
ARM-specific system calls. Selectors are defined for various fields
|
2019-06-05 10:18:48 +00:00
|
|
|
for convenience elsewhere.\<close>
|
2016-07-07 04:37:02 +00:00
|
|
|
|
|
|
|
datatype flush_type = Clean | Invalidate | CleanInvalidate | Unify
|
|
|
|
|
|
|
|
datatype page_directory_invocation =
|
|
|
|
PageDirectoryFlush (pd_flush_type: flush_type) (pd_flush_start: vspace_ref)
|
|
|
|
(pd_flush_end: vspace_ref) (pd_flush_pstart: word32)
|
|
|
|
(pd_flush_pd: obj_ref) (pd_flush_asid: asid)
|
|
|
|
| PageDirectoryNothing
|
|
|
|
|
|
|
|
datatype page_table_invocation =
|
|
|
|
PageTableMap cap cslot_ptr pde obj_ref
|
|
|
|
| PageTableUnmap cap cslot_ptr
|
|
|
|
|
|
|
|
datatype asid_control_invocation =
|
|
|
|
MakePool obj_ref cslot_ptr cslot_ptr asid
|
|
|
|
|
|
|
|
datatype asid_pool_invocation =
|
|
|
|
Assign asid obj_ref cslot_ptr
|
|
|
|
|
|
|
|
datatype page_invocation
|
|
|
|
= PageMap
|
|
|
|
(page_map_asid: asid)
|
|
|
|
(page_map_cap: cap)
|
|
|
|
(page_map_ct_slot: cslot_ptr)
|
|
|
|
(page_map_entries: "pte \<times> (obj_ref list) + pde \<times> (obj_ref list)")
|
|
|
|
| PageUnmap
|
|
|
|
(page_unmap_cap: arch_cap)
|
|
|
|
(page_unmap_cap_slot: cslot_ptr)
|
|
|
|
| PageFlush
|
|
|
|
(page_flush_type: flush_type)
|
|
|
|
(page_flush_start: vspace_ref)
|
|
|
|
(page_flush_end: vspace_ref)
|
|
|
|
(page_flush_pstart: word32)
|
|
|
|
(page_flush_pd: obj_ref)
|
|
|
|
(page_flush_asid: asid)
|
|
|
|
| PageGetAddr
|
|
|
|
(page_get_paddr: obj_ref)
|
|
|
|
|
2016-12-06 23:02:41 +00:00
|
|
|
datatype vcpu_invocation =
|
|
|
|
VCPUSetTCB obj_ref (*vcpu*) obj_ref (*tcb*)
|
2016-08-15 04:44:25 +00:00
|
|
|
| VCPUInjectIRQ obj_ref nat virq
|
2017-03-15 11:11:07 +00:00
|
|
|
| VCPUReadRegister obj_ref vcpureg
|
|
|
|
| VCPUWriteRegister obj_ref vcpureg machine_word
|
2019-11-28 01:36:01 +00:00
|
|
|
| VCPUAckVPPI obj_ref (* vcpu *) vppievent_irq
|
2016-12-06 23:02:41 +00:00
|
|
|
|
2016-07-07 04:37:02 +00:00
|
|
|
datatype arch_invocation
|
|
|
|
= InvokePageTable page_table_invocation
|
|
|
|
| InvokePageDirectory page_directory_invocation
|
|
|
|
| InvokePage page_invocation
|
|
|
|
| InvokeASIDControl asid_control_invocation
|
|
|
|
| InvokeASIDPool asid_pool_invocation
|
2016-12-06 23:02:41 +00:00
|
|
|
| InvokeVCPU vcpu_invocation
|
2016-07-07 04:37:02 +00:00
|
|
|
|
2016-12-06 22:45:05 +00:00
|
|
|
(* The ARM platform currently does not define any additional register sets for
|
|
|
|
the "CopyRegisters" operation. This may be changed in future to support a floating point unit. *)
|
|
|
|
|
|
|
|
datatype arch_copy_register_sets = ARMNoExtraRegisters
|
2016-07-07 04:37:02 +00:00
|
|
|
|
2016-07-27 01:09:47 +00:00
|
|
|
definition "ArchDefaultExtraRegisters \<equiv> ARMNoExtraRegisters"
|
|
|
|
|
2018-08-14 00:25:22 +00:00
|
|
|
datatype arch_irq_control_invocation =
|
|
|
|
ArchIRQControlIssue irq cslot_ptr cslot_ptr bool
|
2016-07-07 04:37:02 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|