include "aarch64memattrs.cat"
let ca = fr | co
let PTE-MT-update =
[PTENormal]; ca; [PTEDevice]
| [PTEDevice]; ca; [PTENormal]
let PTE-SH-update =
[PTENon-shareable]; ca; [PTEInner-shareable | PTEOuter-shareable]
| [PTEInner-shareable]; ca; [PTEOuter-shareable | PTENon-shareable]
| [PTEOuter-shareable]; ca; [PTENon-shareable | PTEInner-shareable]
let PTE-ICH-update =
[PTEInner-non-cacheable]; ca; [PTEInner-write-through | PTEInner-write-back]
| [PTEInner-write-through]; ca; [PTEInner-write-back | PTEInner-non-cacheable]
| [PTEInner-write-back]; ca; [PTEInner-non-cacheable | PTEInner-write-through]
let PTE-OCH-update =
[PTEOuter-non-cacheable]; ca; [PTEOuter-write-through | PTEOuter-write-back]
| [PTEOuter-write-through]; ca; [PTEOuter-write-back | PTEOuter-non-cacheable]
| [PTEOuter-write-back]; ca; [PTEOuter-non-cacheable | PTEOuter-write-through]
let PTE-DT-update =
[PTEDevice-GRE]; ca; [PTEDevice-nGRE | PTEDevice-nGnRE | PTEDevice-nGnRnE]
| [PTEDevice-nGRE]; ca; [PTEDevice-GRE | PTEDevice-nGnRE | PTEDevice-nGnRnE]
| [PTEDevice-nGnRE]; ca; [PTEDevice-GRE | PTEDevice-nGRE | PTEDevice-nGnRnE]
| [PTEDevice-nGnRnE]; ca; [PTEDevice-GRE | PTEDevice-nGRE | PTEDevice-nGnRE]
let PTE-OA-update = ([PTE]; ca; [PTE & oa-changes(PTE, ca^-1)])
let PTE-OA-update-writable = PTE-OA-update &
([PTE]; ca; [PTE & at-least-one-writable(PTE, ca^-1)])
let PTE-update-needsBBM = ([PTEV]; ca \ (ca; [PTEV]; ca); [PTEV]) &
(PTE-MT-update | PTE-SH-update | PTE-ICH-update | PTE-OCH-update | PTE-DT-update
| PTE-OA-update)
let TTDV = PTEV
let TTDINV = PTEINV
let TTD-update-needsBBM = PTE-update-needsBBM