From ecdc2e010757276290018204952836a9ec116d60 Mon Sep 17 00:00:00 2001 From: Peter Rugg Date: Wed, 11 Jan 2023 17:50:37 +0000 Subject: [PATCH] Remove remaining unsealed checks --- src_Core/RISCY_OOO/procs/lib/Decode.bsv | 3 --- src_Core/RISCY_OOO/procs/lib/Exec.bsv | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src_Core/RISCY_OOO/procs/lib/Decode.bsv b/src_Core/RISCY_OOO/procs/lib/Decode.bsv index 9b75433..1b12d5c 100644 --- a/src_Core/RISCY_OOO/procs/lib/Decode.bsv +++ b/src_Core/RISCY_OOO/procs/lib/Decode.bsv @@ -1023,7 +1023,6 @@ function DecodeResult decode(Instruction inst, Bool cap_mode); end f7_cap_CSeal: begin dInst.capChecks.src2_tag = True; - dInst.capChecks.src2_unsealed = True; dInst.capChecks.src2_permit_seal = True; dInst.capChecks.src2_addr_valid_type = True; @@ -1040,7 +1039,6 @@ function DecodeResult decode(Instruction inst, Bool cap_mode); dInst.capFunc = CapModify (Seal); end f7_cap_CCSeal: begin - dInst.capChecks.src2_unsealed = True; dInst.capChecks.src2_addr_valid_type = True; dInst.capChecks.src2_permit_seal = True; dInst.capChecks.ccseal_bypass = True; @@ -1092,7 +1090,6 @@ function DecodeResult decode(Instruction inst, Bool cap_mode); f7_cap_CUnseal: begin dInst.capChecks.src2_tag = True; dInst.capChecks.src1_sealed_with_type = True; - dInst.capChecks.src2_unsealed = True; dInst.capChecks.src2_points_to_src1_type = True; dInst.capChecks.src2_permit_unseal = True; diff --git a/src_Core/RISCY_OOO/procs/lib/Exec.bsv b/src_Core/RISCY_OOO/procs/lib/Exec.bsv index 7bd801b..4188152 100644 --- a/src_Core/RISCY_OOO/procs/lib/Exec.bsv +++ b/src_Core/RISCY_OOO/procs/lib/Exec.bsv @@ -273,13 +273,13 @@ function CapPipe capModify(CapPipe a, CapPipe b, CapModifyFunc func); tagged SealEntry : setKind(a_mut, SENTRY); tagged Seal : - setKind(a_mut, SEALED_WITH_TYPE (truncate(getAddr(b)))); + clearTagIf(setKind(a_mut, SEALED_WITH_TYPE (truncate(getAddr(b)))), getKind(b) != UNSEALED); tagged CSeal : ((validAsType(b, getAddr(b)) && isValidCap(b) && getKind(a) == UNSEALED) ? setKind(a_mut, SEALED_WITH_TYPE (truncate(getAddr(b)))) : a); tagged Unseal .src : - setKind(((src == Src1) ? a:b), UNSEALED); + clearTagIf(setKind(((src == Src1) ? a:b), UNSEALED), (src == Src1) && (getKind(b) != UNSEALED)); tagged AndPerm : setPerms(a_mut, pack(getPerms(a)) & truncate(getAddr(b))); tagged SetFlags :