aarch64 haskell: update decodeARMASIDPoolInvocation

Check for mapping was incorrect (attempted to check the ASID cap for
ptIsMapped) and it turns out not necessary.

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
This commit is contained in:
Rafal Kolanski 2023-05-22 12:24:54 +10:00 committed by Gerwin Klein
parent 7cea1dc893
commit 7ed847638d
No known key found for this signature in database
GPG Key ID: 20A847CE6AB7F5F3
1 changed files with 2 additions and 1 deletions

View File

@ -714,7 +714,8 @@ decodeARMASIDPoolInvocation label cap@(ASIDPoolCap {}) extraCaps =
case vspaceCap of
ArchObjectCap (PageTableCap { capPTMappedAddress = Nothing })
-> do
when (not (isVTableRoot vspaceCap) || isJust (capPTMappedAddress cap)) $
-- C checks for a mapping here, but our case already checks that
when (not (isVTableRoot vspaceCap)) $
throw $ InvalidCapability 1
asidTable <- withoutFailure $ gets (armKSASIDTable . ksArchState)
let base = capASIDBase cap