From 74c53bed107b87f064484b926d8ed02018eb3a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sun, 3 Nov 2024 13:23:40 +0000 Subject: Adjust comment --- arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp | 3 ++- arch/x86_64/include/arch/memory/paging/temporary_page.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/x86_64/include') diff --git a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp index c62a02e..f30ca24 100644 --- a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp +++ b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp @@ -75,7 +75,7 @@ namespace teachos::arch::memory::paging auto remap_elf_kernel_sections(inactive_page_table inactive_table, temporary_page & temporary_page, active_page_table & active_table) -> void { - auto physical_address = active_table.translate_address(PAGE_TABLE_LEVEL_4_ADDRESS); + auto const physical_address = active_table.translate_address(PAGE_TABLE_LEVEL_4_ADDRESS); exception_handling::assert(physical_address.has_value(), "[Kernel Mapper] Physical address for active table not mapped"); @@ -100,6 +100,7 @@ namespace teachos::arch::memory::paging */ auto map_elf_kernel_sections(active_page_table & active_table) -> void { + exception_handling::assert(!mem_info.sections.empty(), "[Kernel Mapper] Kernel elf sections empty"); for (auto const & section : mem_info.sections) { if (!section.flags.contains_flags(multiboot::elf_section_flags::OCCUPIES_MEMORY)) diff --git a/arch/x86_64/include/arch/memory/paging/temporary_page.hpp b/arch/x86_64/include/arch/memory/paging/temporary_page.hpp index 8b49894..b93a375 100644 --- a/arch/x86_64/include/arch/memory/paging/temporary_page.hpp +++ b/arch/x86_64/include/arch/memory/paging/temporary_page.hpp @@ -61,7 +61,7 @@ namespace teachos::arch::memory::paging */ auto map_to_frame(allocator::physical_frame frame, active_page_table & active_table) -> virtual_address; - virtual_page page; ///< Underlying virtual page we want to temporarily map a level 4 page table into. + virtual_page page; ///< Underlying virtual page we want to temporarily map. allocator::tiny_frame_allocator allocator; ///< Allocator that should be used to map the temporary page. }; } // namespace teachos::arch::memory::paging -- cgit v1.2.3