aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src')
-rw-r--r--arch/x86_64/src/kapi/memory.cpp4
-rw-r--r--arch/x86_64/src/memory/paging_root.cpp8
-rw-r--r--arch/x86_64/src/memory/recursive_page_mapper.cpp2
-rw-r--r--arch/x86_64/src/memory/scoped_mapping.cpp4
4 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86_64/src/kapi/memory.cpp b/arch/x86_64/src/kapi/memory.cpp
index 00b9de3..cd0bd77 100644
--- a/arch/x86_64/src/kapi/memory.cpp
+++ b/arch/x86_64/src/kapi/memory.cpp
@@ -117,7 +117,7 @@ namespace teachos::memory
} // namespace
- auto active_allocator() -> frame_allocator &
+ auto active_frame_allocator() -> frame_allocator &
{
if (!allocator)
{
@@ -127,7 +127,7 @@ namespace teachos::memory
return *allocator;
}
- auto active_mapper() -> page_mapper &
+ auto active_page_mapper() -> page_mapper &
{
if (!mapper)
{
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;
}