From 4cdf8c4aa71094cb8ee7bf6402793c9df654c832 Mon Sep 17 00:00:00 2001 From: Jarl Evanson <jarl.evanson@herronhighschool.org> Date: Mon, 3 Apr 2023 00:01:16 -0400 Subject: [PATCH] Fixed bug stemming from treating an exclusive range as an inclusive range --- common/src/load_kernel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/load_kernel.rs b/common/src/load_kernel.rs index fd977f2b..a79a404a 100644 --- a/common/src/load_kernel.rs +++ b/common/src/load_kernel.rs @@ -269,7 +269,7 @@ where // map additional frames for `.bss` memory that is not present in source file let start_page: Page = Page::containing_address(VirtAddr::new(align_up(zero_start.as_u64(), Size4KiB::SIZE))); - let end_page = Page::containing_address(zero_end); + let end_page = Page::containing_address(zero_end - 1u64); for page in Page::range_inclusive(start_page, end_page) { // allocate a new unused frame let frame = self.frame_allocator.allocate_frame().unwrap();