From cf8d0d899ee17db734ce8ab7ee618333eb1767f2 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 11 Dec 2025 18:36:23 +0100 Subject: kapi: finish documentation --- arch/x86_64/src/memory/paging_root.cpp | 8 ++++---- arch/x86_64/src/memory/recursive_page_mapper.cpp | 2 +- arch/x86_64/src/memory/scoped_mapping.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'arch/x86_64/src/memory') diff --git a/arch/x86_64/src/memory/paging_root.cpp b/arch/x86_64/src/memory/paging_root.cpp index c458093..078686b 100644 --- a/arch/x86_64/src/memory/paging_root.cpp +++ b/arch/x86_64/src/memory/paging_root.cpp @@ -34,7 +34,7 @@ namespace teachos::memory::x86_64 flags = flags | page_table::entry::flags::writable; if (!(*pml)[index].present()) { - auto new_table_frame = active_allocator().allocate(); + auto new_table_frame = active_frame_allocator().allocate(); auto mapping = scoped_mapping{page}; (*pml)[index].frame(new_table_frame.value(), page_table::entry::flags::present | flags); auto new_table = std::optional{std::construct_at(*pml->next(index))}; @@ -139,21 +139,21 @@ namespace teachos::memory::x86_64 if (pml1->empty()) { auto pml1_frame = (*pml2)[pml_index<2>(page)].frame().value(); - active_allocator().release(pml1_frame); + active_frame_allocator().release(pml1_frame); (*pml2)[pml_index<2>(page)].clear(); } if (pml2->empty()) { auto pml2_frame = (*pml3)[pml_index<3>(page)].frame().value(); - active_allocator().release(pml2_frame); + active_frame_allocator().release(pml2_frame); (*pml3)[pml_index<3>(page)].clear(); } if (pml3->empty()) { auto pml3_frame = (*pml4)[pml_index<4>(page)].frame().value(); - active_allocator().release(pml3_frame); + active_frame_allocator().release(pml3_frame); (*pml4)[pml_index<4>(page)].clear(); } } diff --git a/arch/x86_64/src/memory/recursive_page_mapper.cpp b/arch/x86_64/src/memory/recursive_page_mapper.cpp index ea89f38..47148f0 100644 --- a/arch/x86_64/src/memory/recursive_page_mapper.cpp +++ b/arch/x86_64/src/memory/recursive_page_mapper.cpp @@ -24,7 +24,7 @@ namespace teachos::memory::x86_64 } } - auto recursive_page_mapper::try_unmap(page page) -> bool + auto recursive_page_mapper::try_unmap(page page) noexcept -> bool { auto & root = paging_root::get(); if (!root.translate(page)) diff --git a/arch/x86_64/src/memory/scoped_mapping.cpp b/arch/x86_64/src/memory/scoped_mapping.cpp index 6f3461c..e243dc9 100644 --- a/arch/x86_64/src/memory/scoped_mapping.cpp +++ b/arch/x86_64/src/memory/scoped_mapping.cpp @@ -44,14 +44,14 @@ namespace teachos::memory::x86_64 auto scoped_mapping::map(frame frame, page_table::entry::flags flags) -> std::byte * { - auto result = active_mapper().map(m_page, frame, to_mapper_flags(flags)); + auto result = active_page_mapper().map(m_page, frame, to_mapper_flags(flags)); m_mapped = true; return result; } auto scoped_mapping::unmap() -> void { - active_mapper().unmap(m_page); + active_page_mapper().unmap(m_page); m_mapped = false; } -- cgit v1.2.3