Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 62 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ members = [
]

[workspace.dependencies.sel4-capdl-initializer]
git = "https://github.com/au-ts/rust-sel4"
rev = "33cb132571121a8d846ad3be9066617087ee5c32"
git = "https://github.com/seL4/rust-sel4"
rev = "413940c8058da32098c464f6cd09e550b230505c"

[workspace.dependencies.sel4-capdl-initializer-types]
git = "https://github.com/au-ts/rust-sel4"
rev = "33cb132571121a8d846ad3be9066617087ee5c32"
git = "https://github.com/seL4/rust-sel4"
rev = "413940c8058da32098c464f6cd09e550b230505c"

[profile.release.package.microkit-tool]
strip = true
10 changes: 7 additions & 3 deletions tool/microkit/src/capdl/allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,13 @@ pub fn simulate_capdl_object_alloc_algorithm(
let target_is_obj_with_paddr = target < ut.end();

while cur_paddr < target {
let max_size_bits = usize::try_from(cur_paddr.trailing_zeros())
.unwrap()
.min((target - cur_paddr).trailing_zeros().try_into().unwrap());
let max_size_bits = {
let alignment_bits = (cur_paddr - ut.base())
.checked_ilog2()
.unwrap_or(kernel_config.word_size.try_into().unwrap());
let distance_bits = (target - cur_paddr).checked_ilog2().expect("never 0");
alignment_bits.min(distance_bits).try_into().unwrap()
};
let mut created = false;

// If this UT is in main memory, allocate all the objects that does not specify a paddr first.
Expand Down
Loading
Loading