Skip to content

Commit

Permalink
find_kernel: give values meaningful names
Browse files Browse the repository at this point in the history
  • Loading branch information
cagatay-y committed Oct 3, 2024
1 parent c6f3be2 commit 5d12c37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/arch/x86_64/multiboot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,19 @@ pub fn find_kernel() -> &'static [u8] {
PhysAlloc::init(free_memory_address);

// Identity-map the ELF header of the first module.
let first_module_mapping_end = start_address.align_up(Size2MiB::SIZE as usize);
paging::map_range::<Size4KiB>(
start_address,
start_address,
start_address.align_up(Size2MiB::SIZE as usize),
first_module_mapping_end,
PageTableFlags::empty(),
);

// map also the rest of the module
let address = start_address.align_up(Size2MiB::SIZE as usize);
paging::map_range::<Size2MiB>(
address,
address,
end_address.align_up(Size2MiB::SIZE as usize),
first_module_mapping_end,
first_module_mapping_end,
free_memory_address,
PageTableFlags::empty(),
);

Expand Down

0 comments on commit 5d12c37

Please sign in to comment.