aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/memory/paging/page_mapper.hpp21
1 files changed, 15 insertions, 6 deletions
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 b151a7f..ad9db52 100644
--- a/arch/x86_64/include/arch/memory/paging/page_mapper.hpp
+++ b/arch/x86_64/include/arch/memory/paging/page_mapper.hpp
@@ -8,18 +8,27 @@
namespace teachos::arch::memory::paging
{
/**
- * @brief Translate page into physical_frame
+ * @brief Translates page into physical frame, will first attempt to parse normally using default page size and if it
+ * failed attempt to parse using huge pages.
*
- * @param page Page to translate into physical_frame
- * @return Physical frame corresponding to the provided page_table
+ * @param page Page to translate into physical frame.
+ * @return Physical frame corresponding to the provided virtual page.
*/
auto translate_page(virtual_page page) -> std::optional<allocator::physical_frame>;
/**
- * @brief Translate virtual into phyical address
+ * @brief Translates huge page into actual physical frame.
*
- * @param virtual_address Address to translate into physical
- * @return Physical address
+ * @param page Page to translate into physical frame.
+ * @return Physical frame corresponding to the provided virtual page.
+ */
+ auto translate_huge_page(virtual_page page) -> std::optional<allocator::physical_frame>;
+
+ /**
+ * @brief Translate virtual into phyical address.
+ *
+ * @param virtual_address Address to translate into physical.
+ * @return Physical address.
*/
auto translate_address(std::size_t virtual_address) -> std::optional<std::size_t>;