aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2024-10-20 09:37:08 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2024-10-20 11:07:23 +0000
commitecf89844100248db3ad08d5c76091de563488b95 (patch)
tree8a6d44a2e1bdd9e71ff1e64cb07f74393eed8668 /arch/x86_64/include
parent04bd6a059b9eb105024044d74122b0cb76cebf14 (diff)
downloadteachos-ecf89844100248db3ad08d5c76091de563488b95.tar.xz
teachos-ecf89844100248db3ad08d5c76091de563488b95.zip
implement map_page_to_frame
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/memory/paging/page_entry.hpp2
-rw-r--r--arch/x86_64/include/arch/memory/paging/page_mapper.hpp13
2 files changed, 12 insertions, 3 deletions
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 <optional>
@@ -32,8 +33,16 @@ namespace teachos::arch::memory::paging
*/
auto translate_address(std::size_t virtual_address) -> std::optional<std::size_t>;
- 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