aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-03 13:23:40 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-03 13:23:40 +0000
commit74c53bed107b87f064484b926d8ed02018eb3a3e (patch)
tree63fefc57e2d1fe69398629b671aac7eb4b2b8556 /arch/x86_64/include
parentd971ee4dd26d928d9590ccbf8e39220d81787a98 (diff)
downloadteachos-74c53bed107b87f064484b926d8ed02018eb3a3e.tar.xz
teachos-74c53bed107b87f064484b926d8ed02018eb3a3e.zip
Adjust comment
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp3
-rw-r--r--arch/x86_64/include/arch/memory/paging/temporary_page.hpp2
2 files changed, 3 insertions, 2 deletions
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