Skip to content

Commit

Permalink
Disable smart packing (#1671)
Browse files Browse the repository at this point in the history
The kernel will reject leases that span multiple regions, so this PR
disables smart packing entirely by forcing each task's flash into a
single MPU region (just like before #1599). Otherwise, tasks which loan
out their flash memory may produce spurious faults.
  • Loading branch information
mkeeter committed Mar 20, 2024
1 parent 9edefbe commit d79f9c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/xtask/src/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ pub fn package(
// Build a set of requests for the memory allocator
let mut task_reqs = HashMap::new();
for (t, sz) in task_sizes {
let n = sz.len()
// XXX disabled because leases can't span regions
let _n = sz.len()
+ cfg
.toml
.extern_regions_for(t, &cfg.toml.image_names[0])
Expand All @@ -393,7 +394,7 @@ pub fn package(
t,
TaskRequest {
memory: sz,
spare_regions: 7 - n,
spare_regions: 0,
},
);
}
Expand Down

0 comments on commit d79f9c9

Please sign in to comment.