Skip to content

Commit da4106d

Browse files
committed
WIP: kani proofs
Signed-off-by: Babis Chalios <[email protected]>
1 parent dd81af0 commit da4106d

File tree

1 file changed

+4
-2
lines changed
  • src/vmm/src/arch/aarch64

1 file changed

+4
-2
lines changed

src/vmm/src/arch/aarch64/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ mod verification {
244244
assert!(regions.len() >= 1);
245245
assert!(regions.len() <= 2);
246246

247-
// The very first address should be offset bytes past DRAM_MEM_START
248-
assert_eq!(regions[0].0.0, DRAM_MEM_START + offset);
249247
// The total length of all regions cannot exceed DRAM_MEM_MAX_SIZE
250248
let actual_len = regions.iter().map(|&(_, len)| len).sum::<usize>();
251249
assert!(actual_len <= DRAM_MEM_MAX_SIZE);
@@ -274,7 +272,11 @@ mod verification {
274272
if regions.len() == 2 {
275273
kani::cover!();
276274

275+
// The very first address should be offset bytes past DRAM_MEM_START
276+
assert_eq!(regions[0].0.0, DRAM_MEM_START + offset);
277+
// The first region ends at the beginning of the 64 bits gap.
277278
assert_eq!(regions[0].0.0 + regions[0].1 as u64, MMIO64_MEM_START);
279+
// The second region starts exactly after the 64 bits gap.
278280
assert_eq!(regions[1].0.0, FIRST_ADDR_PAST_64BITS_MMIO);
279281
}
280282
}

0 commit comments

Comments
 (0)