Make end page exclusive when computing the end page for the ramdisk
@@ -298,7 +298,7 @@ where
let physical_address = PhysAddr::new(ramdisk_address);
let ramdisk_physical_start_page: PhysFrame<Size4KiB> =
PhysFrame::containing_address(physical_address);
- let ramdisk_page_count = system_info.ramdisk_len / Size4KiB::SIZE;
+ let ramdisk_page_count = (system_info.ramdisk_len - 1) / Size4KiB::SIZE;
let ramdisk_physical_end_page = ramdisk_physical_start_page + ramdisk_page_count;
let start_page = Page::from_start_address(ramdisk_address_start)
.expect("the ramdisk start address must be page aligned");
