We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 465881e commit b86fb0cCopy full SHA for b86fb0c
common/src/lib.rs
@@ -281,7 +281,7 @@ where
281
let physical_address = PhysAddr::new(ramdisk_address);
282
let ramdisk_physical_start_page: PhysFrame<Size4KiB> =
283
PhysFrame::containing_address(physical_address);
284
- let ramdisk_page_count = ((system_info.ramdisk_len - 1) / Size4KiB::SIZE) + 1;
+ let ramdisk_page_count = system_info.ramdisk_len / Size4KiB::SIZE;
285
let ramdisk_physical_end_page = ramdisk_physical_start_page + ramdisk_page_count;
286
let start_page = Page::from_start_address(ramdisk_address_start)
287
.expect("the ramdisk start address must be page aligned");
0 commit comments