From ecf89844100248db3ad08d5c76091de563488b95 Mon Sep 17 00:00:00 2001 From: Fabian Imhof Date: Sun, 20 Oct 2024 09:37:08 +0000 Subject: implement map_page_to_frame --- arch/x86_64/include/arch/memory/paging/page_entry.hpp | 2 +- arch/x86_64/include/arch/memory/paging/page_mapper.hpp | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'arch/x86_64/include') diff --git a/arch/x86_64/include/arch/memory/paging/page_entry.hpp b/arch/x86_64/include/arch/memory/paging/page_entry.hpp index 016e054..8dd061f 100644 --- a/arch/x86_64/include/arch/memory/paging/page_entry.hpp +++ b/arch/x86_64/include/arch/memory/paging/page_entry.hpp @@ -60,7 +60,7 @@ namespace teachos::arch::memory::paging * * @param frame Physical frame that contains the address we want to copy into our underlying std::bitset. */ - auto set_address(allocator::physical_frame frame) -> void; + auto entry::set_entry(allocator::physical_frame frame, std::bitset<64U> additional_flags) -> void; /** * @brief Checks if the given std::bitset is a subset or equivalent to the underlying std::bitset, meaning that all diff --git a/arch/x86_64/include/arch/memory/paging/page_mapper.hpp b/arch/x86_64/include/arch/memory/paging/page_mapper.hpp index ad9db52..5960aaf 100644 --- a/arch/x86_64/include/arch/memory/paging/page_mapper.hpp +++ b/arch/x86_64/include/arch/memory/paging/page_mapper.hpp @@ -1,6 +1,7 @@ #ifndef TEACHOS_ARCH_X86_64_MEMORY_PAGING_PAGE_MAPPER_HPP #define TEACHOS_ARCH_X86_64_MEMORY_PAGING_PAGE_MAPPER_HPP +#include "arch/memory/allocator/area_frame_allocator.hpp" #include "arch/memory/paging/virtual_page.hpp" #include @@ -32,8 +33,16 @@ namespace teachos::arch::memory::paging */ auto translate_address(std::size_t virtual_address) -> std::optional; - auto map_page_to_frame(memory::allocator::area_frame_allocator & allocator, const Page & page, const Frame & frame, - EntryFlags flags) -> void; + /** + * @brief TODO + * + * @param allocator + * @param page + * @param frame + * @param flags + */ + auto map_page_to_frame(memory::allocator::area_frame_allocator & allocator, const virtual_page & page, + const memory::allocator::physical_frame & frame, entry::bitset flags) -> void; } // namespace teachos::arch::memory::paging #endif \ No newline at end of file -- cgit v1.2.3